Paul, Thanks. This worked.
Where is this fact documented? -Miles > -----Original Message----- > From: Paul McCulloch [mailto:[EMAIL PROTECTED] > Sent: 17 November 2004 17:16 > To: 'Struts Users Mailing List' > Subject: RE: Using constants for form property names. > > When using RT expressions as attribute values the whole > attribute must be a single RT: > > <html:checkbox > property="<%=Keys.APPLICANT_FULLNAME_CHINESE_NA%>" > onclick="<%="clearAndDisable(this,'" + > Keys.APPLICANT_FULLNAME_CHINESE_NA + "');"%> > > > N/A > </html:checkbox> > > Paul > > > -----Original Message----- > > From: Daffin, Miles (Company IT) > > [mailto:[EMAIL PROTECTED] > > Sent: 17 November 2004 17:03 > > To: [EMAIL PROTECTED] > > Subject: Using constants for form property names. > > > > > > Hi All, > > > > I have found all sorts of ways to use constants for messages in > > struts, but no one seems to address the issue of property names. A > > simple example will make it clearer. > > > > I want to use constants for my property names. In my jsp I have the > > following code: > > > > <html:checkbox > > property="<%=Keys.APPLICANT_FULLNAME_CHINESE_NA%>" > > onclick="clearAndDisable(this, > > '<%=Keys.APPLICANT_FULLNAME_CHINESE_NA%>');"> > > N/A > > </html:checkbox> > > > > The above jsp code does not work because it is rendered as follows: > > > > <input name="applicantFullNameChineseNA" value="on" > > onclick="clearAndDisable(this, > > '<%=Keys.APPLICANT_FULLNAME_CHINESE_NA%>');" type="checkbox">N/A > > > > The first expression for 'property' is evaluated. The second is > > rendered literally. > > > > My questions are: > > > > 1. Is this a bug? > > 2. Is this the right way to go about using constants for property > > names? > > > > Many thanks. > > > > -Miles > > > > Miles Daffin > > Morgan Stanley > > 20 Cabot Square | Canary Wharf | London E14 4QA | UK > > Tel: +44 (0) 20 767 75119 > > [EMAIL PROTECTED] > <mailto:[EMAIL PROTECTED]> > -------------------------------------------------------- > > NOTICE: If received in error, please destroy and notify > sender. Sender does not waive confidentiality or privilege, > and use is prohibited. > > > --------------------------------------------------------------------- > 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] > > -------------------------------------------------------- NOTICE: If received in error, please destroy and notify sender. Sender does not waive confidentiality or privilege, and use is prohibited. --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]