You are right, Paul -- sorry for the confusion. Another important point is if you use the <input type="hidden"...> tag versus the struts <html:hidden...> tag the value will not be set automatically based on properties of the form bean.
-----Original Message----- From: Paul Linden [mailto:[EMAIL PROTECTED]] Sent: Wednesday, January 08, 2003 3:01 PM To: Struts Users Mailing List Subject: Re: value="<bean:write../>" question <input type="hidden" name="sectionName" value="<bean:write name="ac" property="section.name"/>" /> is just text with a custom tag in the middle. There's nothing special about <input ...> <html:hidden ....> is a custom tag that has to be evaluated before the response is even sent. It would have been more accurate for Bill to say that you can't have a tag as the value of an attribute in a *custom* tag. Paul Vijay Balakrishnan wrote: >Hi, > >Thanks for your replies.I looked at an example in the "Struts In action" >book and so I tried this and it worked: > ><input type="hidden" name="sectionName" value="<bean:write name="ac" >property="section.name"/>" /> > >After all,by the time it gets to the browser,its all the same. > > >Vijay > > > >You could use: > ><bean:define name="myBean" property="myProperty" id="myId" type="String"/> > >... value="<%= myId%>" ...... > > >-----Original Message----- >From: Siggelkow, Bill [mailto:[EMAIL PROTECTED]] >Sent: Wednesday, January 08, 2003 5:36 AM >To: 'Struts Users Mailing List' >Subject: RE: value="<bean:write../>" question > > >You cannot use a tag as a value of an attribute in a tag -- you need to use >a Runtime Expression (or expression language if you are using JSTL) as in >the following: > ><html:hidden property="sectionName" value="<%=ac.getSection().getName()%>"/> > >-----Original Message----- >From: Vijay Balakrishnan [mailto:[EMAIL PROTECTED]] >Sent: Tuesday, January 07, 2003 8:15 PM >To: 'Struts Users Mailing List' >Subject: value="<bean:write../>" question > > >Hi, > >This code works: > ><tiles:put name="topleft"><bean:write name="ac" >property="section.name"/>.</tiles:put> > >But this code doesn't work: ><html:hidden property="sectionName" value="<bean:write name="ac" >property="section.name"/>" /> > >Can someone explain what I need to do ? > >Thanks, >Vijay > >-- >To unsubscribe, e-mail: ><mailto:[EMAIL PROTECTED]> >For additional commands, e-mail: ><mailto:[EMAIL PROTECTED]> > >-- >To unsubscribe, e-mail: ><mailto:[EMAIL PROTECTED]> >For additional commands, e-mail: ><mailto:[EMAIL PROTECTED]> > >-- >To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]> >For additional commands, e-mail: <mailto:[EMAIL PROTECTED]> > > > -- To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]> For additional commands, e-mail: <mailto:[EMAIL PROTECTED]> -- To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]> For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>