on 08-30-2007 8:40 PM
Situation:
In the moment i created the tabs and the containers dynamic, but when i choose one specific tab i need to create in runtime a ViewContainer and embed an existing view inside it.
I would like to know if is it possible???
Hi Rodrigo,
There is no API support to embed a View into the View container dynamically. But I tried this way...this is mix of static and dynamic way of doing..
- Created TabStrip under root container.
- Created a ViewContainerUIElement under root container and embeded the view inside it.
in the wdModifyView() I have done following code:
if(firstTime)
{
//get the root container
IWDTransparentContainer root = (IWDTransparentContainer)view.getElement("RootUIElementContainer");
//get the tab strip dynamically
IWDTabStrip tabStrip = (IWDTabStrip)view.getElement("tab_strip");
//Create a tab...
IWDTab newtab =(IWDTab)view.createElement(IWDTab.class,"tab1");
//get the View cotnainer element
IWDViewContainerUIElement viewEle = (IWDViewContainerUIElement)view.getElement("vc12");
//remove the View container from root
root.removeChild("vc12");
//Create a transaprent container
IWDTransparentContainer trans = (IWDTransparentContainer)view.createElement(IWDTransparentContainer.class,"trans_container");
//set the transparent container to tab content
newtab.setContent(trans);
//Add the view container to transpernt container
trans.addChild(viewEle);
//Add the tab to tabstrip
tabStrip.addTab(newtab);
}
And also its not possible to add the same Element mulitple times to different containers.
Regards
Abhilash
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
87 | |
10 | |
10 | |
10 | |
7 | |
6 | |
6 | |
5 | |
5 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.