on 07-15-2007 9:32 PM
Hello,
I have a table UI element in my Web Dynpro app. The user enters some search data, I perform some logic based on that and that results in a new set of data.
I populate the table with the new data and set the leadSelection to -1.
The table is in a ScrollContainer with scrolling set to auto so I can have vertical scroll bars.
However the table doesn't start the display with row 1 but with whatever row it was on before. In other words, let's say my original list contained 50 rows and I had scrolled down to row 15. Then the next result list contains 35 rows. When it displays the table it still starts with row 15.
Not sure if it's important but the properties of the table are set to have VisibleRowCount of -1 and FooterVisible to false. I had to do this in order to hide the navigation button bar at the bottom of the table.
Has someone seen this before? If so, can you please tell me how to fix it?
Any help would be greatly appreciated
Hi David,
Try this.
After populating the data, Set it's leadSelection to 0 instead of -1 by
wdContext.node<Table>().setLeadSelection(0);
Also make sure that firstVisibleRow property of table is 0 as Armin suggested.
Regadrs,
Fahad Hamsa
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
A co-worker found this
/people/valery.silaev/blog/2005/06/20/master-of-columns-part-ii
I haven't had time to try it yet. Has anyone else tried this? If so, did it work for you?
Thanks!
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Based on the responses that I received the first time around it sounded like what I'm asking is not possible.
However, now I'm working on a different web dynpro app that was written by a contractor who is no longer here.
That app DOES exhibit the behavior I don't want. In other words, after the onAction method is executed and the screen is redisplayed the table display starts with the first row.
I am trying to figure out what's different between the two. Both are in a scroll container.
There HAS to be something that controls whether the table display begins at the first row or just stays at the selected row.
Any help would be greatly appreciated.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
There apparently is NOT a way to do what I'm asking in the current release but the question has been answered
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Thank you all for replying. I've awarded all of you some points for the good feedback but I'm disappointed that there is no solution to it.
I understand what Armin is saying but, unfortunately, the users don't like the table navigation buttons. They prefer the scroll bar.
Guess we'll have to live with this until the next release when there will hopefully be more options.
Thanks again.
David.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Thanks all for your replies. Sorry for my confusion about the initial reply.
I have tried (I believe) all the suggested 'fixes' with no luck. At the bottom of this entry are the current properties of the table.
In the onAction method that is executed when I do my search I have the following at the end:
if (wdContext.nodeObj_types_output().size() == 0) {
wdContext.nodeObj_types_output().setLeadSelection(-1);
} else {
wdContext.nodeObj_types_output().setLeadSelection(0);
wdContext.currentContextElement().setFirstVisibleRow(0);
}
<b>The table properties</b> (if property is not listed it has no value) are as follows:
compatibilityMode - auto
dataSource - Obj_types_output (node in Context Model Node bound to RFC model)
design -standard
enabled - true
firstVisibleRow - firstVisibleRow (context Value Attribute of type integer)
fixedTableLayout - false
footerVisible - false
gridMode - both
id - ObjectTypes
readOnly - false
rowSelectable - true
scrollableColCount - -1
selectionChangeBehaviour - auto
selectionMode - auto
visible - visible
visibleRowCount - -1
onLeadSelect - ObjectSelect
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Sorry, I did not read your original post carefully. You have a ScrollContainer around a table that displays all its rows. Well in that case, you are out of luck, the scrollbar position cannot be controlled by the application. Better use the table as it has been designed i.e. in <=NW04s, use the paginators and in later versions, the table has its own scrollbar which avoids this problem.
Armin
Have you bound property "firstVisibleRowCount"? Is it set to 0 after reloading the table data?
Armin
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hello Armin. Thanks for your reply.
Could you please explain what you mean by 'have you bound property"firstVisibleRowCount"' ?
I have tried to set that value but I can't figure out how to get a 'handle' on the view object in the "onActionxxx" method that is executed by my search.
Any tips?
David.
Hi David,
What armin meant was have you created a context attribute of type integer and bind that context attribute to the "firstVisibleRowCount" property of the table.
If not do that and when you reload set the "firstVisibleRowCount" property to 0.
Say you have "defaultVisibleRow" as context a attribute of type integer and bind this to "firstVisibleRowCount" property of the Table UI.
After reloading in the action of the search
wdContext.currentContextElement.setdefaultVisibleRow(0);
User | Count |
---|---|
94 | |
11 | |
10 | |
9 | |
9 | |
7 | |
6 | |
5 | |
4 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.