struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Kris Schneider <k...@dotech.com>
Subject RE: Replacement values
Date Mon, 16 Dec 2002 15:10:04 GMT
<logic:iterate id="item" name="myForm" property="x" type="String">
  <bean:message key="somevalue" arg0="<%= item %>"/>
</logic:iterate>

or:

<logic:iterate id="item" name="myForm" property="x">
  <bean:message key="somevalue" arg0="<%= (String)item %>"/>
</logic:iterate>

Quoting Sri Sankaran <Sri.Sankaran@sas.com>:

> A follow-up to my earlier post:  Looking back at the message from Craig, I
> think he was referring to the 'id' and not the 'name'.  I suppose I can write
> a quickie test.
> 
> Jorge's suggestion may work but I doubt if it ('item') is of request scope. 
> Worth a try.
> 
> Sri
> 
> -----Original Message-----
> From: Jorge Martins [mailto:Jorge.B.Martins@inesc-id.pt] 
> Sent: Monday, December 16, 2002 9:22 AM
> To: 'Struts Users Mailing List'
> Subject: RE: Replacement values
> 
> 
> How about:
> 
> <logic:iterate id="item" name="myForm" property="x">
>   <bean:message key="somevalue" arg0='<%= request.get("item") %>'/>
> </logic:iterate>
> 
> Wouldn't that do the trick?
> 
>  
> ________________________________________________________________________
>    inesc-id   Jorge Martins              | Jorge.B.Martins@inesc-id.pt
> lisboa        Software Engineering Group |
> http://www.esw.inesc-id.pt/~jorge
> 
> 
> 
> -----Original Message-----
> From: Sri Sankaran [mailto:Sri.Sankaran@sas.com] 
> Sent: segunda-feira, 16 de Dezembro de 2002 14:19
> To: Struts Users Mailing List
> Subject: RE: Replacement values
> 
> 
> I believe that replacement values are interpreted as Strings.  Also, quoting
> Craig from an earlier post:
> 
> ...the <logic:iterate> tag does not create a scripting variable.  It only
> stores the current element you are iterating over in the attribute defined by
> "name".... 
> 
> Given that, a quick solution to what you are attempting isn't obvious.
> 
> Sri
> 
> -----Original Message-----
> From: Mohan Radhakrishnan [mailto:MohanR@hclcomnet.co.in] 
> Sent: Monday, December 16, 2002 5:07 AM
> To: Struts Users Mailing List
> Subject: Replacement values
> 
> 
> Hi,
> 
> 
>   I am trying to iterate over values in my form bean.
> 
> 	<logic:iterate id="item" name="myForm" property="x">
> 	  <bean:message key="somevalue" arg0="item"/>
> 	</logic:iterate>
> 
>   The above prints the string "item" for the replacement value.
> 
>  Shouldn't it print the value iterated over the String[] which is the type of
> the property in my form bean ?
> 
>  Even bean:write throws " bean not found in scope null " error.
> 
>  "myForm" is in the session scope according the config file.
> 
> Thanks,
> Mohan
> 
> --
> To unsubscribe, e-mail: <mailto:struts-user-unsubscribe@jakarta.apache.org>
> For additional commands, e-mail:
> <mailto:struts-user-help@jakarta.apache.org>
> 
> 
> --
> To unsubscribe, e-mail: <mailto:struts-user-unsubscribe@jakarta.apache.org>
> For additional commands, e-mail:
> <mailto:struts-user-help@jakarta.apache.org>
> 
> 
> 
> --
> To unsubscribe, e-mail:  
> <mailto:struts-user-unsubscribe@jakarta.apache.org>
> For additional commands, e-mail:
> <mailto:struts-user-help@jakarta.apache.org>
> 
> 
> --
> To unsubscribe, e-mail:  
> <mailto:struts-user-unsubscribe@jakarta.apache.org>
> For additional commands, e-mail:
> <mailto:struts-user-help@jakarta.apache.org>
> 


-- 
Kris Schneider <mailto:kris@dotech.com>
D.O.Tech       <http://www.dotech.com/>

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


Mime
View raw message