Re: [Wicket-user] NumberValidator allowing null fields ?

2007-07-08 Thread Thies Edeling
Martijn Dashorst wrote: > On 7/8/07, Thies Edeling <[EMAIL PROTECTED]> wrote: > >> Why does setType set the required flag for primitives? >> > > How can a primitive type ever be null? If you want to allow null > values, then the type needs to be Double, Float, Integer, Long, ... > > If nul

Re: [Wicket-user] NumberValidator allowing null fields ?

2007-07-08 Thread Igor Vaynberg
On 7/8/07, Martijn Dashorst <[EMAIL PROTECTED]> wrote: On 7/8/07, Thies Edeling <[EMAIL PROTECTED]> wrote: > Why does setType set the required flag for primitives? How can a primitive type ever be null? If you want to allow null values, then the type needs to be Double, Float, Integer, Long, .

Re: [Wicket-user] NumberValidator allowing null fields ?

2007-07-08 Thread Martijn Dashorst
On 7/8/07, Thies Edeling <[EMAIL PROTECTED]> wrote: > Why does setType set the required flag for primitives? How can a primitive type ever be null? If you want to allow null values, then the type needs to be Double, Float, Integer, Long, ... If null is allowed, and an empty value was accepted, W

Re: [Wicket-user] NumberValidator allowing null fields ?

2007-07-08 Thread Igor Vaynberg
On 7/8/07, Thies Edeling <[EMAIL PROTECTED]> wrote: Apparently setType on a FormComponent (needed for NumberValidator) sets the required flag for primitive types. With the required flag set a null field never makes it to my validator. Why does setType set the required flag for primitives?

Re: [Wicket-user] NumberValidator allowing null fields ?

2007-07-08 Thread Thies Edeling
Apparently setType on a FormComponent (needed for NumberValidator) sets the required flag for primitive types. With the required flag set a null field never makes it to my validator. Why does setType set the required flag for primitives? /** * Sets the type that will be used when updatin

Re: [Wicket-user] NumberValidator allowing null fields ?

2007-07-07 Thread Jonathan Locke
oh, i should mention that my wicket is not head. it was frozen a couple weeks back, so it's possible this is a regression. you might want to look at the revision history for the various classes involved in validation. Jonathan Locke wrote: > > > maybe this is a bug? i have a ConstrainedPr

Re: [Wicket-user] NumberValidator allowing null fields ?

2007-07-07 Thread Jonathan Locke
maybe this is a bug? i have a ConstrainedPropertyValidator which extends AbstractValidator (which implements INullAcceptingValidator) and returns true for validateOnNullValue() and it works just fine. you might need to trace into the validation code to figure out why it's not calling your vali

[Wicket-user] NumberValidator allowing null fields ?

2007-07-07 Thread Thies Edeling
Hi How can I have a NumberValidator allow null values ? I tried extending the DoubleRangeValidator, implement the INullAcceptingValidator interface and returning true for validateOnNullValue but my Validator still isn't called. Also not setting the required property on a TextField won't give h