Vita Rara: A Life Uncommon

Maybe another way?

I have not tried this, but reading this http://struts.apache.org/2.x/docs/type-conversion.html, I think the implication is that you should be able live without myEntitiesMap

You need a file called: EditMyEntitiesAction-conversion.properties with content

KeyProperty_myEntities=id
Element_myEntities=MyEntity
CreateIfNull_myEntities=false

Then you can use:

<s:iterator value="myEntities">
<s:textfield name="myEntities(%{id}).value" value="%{value}" />
</s:iterator>

Although whether it *actually* works is TBD

Tim Azzopardi

PS there is a full example of this at http://forums.opensymphony.com/thread.jspa?threadID=50841&tstart=0 towards the end.
(although it looks like the technique may have issues)

Reply

Please solve the math problem above and type in the result. e.g. for 1+1, type 2
  • Allowed HTML tags: <a> <img> <em> <strong> <cite> <code> <ul> <ol> <li> <dl> <dt> <dd> <pre> <h1> <h2> <h3>
  • Lines and paragraphs break automatically.
More information about formatting options