Skip to Content
author's profile photo Former Member
Former Member

Dynamic Ui

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

Add a comment
10|10000 characters needed characters exceeded

Assigned Tags

Related questions

3 Answers

  • Posted on Jun 18, 2008 at 05:45 AM

    Hi Ankita,

    Will you bit clear on what you want to achieve on the button action.

    Regards,

    Deepak

    Add a comment
    10|10000 characters needed characters exceeded

    • 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

  • Posted on Jun 18, 2008 at 06:26 AM

    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

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Jun 18, 2008 at 08:06 AM

    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

    Add a comment
    10|10000 characters needed characters exceeded

Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.