Skip to Content
author's profile photo Former Member
Former Member

Table UI won't start dispay at 1st row after reloading it

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

Add a comment
10|10000 characters needed characters exceeded

Assigned Tags

Related questions

7 Answers

  • Best Answer
    author's profile photo Former Member
    Former Member
    Posted on Jul 16, 2007 at 05:08 AM

    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

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Jul 15, 2007 at 10:14 PM

    Have you bound property "firstVisibleRowCount"? Is it set to 0 after reloading the table data?

    Armin

    Add a comment
    10|10000 characters needed characters exceeded

    • Former Member Former Member

      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);

  • author's profile photo Former Member
    Former Member
    Posted on Jul 16, 2007 at 01:54 PM

    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

    Add a comment
    10|10000 characters needed characters exceeded

    • Former Member

      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

  • author's profile photo Former Member
    Former Member
    Posted on Jul 16, 2007 at 10:04 PM

    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.

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Jul 16, 2007 at 10:05 PM

    There apparently is NOT a way to do what I'm asking in the current release but the question has been answered

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Jul 20, 2007 at 02:03 PM

    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.

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Aug 30, 2007 at 07:11 PM

    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!

    Add a comment
    10|10000 characters needed characters exceeded

    • Former Member

      I tried the process described in the link above but it didn't really apply to what I'm doing.

      Closing this thread. This thread was a little confusing in that it really dealt with two separate issues. I'll open a new thread that will deal specifically with the issue I'm having now.

Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.