on 12-20-2012 11:30 AM
Hello Experts,
I am creating a search page , I created a view set including search(empty) and result view(table view)
I added advance search tag in .htm file of search view
<thtmlb:advancedSearch id = "advs0"
fieldMetadata = "<%= controller->GET_DQUERY_DEFINITIONS( ) %>"
header = "<%= BTQ1ORDER->get_param_struct_name( ) %>"
fieldNames = "<%= controller->GET_POSSIBLE_FIELDS( ) %>"
values = "//BTQ1ORDER/PARAMETERS"
maxHits = "//BTQ1ORDER/max_hits"
onEnter = "search"
ajaxDeltaHandling = "false" />
Now on row select of result table I am navigating to a detail view
From ther by clicking i want to come back to the main view set
Here,
Onclicking back I am able to come back to the view set but the search parameters of search view(empty view with adv search tag included in .htm page)
are not getting displayed , (But the Search Button of the page is getting displayed )
Why the search parameters are not getting displayed & How can i solve this ,?
Hi Abdul,
You need to use breadcrumbs for this. First, you have to code in WD_DESTROY of your View here
do the following coding
RAISE EVENT history_trigger.
CALL METHOD super->wd_destroy.
Now Do coding in State_store and State_restore method, These two Methods are called only if you do History Trigger in WD_DESTROY, While navigating to a new view State_store is called and While coming back State_restore is called
method IF_BSP_WD_HISTORY_STATE~STATE_STORE.
DATA:
lr_ent TYPE REF TO cl_crm_bol_dquery_service.
* Before Navigating to next pageStore the search criteria into state container
lr_ent ?= me->search->collection_wrapper->get_first( ).
IF lr_ent IS BOUND.
state_container->add_item( im_name = 'SearchView'
im_value = lr_ent ).
ENDIF.
endmethod.
After State_store is Done, we need to Restore it, for this do coding in STATE_RESTORE
method IF_BSP_WD_HISTORY_STATE~STATE_RESTORE.
DATA:
l_ref_ent TYPE REF TO cl_crm_bol_dquery_service.
* Get previously stored data from state container
state_container->get_item( EXPORTING im_name = 'SearchView'
IMPORTING ex_value = l_ref_ent
EXCEPTIONS OTHERS = 0 ).
IF l_ref_ent IS BOUND.
* add it to the node
me->search->collection_wrapper->add( iv_entity = l_ref_ent
iv_set_focus = abap_true ).
ENDIF.
endmethod.
Thanks and Regards
Pratheek
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi everyone,
for those who still struggle with this problem:
I had a similiar issue which happend not only when I hit the Back-Button but also when I visited the page a second time. In my case it has been a model-problem, so try to check if some of your models are being initialized multiple times by having a look at the M_MODELS-attribute in your view-controller. If you notice that some models are listed multiple times,this might cause the issues concerning displayed fields since the displayed ones might be from an outdated model while you're trying to manupulate a new one!
Just my two cents in case someone stumbles over the same problem
Greetings,
Thomas
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Abdul,
Have you bounded your search context node to component controller?
Regards
Rajarama U
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
8 | |
1 | |
1 | |
1 | |
1 | |
1 | |
1 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.