on 02-15-2007 8:19 PM
can anyone guide me to create dynamic button? Thank you,
Hi Pankaj,
This is what you need:
public static void wdDoModifyView(IPrivateStamappView wdThis, IPrivateStamappView.IContextNode wdContext, com.sap.tc.webdynpro.progmodel.api.IWDView view, boolean firstTime)
{
//@@begin wdDoModifyView
if (firstTime){
IWDButton button = (IWDButton) view.createElement(IWDButton.class,"myButtomid");
IWDTransparentContainer myCont = (IWDTransparentContainer) view.getRootElement();
myCont.createLayout(IWDMatrixLayout.class);
myCont.addChild(button,0);
}
//@@end
}
Regards
Nir
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
thanks a lot
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
wdDoModifyView(...)
{
IWDButton button = (IWDButton) view.createElement(IWDButton.class, null);
button.setOnAction(wdThis.wdGet<Action>Action());
<someContainer>.addChild(button);
}
If you have defined an action named <Action> with a text and an icon, the button will inherit text and icon from that action and pressing the button will call the event handler of that action.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
93 | |
10 | |
10 | |
9 | |
9 | |
7 | |
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.