cancel
Showing results for 
Search instead for 
Did you mean: 

Dynamic Table Creation

Former Member
0 Kudos

Hi,

Can someone tell me how do we create a dynamic table in the NWDS??

When there is not data in the table .it must be invisible.

When there is data in the table we must vary the size accordingly.

Please help.

Thanks,

Supriya Manik.

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Shayam,

I need a table .It must be seen only when there is some data in table.

If there is not data then the table must not be visible in the View at the runtime.

This is to be done for a Webdynpro application.

<b>NWDS</b>

How do we do that??

<b>if its size is 0, set the visibility of the table to 'none'.</b>

is this to be done coding wise??

or the properties of the table has to be set?

Former Member
0 Kudos

Hi Supriya,

You can do it like this:

Add the following code in wdModifyView-

int size = wdContext.node<node to which the table is bound>.size();

if(size==0)

{

IWDTable tab = (IWDTable)view.getElement("<table name>");

tab.setVisible(WDVisibility.NONE);

}

Regards,

Shyam.

Former Member
0 Kudos

and cant we dynamically set the table size like if the no.of records are 2,then there must be only 2 rows in the table??

Former Member
0 Kudos

Hi Supriya,

Bind the corresponding property(visibleRowCount)of the table to a context attribute of type int. Then, in the code, based on the size of the node bound to the table u can change the value of this attribute.

regards,

Shyam.

Answers (1)

Answers (1)

Former Member
0 Kudos

Hi Supriya,

Your requirement is not clear. Do you want to create a table in a webdynpro application?? if yes, then you will have to check the size of the node to which the binding is done for the table. if its size is 0, set the visibility of the table to 'none'.

Regards,

Shyam.

Former Member
0 Kudos

Edited

Message was edited by:

Supriya Manik

Former Member
0 Kudos

syamgopal@ivl.co.in

Regards,

Shyam.