tags:

views:

78

answers:

1

Imagine a POJO "Employee" which has three properties.

public Class Employee{
private String id;
private String name;
private double salaray;
}

I have a method that fetches list of Employee. In jsp i display the list with tag.

<s:iterator value="listEmployee">
<s:property value="id"/>
<s:property value="name"/>
</s:iterator>

As you can see, I have displayed only two columns inside iterator. Now in my case, how do i add the field salary inside iterator dynamically?

This is small example relevant to my actual situation. Can anyone throw some light?

A: 

dynamic in the "rendering/display" sense. Like say the code displays a table with two columns id and name. Now on some action, how do i display the salary column also...?