Bill,
I thought of that, and that's probably what I'll end up doing. I didn't
know if anyone knew of a way to wrap the text that gets printed in that text
box with a tag in some manner. I thought that would end up being much
cleaner - a nicer seperation of presentation and logic...
But that's not always possible without doing some acrobatic feat, so I'll
have to just go with the extra getters and setters.
Thanks for your input!
Becky
Original Message Follows
From: Bill Page [EMAIL PROTECTED]
Reply-To: Struts Users Mailing List [EMAIL PROTECTED]
To: Struts Users Mailing List [EMAIL PROTECTED]
Subject: RE: formatting test in prepopulated form
Date: Thu, 2 May 2002 17:23:07 -0400
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:formatbean: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]
_
MSN Photos is the easiest way to share and print your photos:
http://photos.msn.com/support/worldwide.aspx
--
To unsubscribe, e-mail: mailto:[EMAIL PROTECTED]
For additional commands, e-mail: mailto:[EMAIL PROTECTED]