Skip to Content
0
Former Member
Oct 14, 2003 at 10:39 AM

Dynamic WebDynpro Controls

43 Views

Hi,

I have a problem in my Application...the code is produced below.

Created a webDynpro application with two views View1 & View2.

Modify view of View1 is copied below...

________________________________

public static void wdDoModifyView(IPrivateUser wdThis, IPrivateUser.IContextNode wdContext, com.sap.tc.webdynpro.progmodel.api.IWDView view, boolean firstTime)

{

//@@begin wdDoModifyView

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

IWDAction GO = null;

IWDDropDownByIndex ddlist = (IWDDropDownByIndex)

view.createElement(IWDDropDownByIndex.class, "Mydropbox");

ddlist.bindTexts("MonthsOfYear.MonthName");

container.addChild(ddlist);

IWDButton myButton = (IWDButton) view.createElement(IWDButton.class, "MyButton");

myButton.setText("Hello");

myButton.setOnAction(GO);

myButton.setDesign(WDButtonDesign.EMPHASIZED);

myButton.setSize(WDButtonSize.DEFAULT);

container.addChild(myButton);

//container.addChild(myButton);

//@@end

}

-

-


Then I have created Action for "GO" set as in Modifyview and also event Handler

onActionGO to it.

Created outbound Plug inView1 and also Inbound plug in View2 and set the onActionGo

as below

-

-


public void onActionGO(com.sap.tc.webdynpro.progmodel.api.IWDCustomEvent wdEvent )

{

//@@begin onActionGO(ServerEvent)

wdThis.wdGetContext().setLeadSelection(12);

wdThis.wdFirePlugOutbound();

//@@end

}

This doesn't take me to the View2.

I need help in this.

Thanks

Suresh