Thursday, May 21, 2009

Dynamic Columns in UI Table

Discussed here is the UI Table feature that was introduced recently into enovia.

Have you ever run into a situation where the requirement said that the display screen should have multiple columns depending on the input, and we had to write a JSP to implement this, because UI Table could not display multiple columns depending on the input?

This kind of requirement can be implemented using dynamic columns feature in UI Table.

Dynamic Columns in UI Tables

Traditionally we used to define a certain number of columns in the UI Table definition, and all those columns were displayed on the screen.
With dynamic columns feature we can define the number of columns displayed on the screen , on the fly using a JPO.
Here is how you define a dynamic column

UI Table column definition.
• Column Type = Dynamic
• Dynamic Column Program = JPO name
• Dynamic Column Function = JPO method name
In this JPO Method you can define the # of columns that will be displayed on the screen.
The output of this column to should be a Maplist, that will contain the # of maps that is same as the # of columns you want to display.
The format of the Map per column is given below.

if colMap is the Map for one column, then at a minimum the Map should contain.

colMap.put("name", "<Name of the Column>" );
colMap.put("label", "<Lable for the Column>" );
colMap.put("settings",<Map with the settings for the column>);

example for settings Map:

settingsMap.put("Registered Suite","Framework");
settingsMap.put("Admin Type","Type");
settingsMap.put("Target Location","content");


Please let me know if you have any questions.

1 comment:

  1. Hi,

    I want a column in table column file which will dynamically display popup or dropdown list suggestion on the basis of the value entered by user in the textbox.

    ReplyDelete