That is what I resorted to ultimately (the dirty way I guess). The issue here is that the formatting of the attribute is dictated by a config file, saying which ones will be upper case and which ones will be lowercase. Hence I was initially trying with the CSS style attribute on html:input (text) tag to control the input. Here is what happens. When the user types in with the Caps Lock off, the entry is all uppercase but the value sent to the server is lowercase. However, the entry is uppercase if the user switches the caps lock on. This is what confused me. Even though the user sees the entries as all Uppercase (with caps lock off since the style defines text-transform: uppercase), the actual values are lowercase.
I have resorted to doing a regex on the config variable (that I store on a bean) and explicitly set the form field value to uppercase if I find a matching pattern of "uppercase" in the config variable...yuck!!. But the css style attribute for html:input (text) completely buffoons me. Perhaps, inline css is not supposed to be used with html:input (text type) tag ?? -----Original Message----- From: Pitchko, John SCAN-- [mailto:[EMAIL PROTECTED] Sent: Tuesday, December 23, 2003 9:02 AM To: Shishir K. Singh; Struts Users Mailing List Subject: RE: Html:input help IMO, you're probably better off doing this kind of data transformation inside of an Action. Would it be at all possible to do this within your application? -----Original Message----- From: Shishir K. Singh [mailto:[EMAIL PROTECTED] Sent: December 22, 2003 4:44 PM To: Struts Users Mailing List Subject: Html:input help Hi, I have two html:input (type text ) fields on my form and I am converting them to upper case using inline css style. I have included the rendered html page snippet. If you see, the PartNo retains the value uppercase value (TEST1). However, the Part Description is not correct even though the style is same. If I remove the Part No from the form, the Part description gets the correct value i.e all uppercase. Has anyone faced this problem ? If so, any advice would be appreciated. ------------------------------------------------------------------------ -- <tr> <td class="contentLeft"> Part No </td> <td class="contentRight"> <input type="text" name="lines[0].attrValue" maxlength="20" size="20" value="TEST1" style="text-transform: uppercase;" class="contentText"> </td> </tr> <tr> <td class="contentLeftCol"> Part Description </td> <td class="contentRight"> <input type="text" name="lines[1].attrValue" maxlength="64" size="50" value="fdsfdsfsdfdsf" style="text-transform: uppercase;" class="contentText"> </td> </tr> TIA Shishir --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]