Thanks Nico, It worked perfectly with the EL tags.
Neil -----Original Message----- From: Nicolas De Loof [mailto:[EMAIL PROTECTED] Sent: 12 April 2006 01:44 PM To: Struts Users Mailing List Subject: Re: <HTML:TEXT> Properties Using struts-EL tags : <html:text indexed="true" name="form" property="prop1" readonly="${form.readOnly}" /> Nico. Kjersti Berg a écrit : > On 12/04/06, Neil Meyer <[EMAIL PROTECTED]> wrote: > > >> Hi, >> >> Would like to know why the following doesn't work can anybody explain it >> please. >> >> I have a text box on a page this text box is readonly when the readonly >> property is set to true. >> >> >> <html:text indexed="true" name="form" property="prop1" >> readonly="<bean:write >> name='form' property='readOnly'/>" /> >> > > > You cannot use tags as attribute values like this. You need to use scriptlet > code. > > <bean:define name="form" property="readonly" id="readOnly"/> > <html:text indexed="true" name="form" property="prop1" > readonly="<%=readOnly%>" /> > > I think you could accomplish the same using jstl, but I haven't used that > myself, so somebody else explain what's wrong with the last example you > sent. (Besides the obvious missing equal sign, which I'm guessing is a > typo.) > > > >> <html:text indexed="true" name="form" property="prop1" readonly<c:out >> value='${form.readOnly}'/>" /> >> >> Regards >> Neil Meyer >> > > > Kjersti > > This message contains information that may be privileged or confidential and is the property of the Capgemini Group. It is intended only for the person to whom it is addressed. If you are not the intended recipient, you are not authorized to read, print, retain, copy, disseminate, distribute, or use this message or any part thereof. If you receive this message in error, please notify the sender immediately and delete all copies of this message. --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]