Depends on who is listening for the events. Can you guarantee that there will be no bugs in your code from doing this?
On 7/6/07, Vladimir Isakovich <[EMAIL PROTECTED]> wrote:
Andrew, could you give me an example (use case) when I'm sending out a null value, then on submit get "" back, and there is any harm of stopping valueChangeEvent from being fired. I can't come up with one. Sure, I may write some logic or a converter wraper in order to prevent this unwanted event, I just was pointing to the fact that I was expected this from non altered framework. vlad On 7/6/07, Andrew Robinson <[EMAIL PROTECTED]> wrote: > null has a special meaning, and thus why null != "" in terms of > UIInput. Null means that the value was not submitted at all. "" means > the value was submitted with no value. Thus why you need to convert "" > to null if that is what you wish. If the renderer converted "" to > null, then there would never be an update of the model. > > If you want, write a chain converter or a converter wrapper that > converts "" to null. > > It may look like: > > <h:inputText ...> > <my:emptyToNullConverter wrapConverterId="javax.faces.Integer " /> > </h:inputText> > > then you can first check for "" and convert it to null, and if not, > delegate the check to the "inner converter" > > On 7/6/07, Vladimir Isakovich < [EMAIL PROTECTED]> wrote: > > Although null and date are two separate issues, but I'm gettin the picture. > > I may create my own converters and attach them to all my fields as I'm > > pleased. But I'm trying to have some common services (if thay're missing in > > the framework) in a single place, well this may be arguable what's better. > > Sorry for annoyance, but still, why JSF would not check for nulls for me > > (you've pointed the right method to be changed). > > > > With the date conversion I'll postpone the issue, I have to spend more time > > tracing it. > > > > vlad >

