what about 2 getters and setters.  one the deals in pig latin and one that
deals in english that has to translate on a get (maybe you don't need the
set).

bp

> -----Original Message-----
> From: Becky Moyer [mailto:[EMAIL PROTECTED]]
> Sent: Thursday, May 02, 2002 5:20 PM
> To: [EMAIL PROTECTED]
> Subject: formatting test in prepopulated form
> 
> 
> Hi all...
>    Can't find anything about this anywhere, thought i'd ask...
> 
>   I am storing a piece of data in a special format.  So, for 
> a bizarre 
> example, I store a name in pig latin in the database.  When I 
> display the 
> name, I want it to show up formatted properly.  Trouble is, 
> this is in a 
> form, and i want to format it inside a struts html:text box.
> 
> So in the database I store the name as "onjhae ithsmae".  I 
> populate my form 
> with the value name="onjhae ithsmae".  I have a custom tag 
> that if I do 
> something like this....
> <mytags:format><bean:write name="myform" 
> property="name"/></mytags:format>
> 
> will print out "John Smith".
> 
> Problem is when I want the user to be able to edit their name 
> in a form, and 
> I want to prepopulate the form, I end up with a dilemma.  I 
> want to keep the 
> name in pig latin in my form, and only want to display it in 
> English.  
> They'll enter it in English, but I'll translate it back to 
> pig latin in the 
> validate method or the action.  So if I already have
> <html:text name="myform" property="name"/>, how do I use my 
> tag to format 
> the text?  I don't think I can even do
> 
> <html:text name="myform" property="name">
>   <mytags:format>
>     <%=myform.getName()%>
>   </mytags:format>
> </html:text>
> 
> 
> I'm using Struts 1.0.  Is there a way to do this, or do I 
> have to do all 
> sorts of weird conversion back and forth???
> 
> Any suggestions greatly appreciated.
> Thanks!!!
> Becky
> 
> _________________________________________________________________
> Send and receive Hotmail on your mobile device: http://mobile.msn.com
> 
> 
> --
> To unsubscribe, e-mail:   
<mailto:[EMAIL PROTECTED]>
For additional commands, e-mail:
<mailto:[EMAIL PROTECTED]>

--
To unsubscribe, e-mail:   <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>

Reply via email to