I have a POJO that has a Map object in it. Inside the map are a bunch
of properties I'd like to display, which are strings and ints.
What I am trying to get around is having to construct getters and
setters for all the properties, but I still want to use the Contrib
Table. (the quantity and names of the properties in the Map are
dynamic, loaded from a DB.)
Usually, it's accessed like this:
mypojo.mymap.get("SomePropertyX");
So a getter in my POJO would look like:
String getSomepropertyX()
{
//type safety ftw!
return (String) mypojo.mymap.get("SomePropertyX");
}
The table would have columns of "Property Name" and "Property Value"
So how would this be completed in my page spec? :
<component id="table" type="Contrib:Table">
<binding name="source" value="mypojo"/>
<binding name="columns" value="?????????1, ????????2"/>
<binding name="columnsClass" value="literal:title"/>
<binding name="pageSize" value="10"/>
</component>
<component id="?????????????" type="Block"/>
<component id="?????????" type="Insert">
<binding name="value" value="components.table.tableRow.????????2"/>
</component>
Thanks for any help,
Daniel
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]