cancel
Showing results for 
Search instead for 
Did you mean: 

Dynamic Ui

Former Member
0 Kudos

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

Accepted Solutions (0)

Answers (3)

Answers (3)

Former Member
0 Kudos

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

former_member201361
Active Contributor
0 Kudos

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

Former Member
0 Kudos

Hi Ankita,

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

Regards,

Deepak

Former Member
0 Kudos

hi Deepak,

actaully i hv two buttons.

one shows a popup msg for the mail being successfully sent.

and the other was is a 'TO' btn which shows the email address view..

Former Member
0 Kudos

Hi,

Can u be a little bit clear of ur problem.

U have 2 buttons.Among 2 first one is popup msg and the second one is To button...

So whats going wrong in ur application.

Create 2 actions and bind them to 2 buttons and try??

Regards

Padma N

Former Member
0 Kudos

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

Former Member
0 Kudos

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