Skip to Content
0
Jan 27, 2007 at 12:27 PM

Dynamic generation of UI element in Web Dynpro

16 Views

Hi All,

I want to add "Link to Action" UI element at runtime and so i added this piece of code in wdDoModifiyView

<b>int i = 0;

if (firstTime)

{

IWDTransparentContainer rootContainer = (IWDTransparentContainer)view.getElement("RootUIElementContainer");

while(i<5)

{

IWDLinkToAction Link1 = (IWDLinkToAction) view.createElement(IWDLinkToAction.class, "Link"+i);

IWDAction theAction = wdThis.wdCreateAction(IPrivateMySavedFormsListCompView.WDActionEventHandler.GENERIC_ACTION,"");

Link1.setOnAction(theAction);

Link1.mappingOfOnAction().addParameter("Command","Link"+i);

rootContainer.addChild(Link1);

i++;

}

}</b>

I had also created a action named GenericAction which has the following format

<b>public void onActionGenericAction(com.sap.tc.webdynpro.progmodel.api.IWDCustomEvent wdEvent, java.lang.String Command)

{</b>................

Now when i run my application i am unable to see the five links can somebody help regarding this

Regards

Sid