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