on 12-30-2004 12:18 PM
Hello,
if a view is assigned to a window, you can choose in the properties the default value true or false.
Normally I´m using the plugs to call the different views
in a window.
Unfortunately the plug does not work if the same view is assigned twice to a window, by using different ViewContainer. Only one View should be active at the same time. It works fine if I change it manually in the properties.
But I did not find a way to get access to this setting by using IWDView, IWDViewInfo ...
Is it possible to change the default value of the view?
Thanks and Regards, Mario
Hallo Mario,
the dynamical manipulation of view compositions is currently not documented. The solution for your relatively simple scenario looks like this:
<b>1.) Declaratively assign an id to the embedded view</b>
For an easy programmatic access to the embedded view 'HugoView' (or better to the corresponding view usage info) you first have to assign an <b>ID</b> to it declaratively.
In the Web Dynpro Explorer select the view you embedded into a window e.g. view "HugoView" in view area "VictorViewArea" in view set "CharlyViewSet" in window "FoxtrottWindow". Select the properties view and enter the id-property-value "HugoViewId". This ID is not defined by default - but the Web Dynpro View Manager creates an own id itself.
<b>2.) Controller Coding </b>
With the defined view ID it is quite simple to access the corresponding <i>IWDViewUsageInfo</i>-object in the controller coding:
IWDWindowInfo windowInfo = wdComponentAPI.getComponentInfo().findInWindows("FoxtrottWindow");
IWDViewUsageInfo viewUsageInfo = windowInfo.getViewUsageByID("HugoViewId");
IWDViewContainerAssignmentInfo parent = viewUsageInfo.getEmbeddingViewContainerAssignment();
parent.setDefaultViewUsage(viewUsageInfo);
That's all. Your view 'HugoView' will be displayed in the initial view assembly as default view.
Regards, Bertram
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Bertram,
Is this only possible at WDDOINIT method? I could use to do this at WDDOMODIFYVIEW if possible because I am receiving a URL parameter from the Window's HANDLEDEFAULT method and setting the context. Since WDDOINIT runs before this HANDLEDEFAULT, I don't have the URL parameter at this time yet.
Is there a way to get the URL parameter first and then call this?
Thanks,
Ogeday
User | Count |
---|---|
101 | |
13 | |
13 | |
11 | |
11 | |
7 | |
6 | |
5 | |
4 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.