cancel
Showing results for 
Search instead for 
Did you mean: 

Multiple Models & Conditional Display in Dynamic Table.

Former Member
0 Kudos

Hi

There are 5 models pointing to different systems. The user will randomly select the system and accordingly the models will get executed.

My issue is in the second screen I need to populate a table which should display the data from multiple models at the same time.. I need to loop trough the models and check, the search term entered by the user, in which all system the same is present and accordingly I need to display in table...

Please help me by placing some sample code for looping in multiple output nodes and create table dynamically and display the data in the coloumn...Coloumn numbers are fixed.....

Regards

SU

Accepted Solutions (0)

Answers (1)

Answers (1)

abhimanyu_lagishetti7
Active Contributor
0 Kudos

Hi

I suggest to create a value node to show the results in a view.

and loop at all the model nodes and when match found create an new element for the table and add it to the table node.

This is the code to Create Table and its columns dynamically.

place the code in wdDoModifyView()

IWDTable <tableref> = (IWDTable) view.createElement(IWDTable.class,"<tablename>");

<tableref>.bindDataSource(wdContext.node<node>().getNodeInfo());

IWDTableColumn <colref> =(IWDTableColumn)view.createElement(IWDTableColumn.class,"F");

IWDInputField inf = (IWDInputField )view.createElement(IWDInputField.class,"d");

inf.bindValue(wdContext.node<node>().getNodeInfo().getAttribute("<attribute>"));

<colref>.setTableCellEditor(inf);

<tableref>.addGroupedColumn(<colref>);

IWDTransparentContainer <grp> =(IWDTransparentContainer)view.getElement("RootUIElementContainer");

<grp>.addChild(<tableref>);

Regards

Abhimanyu L