You could add a check for the value to set in each modifier, something like
this:
public void setName(String newName) {
if ( !"".equasl(newName) ) {
name = newName;
}
}
Still quite cumbersome...
On 3/12/07, Strittmatter, Stephan <[EMAIL PROTECTED]> wrote:
Hi Mike,
thanks for this info. Then I have to add my converter manually to every
control :-/
-----Original Message-----
From: Mike Kienenberger [mailto:[EMAIL PROTECTED]
Sent: Thursday, March 08, 2007 7:42 PM
To: MyFaces Discussion
Subject: Re: StringConversion to EMPTY_STRING
The JSF spec says that components will return the empty string, not
null.
There is no way to specify a converter-by-type for String in JSF 1.1.
You can specify String converters for JSF 1.2.
https://javaserverfaces-spec-public.dev.java.net/issues/show_bug.cgi?id=
131
On 3/8/07, Strittmatter, Stephan <[EMAIL PROTECTED]> wrote:
> Hello all,
>
> I had several times problems with inputText Components which are
having
> Strings as input.
> If there is nothing typed in, the BackingBean get an EMPTY_STRING
(""),
> but I would expect
> null there? Is this the common behaviour?
>
> For Workaround, I created my own converter adding for every control.
Is
> there a way to define
> it for all String-Controls by default on the orther hand?
>
> Regards,
>
> Stephan
>