on 12-13-2013 9:29 AM
Hi All,
I have an itemlistbox which contains about 50 items and i am displaying 10 initially. When i scroll down to item 11 and perform some action, the action is performed as expected.But the issue i am facing is, After the action is done, the itemlistbox refreshes and the the scroll bar moves to the top which displays first 10 items. I want the scroll bar to be there at the 11th item. Can this be achieved in webdynpro java? Any help would be greatfull..
Thanks,
Nooruddin
The problem is with the focus. You can solve it with following workaround:
1. Get the view reference and store it as a view attribute:
METHOD wddomodifyview .
wd_this->iv_view = view.
ENDMETHOD.
2. Set the focus to the listbox after filling the values with following code:
DATA: lo_view_element TYPE REF TO if_wd_view_element.
IF wd_this->iv_view IS BOUND.
wd_this->iv_view->get_element( EXPORTING id = 'ILB_xxx' " id of your itemlistbox in the view's layout
RECEIVING element = lo_view_element ).
IF lo_view_element IS BOUND.
wd_this->iv_view->request_focus_on_view_elem( EXPORTING view_element = lo_view_element ).
ENDIF.
ENDIF.
Your scrolling problem will be solved.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
I think you can change the leadselection to the desired item after you perform your action.
Regards,
Ervin
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Yes...Actually I had tried this in one of my requirement for drop down UI element..You can refer following document to find the selected entry from the ItemListBox..but as Sharath told may be there would be some issue in case of multiple selection.
Hi Patralekha Sur,
I am able to select values and perform the logic. But my problem is with the scroll bar after selecting the values and performing action, the scroll bar of the itemlistbox moves to the top automatically. I want the scrollbar to be there where i scrolled down.
thanks,
Nooruddin
Hi Shaik,
I think you can go for previous & next button or Paging to avoid this prob.
Please follow below links to do that.
1) Previous & Next button:-
https://scn.sap.com/thread/3427336
2) Paging :-
Thanks,
Patralekha
User | Count |
---|---|
94 | |
11 | |
11 | |
10 | |
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.