Hi,
I was wondering if there is a way to configure Struts1 so Form beans return
null values instead of empty String values when a user does not enter data in a
text field, for example. The problem is that Hibernate then saves empty
Strings to the database instead of nulls. I would like to conf
--- Andy <[EMAIL PROTECTED]> wrote:
> I was wondering if there is a way to configure Struts1 so Form beans return
> null values instead of empty String values when a user does not enter data
> in a text field, for example. The problem is that Hibernate then saves
> empty Strings to the database in
;
}
}
Anyone else?
M-
- Original Message -
From: "Andy" <[EMAIL PROTECTED]>
To:
Sent: Friday, February 29, 2008 1:58 PM
Subject: Struts1 forms with empty Strings
Hi,
I was wondering if there is a way to configure Struts1 so Form beans return
null values instead of emp
--- Martin Gainty <[EMAIL PROTECTED]> wrote:
> //easiest solution would be to set all the attribute default values to null
Isn't that the default value for a String field? [1]
Does this prevent and empty value from the HTML form being set on the
ActionForm?
Dave
[1] http://java.sun.com/docs/boo
gt; Reply-To: Struts Users Mailing List
> Date: Fri, 29 Feb 2008 12:53:36 -0800 (PST)
> To: Struts Users Mailing List
> Subject: Re: Struts1 forms with empty Strings
>
> --- Martin Gainty <[EMAIL PROTECTED]> wrote:
>> //easiest solution would be to set all the attribute def
"Dave Newton" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
> --- Andy <[EMAIL PROTECTED]> wrote:
> > I was wondering if there is a way to configure Struts1 so Form beans
return
> > null values instead of empty String values when a user does not enter
data
> > in a text field, for ex
ng example=null;
..
}; //class
???
Martin--
- Original Message -
From: "Tim B" <[EMAIL PROTECTED]>
To:
Sent: Saturday, March 01, 2008 9:44 PM
Subject: Re: Struts1 forms with empty Strings
>
> "Dave Newton" <[EMAIL PROTECTED]> wrote in message
> ne
--- Martin Gainty <[EMAIL PROTECTED]> wrote:
> Tim and Dave
> /what about creating your own WhateverFormBean and setting all attribs to
> null as default instead of empty string e.g.
> WhateverFormBean extends FormBeanConfig {
> /**
> * An example String property.
> */
> //change
>
8 matches
Mail list logo