struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Ed Griebel <edgrie...@gmail.com>
Subject Re: Example not working: Fill the value of a hidden field from a props-file
Date Wed, 12 Oct 2005 14:48:58 GMT
OK, try setting a bean to the value of the message and then output the
value of the bean, something like this:

<bean:define id="msg">
  <bean:message key="login.format.test"/>
</bean:define>
<html:hidden property="methodToCall"  value="<%=msg%>"/>

Or, you can use the struts-el taglibs this way:
<c:set var="msg">
  <bean:message key="login.format.test"/>
</c:set>
<html-el:hidden property="methodToCall"  value="${msg}"/>

If you are using a container that supports JSP 2.0, you can use "html"
not "html-el" in the above version.

-ed

On 10/12/05, starki78 <starki78@libero.it> wrote:
> ---------- Initial Header -----------
>
> From      : "Ed Griebel" edgriebel@gmail.com
> To          : "Struts Users Mailing List" user@struts.apache.org
> Cc          :
> Date      : Wed, 12 Oct 2005 09:31:02 -0400
> Subject : Re: Example not working: Fill the value of a hidden field from a props-file
>
>
> Oh thank you but this is not working,
> I get an compile-error. It must have this structure <html:hidden/>
>
> Any ideas?
> Thanks Starki
>
>
>
>
> > You can't nest tags like that. Try this instead:
> > <html:hidden property="methodToCall">
> >   <bean:message key="login.format.test"/>
> > </html:hidden>
> >
> > On 10/12/05, starki78 <starki78@libero.it> wrote:
> > > Hi, my goal is to dynamically
> > > set the value of a hidden field from a Ressources-
> > > File:
> > > <html:hidden property="methodToCall"  value='<bean:message  key="login.format.test"/>'
/>
> > >
> > > After submit I get:
> > > "&lt;bean:message  key=&quot;login.test.submit&quot;/&gt;"
> > >
> > > Can you please tell me where the error is?
> > >
> > > Thanks a lot
> > > Starki
> > >
> > >
> > > ---------------------------------------------------------------------
> > > 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
> >
> >
>
>
> ---------------------------------------------------------------------
> 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