cancel
Showing results for 
Search instead for 
Did you mean: 

Exit plug to set URL parameter

ashish_shah
Contributor
0 Kudos

Hi Experts,

I am using the Exit plug in Interface view to set a theme for my webDynpro application.

In my WebDynpro DC's Component controller i have written some code in WDDoInint().

Now when i execute the application , i see that the code written in WDDoInit() of component controller is executed before calling the onPlugDefault() method of interface view.

I am trying the understand the sequence in the webDynpro application execution.

Can you please explain the sequence of the code execution in this scenario.

1) code in component controller's WDDoInit()

2) code written in view controller's WDDoInti()

3) code wirtten in interface view's onPlugDefault() method.

Thanks in advance for your help.

Regards,

Ashish Shah

Accepted Solutions (0)

Answers (1)

Answers (1)

Former Member
0 Kudos

Hi Ashish,

The order you have there seems correct.

1. & 2. WDDoInit() is always called when the component is created. It is always the first thing that is called by the Web Dynpro environment.

3. Is called when the application is started

I'm wondering about your theme....what is it's purpose?

Jeschael

ashish_shah
Contributor
0 Kudos

Hi Jeschael,

Thanks for your response.

The purpose of my theme is to set the theme for the webDynpro application when it is displayed in the URL.

I have defined an exit plug in the interface view.

I am setting the portal theme for the application in the method onPlugDefault() of interface view.

hope i am clear on the purpose of theme.

I did not understand this:

3. Is called when the application is started

what do you mean by starting the application ? can you please elaborate on this.

Regards,

Ashish shah

Former Member
0 Kudos

Take a look at your application. (Should be in WebDynpro->Applications)

You will see a small list

1. Web Dynpro Component

2. Interface view

3. Startup plug.

This is also the order in initialization/start-up. In this application you decide what is started.

Jeschael

ashish_shah
Contributor
0 Kudos

Hi Jeschael,

I am foolowing this thread to set the webDynpro theme using exit plug []

my code in the interface view's onPlugDefault() method looks like this:


String URLParams = WDWebContextAdapter.getWebContextAdapter().getRequestParameter("sap-cssurl");

if (URLParams == null){
WDDeployableObjectPart currentAppPart = wdThis.wdGetAPI().getComponent().getApplication().getDeployableObjectPart();
String a=WDURLGenerator.getApplicationURL(currentAppPart);

wdThis.wdFirePlugThemeplug(a+"?sap-cssurl=http://<host>:<port>/webdynpro/resources/sap.com/tc~wd~dispwda/global/SSR/themes/sap_standard");

}
}

now what i want is to execute this code and set my theme for this application once the webdynpro application is loaded in the URL.

my webDynpro URL without theme would look like :

http://<host>:<port>/webdynpro/dispatcher/sap.com/dc_wdtst2/WDDC2App

when the URL parameter is appended the theme would look like:

http://<host>:<port>/webdynpro/dispatcher/sap.com/dc_wdtst2/WDDC2App?sap-cssurl=http://<host>:<port>...wddispwda/global/SSR/themes/sap_standard

Now do you think that i have put this code in the correct place (in interface view's onPlugDefalut() method )?

Ashish Shah

former_member197348
Active Contributor
0 Kudos

Hi Ashish,

Just try to put this code in wdDoInit() of view Controller. I am successfully catching URL parameters in view controller's wdDoInit().

regards,

Siva