cancel
Showing results for 
Search instead for 
Did you mean: 

Set OVS Row Num

Former Member
0 Kudos

Dear All,

Is it possible to specify the number of visible rows in OVS return table? I'm getting 5 rows, and i need to show 10.

Thanks & Regards,

Jiandong

Accepted Solutions (0)

Answers (3)

Answers (3)

Former Member
0 Kudos

You should have a look at OVS in Netweaver 7.10 EhP 1. There they added a little bit more control about OVS apperance.

Most times I found OVS not suitable and build my own view that I open myself. More work but I looks the way you want The approach from Daniel is very interesting, but keep in mind, you may get all tables now with 10 lines of output by default.

Frank

Former Member
0 Kudos

Hi Frank,

The second code relates to OVS Result View only. Of course, all OVS will have a "fixed" value, since for some really, really odd reason a number of visibleRows cannot be defined.

I think it's better change that than the Table itself.

And I do agree with you, coding my own would be the best way, and it's something that I have in my list here, so I don't need to suffer all these limitations from WDP Core Components.

Not sure how is CE 7.1, never had a chance to play with it.. Did they finally code a new argument in addOvsExtension to set the visibleRows?

Regards,

Daniel

Former Member
0 Kudos

Updating this thread,

You can look for "_webdynpro_component_ovs.jar" inside your server filesystem. Should be in JC00/j2ee/cluster/server0/apps/sap.com/tcwdcorecomp/webdynpro/public/lib/"

This is the WDP component supplied by SAP. I think it's better than overriding the whole Table class. Inside this JAR, there is a class file called InternalResultView.class. Inside the method wdCreateUITree() you can add a new line:


    public IWDViewElement wdCreateUITree()
    {
        IWDTransparentContainer _RootUIElementContainer = (IWDTransparentContainer)wdAlterEgo.createElement(com.sap.tc.webdynpro.clientserver.uielib.standard.api.IWDTransparentContainer.class, "RootUIElementContainer");
        IWDFlowLayout _RootUIElementContainer__Layout = (IWDFlowLayout)_RootUIElementContainer.createLayout(com.sap.tc.webdynpro.clientserver.uielib.standard.api.IWDFlowLayout.class);
        IWDTable _result = (IWDTable)wdAlterEgo.createElement(com.sap.tc.webdynpro.clientserver.uielib.standard.api.IWDTable.class, "result");
        _result.setReadOnly(true);
        _result.setSelectionMode(WDTableSelectionMode.valueOf("single"));
        _result.setVisibleRowCount(10);    // Added Line..
        _result.setWidth("100%");
        _result.setOnLeadSelect(wdAlterEgo.getAction("LeadSelected"));
        IWDFlowData _result__LayoutData = (IWDFlowData)_result.createLayoutData(com.sap.tc.webdynpro.clientserver.uielib.standard.api.IWDFlowData.class);
        _RootUIElementContainer.addChild(_result);
        return _RootUIElementContainer;
    }

Repack everything and have a go.

Hope it helps,

Daniel

Former Member
0 Kudos

Hi Jiandong,

No it is not possible to set the number of rows in OVS.

FYI

Regards,

Gopal

Edited by: Gopal on Sep 8, 2009 4:46 PM

Former Member
0 Kudos

Hi,

I think it is possible, but you would have to patch the OVS internal classes to do that. I'll try to get more information how people did that here (we actually work with 10 Rows, they've changed the default) - Since I wasn't involved that time I have no idea how they did that.

Regards,

Daniel

Former Member
0 Kudos

Hi,

The customization of this field is not an easy task. You will need to open the "webdynpro_clientserver_api.jar", you will find the class "responsible" for the default visibleRowCount of any Table implementation.

com.sap.tc.webdynpro.clientserver.uielib.standard.impl.Table.class

There's a hardcoded value of 5. Since the OVS does not have a "custom" property, it's using the hardcoded value.

One way of doing it would be by method pattern matching and creating a joint point in the Table constructor and set a different value. This is for NW7.0. CE 7.1 differs a little bit, there's a value in the property instead of using the constructor for that (which makes a lot sense);

You also need do compile everything again and manually "overwrite" the file in your AS.

Someone from the internal WDP development could confirm this, I'm sure it's possible, but it's not something "easy to do".

Regards,

Daniel