struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Hubert Rabago" <>
Subject Re: Struts/FormDef formatting question
Date Thu, 26 Apr 2007 16:37:18 GMT
Then you'll have to have code to convert between the two.  If you're
using Formdef, you can put this logic in Converter and associate that
converter with the field in the form you're using.  If not, you'll
have to handle this within your Action when you prepopulate your
outgoing form or parse the incoming form.


On 4/26/07, Givler, Eric <> wrote:
> Thanks for the quick response.
> The field in the db is to be stored stripped of formatting.  However, the display and
entry of the field should include the formatting.
> -----Original Message-----
> From: Hubert Rabago []
> Sent: Thursday, April 26, 2007 11:21 AM
> To: Struts Users Mailing List
> Subject: Re: Struts/FormDef formatting question
> Your form field will come in as String.  If you'll be storing the data
> as string as well, maybe you don't need any more conversion between
> the two.
> Hubert
> On 4/26/07, Givler, Eric <> wrote:
> > I was reading on the Formdef site about using a formatter (converter) for handling
a phone number for dynamic form beans in Struts.  I have a situation that is very similar
to this but I'm not sure how to go about writing it.  The existing table has numeric phone
fields which will not be changed, and will have two new phone fields added which are varchar2(14).
 In the case of a converter, I could see writing one for the Numeric since I could say that
the converter is going from Number to String.  However, what about where the db field is String
already?   I'm trying to use iBATIS for the db layer.
> > If this is the incorrect place to ask this question, can you point me to the correct
> >
> ---------------------------------------------------------------------
> To unsubscribe, e-mail:
> For additional commands, e-mail:
> ---------------------------------------------------------------------
> To unsubscribe, e-mail:
> For additional commands, e-mail:

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message