Dave Newton wrote:
--- [EMAIL PROTECTED] wrote:
Say, if I want to display an item's value from the
map, what is the syntax?
I tried this, but obviously this was too intuitive.
<s:property value="someMap[someKey]" />
That's what I do. With names changed to protect the
innocent, here's one of my textfields:
<s:textfield
name="exDataMap[%{#result.id}].%{which}[0].foo"/>
Each map entry is a collection of objects with a foo
property. The %{which} is because each map entry has a
few different properties that I need to display based
on a request parameter. #result is a set variable
hence the # to distinquish it from the stack's root.
It's a reasonably complex data structure I'm dealing
with, but so far I haven't had any issues, including
dynamically generating additional rows via JavaScript.
Based on that little example, I nominate Dave as author of the Advanced
Guide to OGNL ;-)
That said, stanlick, what you wrote should do exactly what you were
probably expecting. If not, post what you expected vs. what you got and
any relevant supporting details (what someMap is, what someKey is,
etc.). '...this was too intuitive...' isn't a very descriptive problem
report ;-) [assuming it even was one!]
L.
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]