cancel
Showing results for 
Search instead for 
Did you mean: 

Dynamic Programming

Former Member
0 Kudos

hi

i have been trying out with Dynamic programming

in webdynpro for java , and there i am not able to ,

can any one send me a simple dynamic programming

application , that helps in creating a simple form or

table , and this is my first try with dynamic

programmic , a simple exmaple can help me out .

Accepted Solutions (0)

Answers (3)

Answers (3)

Former Member
0 Kudos

hi,

To create a simple table you can use :



if(firstTime)
		{
    
//header for table
    	IWDCaption tablecaption = (IWDCaption)view.createElement(IWDCaption.class,null);
    	tablecaption.setText("Table Test");
    	
    	//header for column "name"
    	IWDCaption columncap1 = (IWDCaption)view.createElement(IWDCaption.class ,null);
         columncap1.setText("name");
    	
    	//header for column "roll"
		IWDCaption columncap2 = (IWDCaption)view.createElement(IWDCaption.class ,null);
		 columncap2.setText("roll");
		
		//creating transparent container		
    	IWDTransparentContainer tc = (IWDTransparentContainer)view.createElement(IWDTransparentContainer.class,"TransparentContainer");
    	
    	//creating table
    	IWDTable table = (IWDTable)view.createElement(IWDTable.class,null);
    	table.bindDataSource("Data");
    	table.setHeader(tablecaption);
    	table.setEnabled(true);
    	table.setVisible(WDVisibility.VISIBLE);
    	
    	//creating column for "name"
    	IWDTableColumn tabcol1 = (IWDTableColumn)view.createElement(IWDTableColumn.class,null);
    	tabcol1.setHeader(columncap1);
		//creating column for "roll"
		IWDTableColumn tabcol2 = (IWDTableColumn)view.createElement(IWDTableColumn.class,null);
    	tabcol2.setHeader(columncap2);
    	
    	//creating colum group
    	IWDTableColumnGroup tabgr = (IWDTableColumnGroup)view.createElement(IWDTableColumnGroup.class,null);
    	
    	//adding coumn "name and "roll" to column group
    	tabgr.addColumn(tabcol1);
		tabgr.addColumn(tabcol2);
		
		//adding column group to table	
    	table.addGroupedColumn(tabgr);
    	
    	//adding table to transparent container
    	tc.addChild(table);
    	
    	//adding transparent container to "RootUIElementContainer"
    	IWDTransparentContainer root = (IWDTransparentContainer)view.getElement("RootUIElementContainer");
    	root.addChild(tc);		
	 
	
		}  

regards,

pinki

Former Member
0 Kudos

Hi,

Hope this links may help you

for dynamic creation of UIElements:

[https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/6fdae690-0201-0010-a580-d104b459cb44]

[https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/58a7e390-0201-0010-abb1-8eec7eb7a2ec]

[http://help.sap.com/saphelp_nw04/helpdata/en/c0/ead8a21ba49f4896c64851677f8ec9/content.htm]

[https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/49f2ea90-0201-0010-ce8e-de18b94aee2d#34]

[https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/74cda090-0201-0010-6b91-f85b2489f765]]

for Form creation

[https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/5f27e290-0201-0010-ff82-c21557572da1]

Thanks & regards

Kavitha

Edited by: kavitha s on Apr 4, 2008 7:56 AM

Former Member
0 Kudos

Hi,

Pl go through this link

https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/49f2ea90-0201-0010-ce8e-de18b94a...

their you can find a an application with code sample.

Regards

Ayyapparaj