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

Dynamic Table and colomn creation

Dear All,

I want to create dynamic table and column cretion in webdynpro JAVA. Kindly suggest me or send some source code so that i can understand.

Thanks And Regards

Kumar Rakesh

Add a comment
10|10000 characters needed characters exceeded

Assigned Tags

Related questions

3 Answers

  • author's profile photo Former Member
    Former Member
    Posted on Dec 17, 2008 at 08:28 AM

    Hi,

    Please go through this threads,

    dynamic-table

    Regards,

    ramesh

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Dec 17, 2008 at 08:43 AM

    Did you search this forum?

    Armin

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Dec 19, 2008 at 08:49 AM

    Hi,

    Create IWDTable, Nodes and Attributes

    if( firstTime)
        {
        	IWDTransparentContainer container = (IWDTransparentContainer)view.getElement( "RootUIElementContainer");
        	IWDTable my_table = (IWDTable)view.createElement( IWDTable.class, "my_table");
        	IWDNodeInfo table_node = wdContext.getNodeInfo()
        		.addChild( "table_node", null, true, true, true, false, true, false, null, null, null);
        	my_table.bindDataSource( table_node);
        	for( int i = 0; i < 5; i++)
        	{
        		IWDAttributeInfo info = table_node.addAttribute( "Attrib_" + i, "ddic:com.sap.dictionary.string");
        		addColumn( my_table, "Attrib_"+i, info);	
        	}
        	container.addChild( my_table);
        }
    

    Adding Table Columns

     private static void addColumn( IWDTable table, String column_name, IWDAttributeInfo atrib_inf)
    	{ 
    	 /**
    	  * To create more Table columns Dynamically.
    	  */
    		 IWDTableColumn tab_clm = (IWDTableColumn)table.getView()
    			  .createElement( IWDTableColumn.class, column_name);
    		 IWDTextView tab_txtview = (IWDTextView)table.getView()
    			  .createElement( IWDTextView.class, null);
    
    		 tab_clm.setTableCellEditor( tab_txtview);
    		 tab_txtview.bindText( atrib_inf);
    		 table.addColumn( tab_clm);			
    	}
    

    vinod

    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.