You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by pls <ab...@hotmail.com> on 2004/06/07 20:44:34 UTC

logic:iterate beans and el

'bean1' is a bean created by logic:iterate and contains 'myHashMap'.

I am trying to access the 'key' property of the bean so that i can set the
property -'prop1'.

setting the value of 'prop1' changes the value returned from the getter for
'prop2'.

I have tried the following but it sets 'prop1' to the string literal
"pageScope.bean1.key" instead of the evaluated expression for the bean.  i
am new to struts with el so any help is greatly appreciated.  perhaps it is
just a simple config error on my part..

    <logic:iterate id="bean1" name="aForm" property="myHashMap">

          <jsp:setProperty name="aForm" property="prop1"
value="${pageScope.bean1.key}"/>

          <bean:write name="aForm" property="prop2"/>

     </logic:iterate>




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


Re: logic:iterate beans and el

Posted by pls <ab...@hotmail.com>.
thanks for the reality check rick

"Rick Reumann" <st...@reumann.net> wrote in message
news:40C71E16.3090405@reumann.net...
> pls wrote:
>
> > found out that in tomcat 4.1, el can ONLY be used inside of the jstl
tags.
> > downloading tomcat 5 right now..
>
> Not sure what you mean by the above, but there are struts-el tags as
> well, which work with Tomcat4.x.
>
> --
> Rick




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


Re: logic:iterate beans and el

Posted by Rick Reumann <st...@reumann.net>.
pls wrote:

> found out that in tomcat 4.1, el can ONLY be used inside of the jstl tags.
> downloading tomcat 5 right now..

Not sure what you mean by the above, but there are struts-el tags as 
well, which work with Tomcat4.x.

-- 
Rick

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


Re: logic:iterate beans and el

Posted by pls <ab...@hotmail.com>.
found out that in tomcat 4.1, el can ONLY be used inside of the jstl tags.
downloading tomcat 5 right now..

"pls" <ab...@hotmail.com> wrote in message
news:ca2d2b$70e$1@sea.gmane.org...
> 'bean1' is a bean created by logic:iterate and contains 'myHashMap'.
>
> I am trying to access the 'key' property of the bean so that i can set the
> property -'prop1'.
>
> setting the value of 'prop1' changes the value returned from the getter
for
> 'prop2'.
>
> I have tried the following but it sets 'prop1' to the string literal
> "pageScope.bean1.key" instead of the evaluated expression for the bean.  i
> am new to struts with el so any help is greatly appreciated.  perhaps it
is
> just a simple config error on my part..
>
>     <logic:iterate id="bean1" name="aForm" property="myHashMap">
>
>           <jsp:setProperty name="aForm" property="prop1"
> value="${pageScope.bean1.key}"/>
>
>           <bean:write name="aForm" property="prop2"/>
>
>      </logic:iterate>




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