"Geddes, Mark (ANTS)" wrote:
> Ensure that your id value is an attribute of the FormBean associated with
> this form.
> So if your FormBean is "dataForm" with the attribute "id" then use something
> like:
>
> <bean:write name="dataForm" property="id"/>
>
> Of course you will need to populate the FormBean with the id value.
>
The Struts example app uses this approach to display a field as editable or not
editable, depending on the circumstances. Check out the handling of the "username"
property on the "registration.jsp" page.
>
> Mark
Craig
>
> -----Original Message-----
> From: Florian Zwerina [mailto:[EMAIL PROTECTED]]
> Sent: 26 January 2001 09:50
> To: '[EMAIL PROTECTED]'
> Subject: read only values in forms
>
> Hi !
>
> I´m looking for a way to display 'read only' values in a form
> (I don´t want an input filed - just plain old text for some of the
> properties)
>
> <html:form action="saveData.do" >
> <html:hidden property="action"/>
> <table border="0" width="100%">
> <tr>
> <th align="right">
> <bean:message key="prompt.id"/>
> </th>
> <td align="left">
> <html:text property="ID" size="10"/>
> </td>
> </tr>
>
> <tr>
> <th align="right">
> <bean:message key="prompt.name"/>
> </th>
> <td align="left">
> <html:text property="name" size="50"/>
> </td>
> </tr>
>
> <tr>
> <th align="right">
> <bean:message key="prompt.manager"/>
> </th>
> <td align="left">
> <html:text property="manager" size="50"/>
> </td>
> </tr>
>
> ... button stuff will be here.....
>
> </table>
>
> </html:form>
>
> so what i want to have is an input field for 'name' and 'manager'
> and just diplay the value of 'ID'.
>
> any ideas ?
>
> regards
>
> flo.
>
> ***************************************************************************
> This email message contains confidential information for the above addressee only.
>If you are not the intended addressee you must not disclose or use the information in
>any manner whatsoever.
>
> Any opinion or views contained in this email message are those of the sender, do not
>represent those of the Company in any way and reliance should not be placed upon its
>contents.
>
> Unless otherwise stated this email message is not intended to be contractually
>binding. Where an Agreement exists between our respective companies and there is
>conflict between the contents of this email message and the Agreement then the terms
>of that Agreement shall prevail.
>
> Abbey National Treasury Services plc. Registered in England. Registered Office:
>Abbey House, Baker Street, London NW1 6XL. Company Registration No: 2338548.
>Regulated by the SFA
> ***************************************************************************