You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by "Hartrich, James CTR USTRANSCOM J6" <Ja...@ustranscom.mil> on 2007/06/20 16:16:34 UTC

nested s:iterator

How would one iterate a bean's collection<hashmap> "row" values by key
of bean's collection<string> "columnName"? Here's what I have on the
jsp:

<s:iterator id="row" value="bean.tableColumnData" status="rowStatus">
	<s:iterator id="columnName" value="bean.tableColumns"
status="status">
		<s:property value="row.columnName"/>
		<s:property value="#row.columnName"/>
	</s:iterator>
</s:iterator>

Neither s:property shows any values. Can anyone throw me a bone here?
James

---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org


RE: nested s:iterator

Posted by Dave Newton <ne...@yahoo.com>.
--- "Hartrich, James CTR USTRANSCOM J6" wrote:
> Quick follow up to correct myself. This works:
> <s:property value="#row[(#columnName)]"/>

Yeah, that ;)

d.



      ____________________________________________________________________________________
Fussy? Opinionated? Impossible to please? Perfect.  Join Yahoo!'s user panel and lay it on us. http://surveylink.yahoo.com/gmrs/yahoo_panel_invite.asp?a=7 


---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org


RE: nested s:iterator

Posted by "Hartrich, James CTR USTRANSCOM J6" <Ja...@ustranscom.mil>.
Quick follow up to correct myself. This works:
<s:property value="#row[(#columnName)]"/>
I referenced the following documentation
http://www.ognl.org/2.6.7/Documentation/html/LanguageGuide/expressionEva
luation.html
James


-----Original Message-----
From: Hartrich, James CTR USTRANSCOM J6
[mailto:James.Hartrich.ctr@ustranscom.mil] 
Sent: Wednesday, June 20, 2007 9:17 AM
To: Struts Users Mailing List
Subject: nested s:iterator

How would one iterate a bean's collection<hashmap> "row" values by key
of bean's collection<string> "columnName"? Here's what I have on the
jsp:

<s:iterator id="row" value="bean.tableColumnData" status="rowStatus">
	<s:iterator id="columnName" value="bean.tableColumns"
status="status">
		<s:property value="row.columnName"/>
		<s:property value="#row.columnName"/>
	</s:iterator>
</s:iterator>

Neither s:property shows any values. Can anyone throw me a bone here?
James

---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org


Re: nested s:iterator

Posted by Dave Newton <ne...@yahoo.com>.
--- "Hartrich, James CTR USTRANSCOM J6" wrote:
>  <s:property value="#row.columnName"/>

I'd probably try something like #row[#columnName] (or
maybe #row[(#columnName)] to force OGNL to eval
again); I'm doing something similar but I don't have
the example in front of me at the moment.

d.



       
____________________________________________________________________________________Ready for the edge of your seat? 
Check out tonight's top picks on Yahoo! TV. 
http://tv.yahoo.com/

---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org