Hi All, It worked the following way.
<html-el:text indexed="true" name="form" property="prop1" size="50" maxlength="50" readonly="${form.readOnly}"/> I tried the same with the <html:text /> but it did not work so the EL works fine. Thanks for all your help. Regards Neil Meyer -----Original Message----- From: Kjersti Berg [mailto:[EMAIL PROTECTED] Sent: 12 April 2006 12:54 PM To: Struts Users Mailing List Subject: Re: <HTML:TEXT> Properties 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 --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]