cancel
Showing results for 
Search instead for 
Did you mean: 

Dynamic embedding 1 view in several tabs

Former Member
0 Kudos

Hello,

Im quite new to Web dynpro but im trying to create a tabstrip with several tabs which i create dynamically in the wdDoModifyView. I want the tabs to contain the same custom view i made. This doesnt sounds logical but they want the tabs because of the way it looks but its quite strange to have tabs when all the tabs show the same view.

My question is how can i instantiate my view dynamically? I tried something like this but it doesnt work...


//create a tab
IWDTab queueTab = (IWDTab)view.createElement(IWDTab.class, null);
IWDCaption queueTabHeader = IWDCaption)view.createElement(IWDCaption.class, null);
queueTabHeader.setText(queue.getName());
queueTab.setHeader(queueTabHeader);
queueTabStrip.addTab(queueTab);
//insert the taskviewcontainer element
ViewContainerUIElement taskView = ViewContainerUIElement)view.createElement(TaskView.class, null);
queueTab.setContent(taskView);

Can anyone tell if this is possible?

Thanks in advance,

Hugo Hendriks

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hugo,

Refer Valery`s nice solution @

All the best,

~ Bala.

Answers (1)

Answers (1)

Former Member
0 Kudos

Hugo,

Start simple. Try to embed this view statically, i.e. create ViewElementContainer for every tab and try to place same view several times in Window designer (depending on IDE version you may fail even at this stage). Then run application -- it reports error that same view may not be used multiple times in the same window.

So first thing you have to do is to extract view into separate component, then create several component usages and place InterfaceView in ViewElementContainer.

Do you really need to do this dynamically? It's fairly complex...

Valery Silaev

EPAM Systems

http://www.NetWeaverTeam.com

Former Member
0 Kudos

mmmm...it looks quite complex like you said. I guess i can do without it and just use plain buttons.

Thx for the possible solutions though...maybe for future stuff.

grtz

Hugo