on 11-26-2008 3:18 PM
Hi Experts,
i have a search area and a result table, I type a text in inputfield and click on find button. I get the results in a table beneath the search area on the same view. I select some line or lines and turn the page for example to the third page.
By a new search I get the results in the table correctly, but it shows still the third page. If I turn now the page to the first page, I see that the first row is selected automatically which is good but it is not visible automatically.
How can I get back automatically to the first page after a new search.?
Properties of the table context node:
cardinality 0..n
selection 0..n
Initialization Lead Selection -> checked
Initialization Lead Selection: here I tested also the unchecked case. The only difference was the setting of the selection. By unchecked it doesn't set the selection on the first row. You can see no difference by turning the page, it stays also on the last viewed page by the last search.
Layout properties of the table:
I tested "MultiNoLead" and "auto" for the selectionMode and noticed that in both cases, it deletes the last selection (yellow highlighted) from last search process.
The difference here was:
MultiNoLead -> sets no selection on first row and also doesnu2019t jump to the first row
auto -> sets selection on first row but still doesnu2019t jump to the first page
I tried all these Methods below in my search method (find button) before binding the table to the context. I tried each method separately. Still no jumping to the first page automatically.
****************************************************************************
** Show the first row (turn to the first page of table) by new search
****************************************************************************
** deletes the last Lead selection (yellow highligted)
** selectionMode: MultiNoLead -> sets no selection on first row, doesnu2019t jump to the first row
** selectionMode: auto -> sets selection on first row but still doesnu2019t jump to the first row
* lo_nd_table_data->SET_LEAD_SELECTION_INDEX( index = 0 ).
** or
* lo_nd_table_data->SET_SELECTED( flag = ''
* index = 0 ).
** or
* lo_nd_table_data->SET_SELECTED( flag = 'X'
* index = 0 ).
** or
* lo_nd_table_data->SET_SELECTED( flag = abap_true
* index = 0 ).
** or
* lo_nd_table_data->move_first(
* RECEIVING new_lead_selection = lo_el_table_data ).
** or
* lo_nd_table_data->move_to(
* EXPORTING index = 1
* RECEIVING new_lead_selection = lo_el_table_data ).
******************************************************************
* Binding the table to the context
******************************************************************
lo_nd_table_data->bind_table(
new_items = lt_table_data
set_initial_elements = abap_true ).
* index = 0 ).
As you can see above i tried also to set the index = 0 in the bind_table method but still it doesn't jump to the first page.
Does anyone has an Idea?
Thank you
Regards
Haleh
Hi,
I have smiler problem, and the only solution I found is to reset the view layout
In method WDDOMODIFYVIEW of the view call view->reset_view( )
You need to do this ONLY after the search is performed, otherwise your layout will reset all the time. If you have any dynamic layout changes, they will be reset as well.
Regards
Kameliya
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Haleh,
Create a value in the context or as controller atribute , then set it in your action method. Then in your WDDOMODIFYVIEW check the value if it is the same as expected and clear it.
In WDDOMODIFYVIEW
IF wd_this->reset = 'X'.
view->reset_view( ).
CLEAR wd_this->reset.
ENDIF.
In your action method
wd_this->reset = 'X'.
Regards
Kameliya
I Presume, third page is a separate view. There are two options:
1. Set the life time of the view to "When Visible" instead of framework controlled
2. Invalidate the node when you navigate back to first page.
Regards
Rohit Chowdhary
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
84 | |
10 | |
9 | |
8 | |
6 | |
6 | |
6 | |
5 | |
3 | |
3 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.