on 11-25-2008 10:27 AM
Hello all,
I'll explain the issue first:
I made a screen where I can search some Business Partners (via RFC). Each time I push the "Search" button I get a result table with my Business Partners. But when I go to the next pages of my result table and then push "Back" and search again, the result table is on the page I last visited.
The question is obvious: how can I have the first page instead of the last page I visited.
I know there's a table property "firstVisibleRow" but I don't know how to get and set it. BTW, it is set on 0.
I found that there's an interface that has methods to bind and set the first visible row (see link) but when I want to implement it (public class Anything implements IWDTable) it doesn't work. I don't know the import I have to make to be possible to implement this interface.
[http://help.sap.com/javadocs/NW04/current/wd/com/sap/tc/webdynpro/clientserver/uielib/standard/api/IWDTable.html#getFirstVisibleRow()]
I thought I could put the correct code that is setting the "firstVisibleRow" to zero in the wdDoInit()-method and thus call it every time the page is called. Would this be OK or shouldI solve the issue in another way?
Kr,
RS
hi Rob,
try
wdContext.nodePartners().setLeadSelection( 0);
or go to context - node properties, set initializeLeadSelection to false
plz let me know the status.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
It doesn't work. I tested it also by setting some other integer in setLeadSelection (for example: wdContext.nodePartners().setLeadSelection( 6);). The first time it works and the requested row is displayed but the next time I perform the search, the first row of the table is selected but the last page you visited is displayed (and not the one with the lead selection thus).
Should I place the functionality in another method than wdDoInit()?
Thanks,
RS
Armin,
I created a Value Node (FirstRowNode) and a value attribute (FirstRowAttr, type integer) and assigned FirstRowNode.FirstRowAttr as value for the attribute firstVisibleRow from my table.
I call the value attribute like this in my wdDoInit() method: this.wdContext.currentFirstRowNodeElement().setFirstRowAttr(0);
I get a NullPointerException in my application even if I try to place it in the OnActionGoBack() method linked to my "Back" button.
Greetz and thanks allready,
RS
To control the first visible row you have to create a context attribute A (integer), bind the "firstVisibleRow" property of the Table UI element to A and set the value of A to the index (zero-based) of the row.
Armin
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
87 | |
10 | |
10 | |
10 | |
7 | |
6 | |
6 | |
5 | |
5 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.