You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tapestry.apache.org by Jeff Stevens <js...@yahoo.com> on 2004/08/06 00:36:49 UTC

using with foreach

I have an application that iterates through a list of
messages and displays them.  The group of messages
differ based upon some conditional.  The messages are
stored in a .properties file associated with the page.

I would like to use some HTML in a Tapestry page
similar to the following, but it doesn't work. Any
ideas on how to make this work?

Thanks,
Jeff

<span jwcid="@Conditional"
condition="ognl:Request.success">
<h2>List of messages</h2>

<ul jwcid="@Foreach" source="ognl:Request.getAList ()"
value="ognl:ListItem">
<li><span key="ognl:ListItem">A message</span></li>
</ul>
</span>






		
__________________________________
Do you Yahoo!?
Yahoo! Mail is new and improved - Check it out!
http://promotions.yahoo.com/new_mail

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


Re: using with foreach

Posted by Erik Hatcher <er...@ehatchersolutions.com>.
<span key="..."> doesn't use expressions - it's designed for static key 
names.

If you want messages dynamically, one option is:

	<span jwcid="@Insert" value="ognl:getMessage(ListItem)"/>

Erik


On Aug 5, 2004, at 6:36 PM, Jeff Stevens wrote:

> I have an application that iterates through a list of
> messages and displays them.  The group of messages
> differ based upon some conditional.  The messages are
> stored in a .properties file associated with the page.
>
> I would like to use some HTML in a Tapestry page
> similar to the following, but it doesn't work. Any
> ideas on how to make this work?
>
> Thanks,
> Jeff
>
> <span jwcid="@Conditional"
> condition="ognl:Request.success">
> <h2>List of messages</h2>
>
> <ul jwcid="@Foreach" source="ognl:Request.getAList ()"
> value="ognl:ListItem">
> <li><span key="ognl:ListItem">A message</span></li>
> </ul>
> </span>
>
>
>
>
>
>
> 		
> __________________________________
> Do you Yahoo!?
> Yahoo! Mail is new and improved - Check it out!
> http://promotions.yahoo.com/new_mail
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: tapestry-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: tapestry-user-help@jakarta.apache.org


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