[EMAIL PROTECTED] wrote:
Here are the details:
My jsp is iterating over a list of Beans. Each bean contains a Map of
key/value pairs <both Strings>, and a property that reflects the item
chosen
previously from the Map <the key>. On my "list" page, I want to display
the
values that correspond to the keys selected.
Here is my iterator, which I understand makes available each bean to the
root of OGNL. I can display employeeId or employees, so they are each
clearly visible. So why does this syntax not display the value for the
key?
<s:iterator value="#request.list">
<s:property value="employees[employeeId]" />
P.S. This seems so elementary!
Hmm, I'm not sure what this has to do with the discussion of s:select,
but OK... So, you have a request attribute named 'list' which is a list
of beans of some type X. The type X has a property M of type
Map<String,String> and a property K of type String which is the value of
a key in M.
So what are 'employees' and 'employeeId'? Are those the real names of
the properties M and K? If so, what you have there looks right. What
happens if you write the following:
<s:property value='employees'/>
<s:property value='employeeId'/>
<s:property value='employeeId.class'/>
<s:property value='employees.keys[0].class'/>
Perhaps something isn't of the type you think it is, or isn't exposed
with the name you think it is. I'm guessing at what your data structures
look like since you haven't posted the relevant code, but a bit of
digging and experimenting like above should let you figure out where the
mis-match is.
L.
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]