on 09-20-2005 1:48 PM
i have go two views view1 and view2 in my web dynpro component
In View1 i am having ViewContainer and a Button,
on action of the Button i am inserting View2 in the ViewContainer but the viewcontainer netiher showing the view2 or throwing any exception.
if i keep the same code in wdDoInit method everything works fine but the same code is not working in Button action
what could be the reason ?
Hi
Both views exist in the same web dynpro component
The fallowing is the code snippet
-
IWDWindowInfo winInfo=wdComponentAPI.getComponentInfo().findInWindows("One");
IWDViewUsageInfo viewUsage= winInfo.getViewUsageByID("OneViewID");
IWDViewContainerAssignmentInfo viewarea=(IWDViewContainerAssignmentInfo)viewUsage.getViewContainerAssignments().iterator().next();
IWDViewUsageInfo newUsage=viewarea.createEmbeddedViewUsage();
IWDViewInfo insertView=wdComponentAPI.getComponentInfo().findInViews("Secondview");
newUsage.setView(insertView);
viewarea.setDefaultViewUsage(newUsage);
-
The above snippets works fine in the wdDoInit method but the same code is not working if i place it in the button action
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Praveen,
In general, you may not alter view layout in this way after wdDoInit of view already executed (i.e. view controller has been created) -- WD will not show neither error nor view.
However, you may try to create outbound plug in main view, inbound in internal view, then create dynamically navigation link and fire it -- under certain conditions this technique incarnate "internal" view. (you may read this as "default view usage" behavior does not applied automatically).
Valery Silaev
EPAM Systems
Hi Praveen,
Please explain the problem in Detail.
Both the views are in same component or different ?
Please post the code also.
Regards, Anilkumar
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
88 | |
10 | |
10 | |
9 | |
7 | |
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.