struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Dave Newton <newton.d...@yahoo.com>
Subject Re: differences btw <s:property\> and <s:property value="#this"/>
Date Mon, 16 Jun 2008 20:54:59 GMT
Because "#this" is mapped to the top of the stack? (It's marginally more complicated than that;
"#this" means "the current object", which depends on context. It pops up in projections as
well.)

Could be wrong, though.

Dave


--- On Mon, 6/16/08, Bruno Cavestro <bruno.cavestro@actoll.com> wrote:

> From: Bruno Cavestro <bruno.cavestro@actoll.com>
> Subject: differences btw <s:property\> and <s:property value="#this"/>
> To: "Struts Users Mailing List" <user@struts.apache.org>
> Date: Monday, June 16, 2008, 11:49 AM
> Hy
> Given the two pieces of codes can you explain me how can i
> get same output?
> A:
>    <s:iterator value="myList">
>         <s:property /><br>
>       </s:iterator>
> This produces correctly the following
> John<br>
> Steve<br>
> 
> B:
>  <s:iterator value="myList" >
>         <s:property
> value="#this"/><br>
>       </s:iterator>
> And this produces
> [John, alfa.test@13eaab,
> com.opensymphony.xwork2.DefaultTextProvider@1d1695e]]<br>
> [Steve, alfa.test@13eaab,
> com.opensymphony.xwork2.DefaultTextProvider@1d1695e]]<br>
> 
> 
> given that myList is an arraylist containing Strings....
> 
> 
> Thanx
> 
> 
> ---------------------------------------------------------------------
> 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


Mime
View raw message