on 06-18-2008 6:40 AM
i want to create an application dynamically, bt nt using backend data(i.e ajava prog of somebackend.java).
the layout is created bt im stuck up with button action.
plz help.
are there any pdfs for it.
Thanks,
ankita
Try this code
// in wdDoModifyView method
if( firsttime){
IWDButton sendButton, toButton;
IWDTransparentContainer container = (IWDTransparentContainer)view.getElement( "RootUIElementContainer");
container.addChild( sendButton = (IWDButton)view.createElement( IWDButton.class, "sendButton"));
sendButton.setText( "Send");
sendButton.setOnAction( wdThis.wdGetSndActionAction());
container.addChild( toButton = (IWDButton)view.createElement( IWDButton.class, "cancelButton"));
toButton.setText( "To:");
toButton.setOnAction( wdThis.wdGetPopActionAction()); }
// two Actions
public void onActionsndaction(com.sap.tc.webdynpro.progmodel.api.IWDCustomEvent wdEvent )
{
//@@begin onActionsndaction(ServerEvent)
wdComponentAPI.getMessageManager().reportSuccess( "Message is been sent");
//@@end
}
// second action for popup
public void onActionpopAction(com.sap.tc.webdynpro.progmodel.api.IWDCustomEvent wdEvent )
{
//@@begin onActionpopAction(ServerEvent)
IWDWindow wind = wdComponentAPI.getWindowManager().createModalWindow(
wdComponentAPI.getComponentInfo().findInWindows( <windowname>));
wind.setWindowPosition( 150, 150);
wind.show();
//@@end
}
Regards
Vinod V
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
hi,
just create the button dynamically in the domodify method of the View Controller and Bind the action to it .
for eg :
IWDButton addRowButton = view.createElement(IWDButton.class);
IWDAction addRowAction = view.getAction("Name of ur action created for the button");
addRowButton.setOnAction(addRowAction);
when we are creating the button dynamically , we have create a action in the view .
In the View Editor select the action tab and create the action .
and set the action to the button.
in the action method write the functionality for the corresponding button action.
Thanks and Regards
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Ankita,
Will you bit clear on what you want to achieve on the button action.
Regards,
Deepak
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
Go through his link
http://help.sap.com/saphelp_nw04/helpdata/en/24/4e70c63574ec4284d0f47324ab2d0e/frameset.htm
In this link go to tutorials->User Interface Tutorials->Dialog boxes in Webdynpro Application
Regards
Padma N
Hi Ankita,
one shows a popup msg for the mail being successfully sent.---is this working fine for that you have to open a window. Code for that is :-
IWDConfirmationDialog cWin = wdComponentAPI.getWindowManager().createConfirmationWindow("your msg",
wdThis.wdGetAPI().getViewInfo().getViewController().findInEventHandlers("Ok"), "Btn Label");
cWin.open();
first parameter is youe msg, 2nd is event handlerinfo, 3rd is String label.
and the other was is a 'TO' btn which shows the email address view..---- for that you have to create plug to navigate to the 2 nd view. You need to create a inbound and outbound plug to achive the navigation. inbount for the 2nd view and outbond for the 1st view coz you are navigation from the 1st view to 2nd view. on the action of button fire the plug action.
Hope that may help you......
Regards,
Deepak
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.