No.

An int won't hold a String no matter how hard you try.
Change the type to String, then add some validation, and see what happens.

JM

> -----Original Message-----
> From: Jivan, Rajiv [mailto:[EMAIL PROTECTED]]
> Sent: Thursday, May 23, 2002 4:38 PM
> To: Struts Users Mailing List
> Subject: Form validation
>
>
> I have a jsp which has an input field in which the user is
> supposed to enter only integers.
> The form bean has a field of type int which is displayed as the
> default in the input field using <html:text ...>
> When the user submits the form I want to validate the input field
> and make sure its a number. The problem is that if it isn't a
> number when I display an error message the original content which
> was entered in the field is lost as it reflects the data in the
> form bean which is an integer.
> Is there is way to preserve it?
>
>
>
> -----Original Message-----
> From: Galbreath, Mark [mailto:[EMAIL PROTECTED]]
> Sent: Thursday, May 23, 2002 3:07 PM
> To: 'Struts Users Mailing List'
> Subject: RE: Need help with Token stuff - URGENT
>
>
> Reid's still in jail.
>
> -----Original Message-----
> From: JM [mailto:[EMAIL PROTECTED]]
> Sent: Thursday, May 23, 2002 3:08 PM
> To: Struts Users Mailing List
> Subject: RE: Need help with Token stuff - URGENT
>
>
> I promise....its not me.  Is that you Reid????
>
> JM
>
> > -----Original Message-----
> > From: Galbreath, Mark [mailto:[EMAIL PROTECTED]]
> > Sent: Thursday, May 23, 2002 2:46 PM
> > To: 'Struts Users Mailing List'
> > Subject: RE: Need help with Token stuff - URGENT
> >
> >
> > Good lord!  This sounds like one of James's joke questions to
> the list....
> >
> > [EMAIL PROTECTED] wrote:
> > >
> > > Hello guys,
> > >
> > > I still can't work with token stuff.
> > >
> > > If I have a JSP page with a menu, and when the user clicks in one
> > > option, it goes to another menu, which has a html:form and a submit
> > > button with an action associated. Where should I use the token
> > > associated methods ? where/when should I call saveToken ?
> > >
> > > thanks a lot
> > > Jefferson
> >
> > --
> > 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]>
>
> --
> 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]>



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

Reply via email to