cancel
Showing results for 
Search instead for 
Did you mean: 

Set default view from parameter value

Former Member
0 Kudos

Hi,

in my Webdynpro component, i have two views and i would like to decide which view to display from one parameter recovered in method HANDLEDEFAULT of the main window.

By default, the main view is displayed, but i need to display detail view in somes cases.

Thanks for your help.

Accepted Solutions (0)

Answers (2)

Answers (2)

ramakrishnappa
Active Contributor
0 Kudos

Hi Eric,

Simple way of handling your requirement is to use navigation plugs.

Directly, you can define navigation links to views from window outbound plug. and can trigger to target view based on parameter.

Other way,your requirement can be achieved as below

  • Create an attribute GV_PARAMETER in component controller
  • Inside the HANDLEDEFAULT event handler method, set the attribute

               WD_COMP_CONTROLLER->GV_PARAMETER = LV_URL_PARAMETER

  • Now, inside the MainView, you can decide which have to shown.

               if     wd_comp_controller->gv_parameter = 'V_ONE'.

                         WD_THIS->FIRE_OUT_TO_ONE_PLG( ).

               ELSE.

                         WD_THIS->FIRE_OUT_TO_TWO_PLG( ).

               ENDIF.

Hope this helps you.

Regards,

Rama

Former Member
0 Kudos
former_member211591
Contributor
0 Kudos

Hi Eric,

this is the answer, so what's the problem?

regards...