Well, it really has nothing to do with the type of tag I am using be it 
radio,checkbox,text; I just
wanted to know if there is a declarative way to override the default values used by 
BeanUtils in
Struts.  Or is putting the code (from my previous message) in a plug-in the best 
practice?

In my mind, I can see why you would need to default an int property value to 0 when a 
value is not
specified (they have no choice, it has to be set to something), but why they would 
take this liberty
with an Integer object (or any other decendant Number), i'm not quite sure.

Craig.
<tataryn:craig/>

On Sat, 13 Mar 2004 16:41:41 -0800 (PST), Hubert Rabago wrote:

> 
> That's the expected behavior.  At the bottom of
> http://jakarta.apache.org/struts/userGuide/building_controller.html#dyna_action_form_classes:
> 
> "And, of course, while the DynaActionForm may support various binary types,
> properties used with the html:text tag should still be String properties."
> 
> Hubert
> 
> --- Craig Tataryn <[EMAIL PROTECTED]> wrote:
> > Hi there, is there a configuration setting for Struts which tells it to set
> > a property on a form
> > bean of type "Integer" (not int) to null instead of "new Integer(0)" when
> > the corresponding value
> > coming in from the user's form is an empty string?
> > 
> > I had to create a plugin that had the following in it's init() method:
> > 
> > ConvertUtils.register(new IntegerConverter(null),Integer.class);
> > 
> > Thanks,
> > 
> > Craig.
> > <tataryn:craig/>
> > 
> > <tataryn:craig/>
> > 
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: [EMAIL PROTECTED]
> > For additional commands, e-mail: [EMAIL PROTECTED]
> > 
> 
> 
> __________________________________
> Do you Yahoo!?
> Yahoo! Mail - More reliable, more storage, less spam
> http://mail.yahoo.com
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]


<tataryn:craig/>

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

Reply via email to