Assume that the ActionForm has the getter for the below "myhashtable" that
returns a Map.

Assume that the .value returns an Array of Strings (or whatever)

I want to build a <table> with 4 columns in it with the <logic:iterate> .

I copied the below code from the STRUTS Developers Guide:

<logic:iterate id="element" name="myhashtable">
Next element is <bean:write name="element" property="value"/>
</logic:iterate> 

Assume that a typical record is like:
Map.key = "myKey"
Map.value = [ "myvalue", "mydesc", "myotherdata" ]

But, how do I get the 0th, 1st, 2nd, etc. columns data out of the .value?

Does this work?
<logic:iterate id="element" name="myhashtable">
Next element key is <bean:write name="element" property="key"/>
Next element value 0 is <bean:write name="element" property="value[0]"/>
Next element value 1 is <bean:write name="element" property="value[0]"/>
Next element value 2 is <bean:write name="element" property="value[0]"/>
</logic:iterate> 

What if .value was a Class like 
public class myRecord{
        .getValue()
        .getDesc()
        .getOtherData()
}

How would you call the getters to get the data?

All help is appreciated.
Robert


--
To unsubscribe, e-mail:   <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>

Reply via email to