cancel
Showing results for 
Search instead for 
Did you mean: 

How does the webdynpro java application knows , which view needs to be call

Former Member
0 Kudos

How does the webdynpro java application knows , which view needs to be called.

Case 1:

When there is a single webdynpro component in the project, how would the webdynpro java application know which view in the component needs to be called.

Case 2:

when there are multiple components in the webdynpro project, how would the application know which view in which components needs to be called.

Accepted Solutions (0)

Answers (2)

Answers (2)

Former Member
0 Kudos

Hi Saket,

Go to WD project and expand the applications

1.Seelct one application and doble click on it->Go to appl properties tab

Enter bew property:Sel Predefined and give the Name:"app1" and Value:"app1"

2.Create appl parameters for second applications(Follow the step 1 for app2)

3.In the code->component controller init()->write the below code to select the appl name

<Create a context attribute in comp controller Va_ApplLevel of type String)

IWDApplicationInfo application = wdComponentAPI.getApplication().getApplicationInfo();

String strConfig = application.findInApplicationProperties("app1").getValue();

wdContext.currentContextElement().setVa_ApplLevel(strConfig);

4.Assume that you have 3 views and for appl1 you want to display view 1 and view 2,

For appl2 you want to display view 3 directly.Create context attribute in view1 with same name(Va_ApplLevel)

String strAppLevel = wdContext.currentContextElement().getVa_ApplLevel();

if (("app1").equalsIgnoreCase(strAppLevel))

{

<wrtie some code here for apl1>

}

else if (("app2").equalsIgnoreCase(strAppLevel))

{

<wrtie some code here for apl2>

wdThis.wdFirePlugTo_aView3();

}

Regards,

Lavanya.G

Former Member
0 Kudos

Case 1:

When there is a single webdynpro component in the project, how would the webdynpro java application know which view in the component needs to be called.

-The Application you define for your project is associated with one component and one interfaceview in it. This interface view can be implemented by (only) one window. This window will have a default view. This default view is the one which is called when you run the application.

Case 2:

when there are multiple components in the webdynpro project, how would the application know which view in which components needs to be called

-Even in case of multiple components, each application is associated with only one component and one interface view in it. So, which ever the 'application' that you deploy and run, the correspondent component->interface view->window->its default view will get called.

regards,

amar.s