You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@wicket.apache.org by Sebastien <se...@gmail.com> on 2012/05/09 22:49:27 UTC

Wicket 6.0.0-beta1: RangeValidator Issue (NPE)

Hi wicket's team,

While using the following code:

        final TextField<Integer> input = new TextField<Integer>("input",
new Model<Integer>(15), Integer.class);
        input.add(new RangeValidator<Integer>(0, 200));
        form.add(input);

I've got a NPE with wicket6.0.0-beta1, when I submit the form with a value
not inside the validator's bounds. (ie, 500).
I tested in a simple quickstart to be sure... It is ok with 1.5.6 and crash
with 6.0.0-beta1

java.lang.NullPointerException
     at org.apache.wicket.markup.html.form.ValidationErrorFeedback.toString(ValidationErrorFeedback.java:83)
     at org.apache.wicket.markup.html.panel.FeedbackPanel.newMessageDisplayComponent(FeedbackPanel.java:338)
     at org.apache.wicket.markup.html.panel.FeedbackPanel$MessageListView.populateItem(FeedbackPanel.java:117)
     at org.apache.wicket.markup.html.list.ListView.onPopulate(ListView.java:524)
     at org.apache.wicket.markup.repeater.AbstractRepeater.onBeforeRender(AbstractRepeater.java:116)

Thus, just fyi, it is not documented in the migration guide what's happened
to the NumberValidator... I did not find it, so I did not test another
validator such as MaximumValidator...

Best regards,
Sebastien

Re: Wicket 6.0.0-beta1: RangeValidator Issue (NPE)

Posted by Sebastien <se...@gmail.com>.
Argh! It is because I had to reset my jira password in the meantime! :)
I commented mine to say it's a duplicate...

Thanks,
Sebastien.

On Thu, May 10, 2012 at 9:54 AM, Thomas Götz <to...@decoded.de> wrote:

> Lol, first! Mine has WICKET-4548 ;)
>
>   -Tom
>
>
> On 10.05.2012 at 09:50 Sebastien wrote:
>
> > Hi Martin,
> >
> > Here we are: https://issues.apache.org/jira/browse/WICKET-4549
> >
> > Sebastien.
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
> For additional commands, e-mail: users-help@wicket.apache.org
>
>

Re: Wicket 6.0.0-beta1: RangeValidator Issue (NPE)

Posted by Thomas Götz <to...@decoded.de>.
Lol, first! Mine has WICKET-4548 ;)

   -Tom


On 10.05.2012 at 09:50 Sebastien wrote:

> Hi Martin,
> 
> Here we are: https://issues.apache.org/jira/browse/WICKET-4549
> 
> Sebastien.


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
For additional commands, e-mail: users-help@wicket.apache.org


Re: Wicket 6.0.0-beta1: RangeValidator Issue (NPE)

Posted by Sebastien <se...@gmail.com>.
Hi Martin,

Here we are: https://issues.apache.org/jira/browse/WICKET-4549

Sebastien.

On Thu, May 10, 2012 at 9:38 AM, Martin Grigorov <mg...@apache.org>wrote:

> Guys,
>
> Please use Jira for bug reports.
>
> On Thu, May 10, 2012 at 9:28 AM, Thomas Götz <to...@decoded.de> wrote:
> > I can confirm this, see this quickstart:
> http://decoded.de/wicket-quickstart.zip
> > The NPE only occurs if there is a FeedbackPanel on the page. If you take
> it out -> no exception. Besides, there is no WARN log if you are missing a
> FeedbackPanel and there are messages to be rendered, bug or feature?!
> >
> > Cheers,
> >   -Tom
> >
> >
> > On 09.05.2012 at 22:49 Sebastien wrote:
> >
> >> Hi wicket's team,
> >>
> >> While using the following code:
> >>
> >>        final TextField<Integer> input = new TextField<Integer>("input",
> >> new Model<Integer>(15), Integer.class);
> >>        input.add(new RangeValidator<Integer>(0, 200));
> >>        form.add(input);
> >>
> >> I've got a NPE with wicket6.0.0-beta1, when I submit the form with a
> value
> >> not inside the validator's bounds. (ie, 500).
> >> I tested in a simple quickstart to be sure... It is ok with 1.5.6 and
> crash
> >> with 6.0.0-beta1
> >>
> >> java.lang.NullPointerException
> >>     at
> org.apache.wicket.markup.html.form.ValidationErrorFeedback.toString(ValidationErrorFeedback.java:83)
> >>     at
> org.apache.wicket.markup.html.panel.FeedbackPanel.newMessageDisplayComponent(FeedbackPanel.java:338)
> >>     at
> org.apache.wicket.markup.html.panel.FeedbackPanel$MessageListView.populateItem(FeedbackPanel.java:117)
> >>     at
> org.apache.wicket.markup.html.list.ListView.onPopulate(ListView.java:524)
> >>     at
> org.apache.wicket.markup.repeater.AbstractRepeater.onBeforeRender(AbstractRepeater.java:116)
> >>
> >> Thus, just fyi, it is not documented in the migration guide what's
> happened
> >> to the NumberValidator... I did not find it, so I did not test another
> >> validator such as MaximumValidator...
> >>
> >> Best regards,
> >> Sebastien
> >
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
> > For additional commands, e-mail: users-help@wicket.apache.org
> >
>
>
>
> --
> Martin Grigorov
> jWeekend
> Training, Consulting, Development
> http://jWeekend.com
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
> For additional commands, e-mail: users-help@wicket.apache.org
>
>

Re: Wicket 6.0.0-beta1: RangeValidator Issue (NPE)

Posted by Thomas Götz <to...@richmountain.de>.
My bad: https://issues.apache.org/jira/browse/WICKET-4548

   -Tom


On 10.05.2012 at 09:38 Martin Grigorov wrote:

> Guys,
> 
> Please use Jira for bug reports.
> 
> On Thu, May 10, 2012 at 9:28 AM, Thomas Götz <to...@decoded.de> wrote:
>> I can confirm this, see this quickstart: http://decoded.de/wicket-quickstart.zip
>> The NPE only occurs if there is a FeedbackPanel on the page. If you take it out -> no exception. Besides, there is no WARN log if you are missing a FeedbackPanel and there are messages to be rendered, bug or feature?!
>> 
>> Cheers,
>>   -Tom
>> 
>> 
>> On 09.05.2012 at 22:49 Sebastien wrote:
>> 
>>> Hi wicket's team,
>>> 
>>> While using the following code:
>>> 
>>>        final TextField<Integer> input = new TextField<Integer>("input",
>>> new Model<Integer>(15), Integer.class);
>>>        input.add(new RangeValidator<Integer>(0, 200));
>>>        form.add(input);
>>> 
>>> I've got a NPE with wicket6.0.0-beta1, when I submit the form with a value
>>> not inside the validator's bounds. (ie, 500).
>>> I tested in a simple quickstart to be sure... It is ok with 1.5.6 and crash
>>> with 6.0.0-beta1
>>> 
>>> java.lang.NullPointerException
>>>     at org.apache.wicket.markup.html.form.ValidationErrorFeedback.toString(ValidationErrorFeedback.java:83)
>>>     at org.apache.wicket.markup.html.panel.FeedbackPanel.newMessageDisplayComponent(FeedbackPanel.java:338)
>>>     at org.apache.wicket.markup.html.panel.FeedbackPanel$MessageListView.populateItem(FeedbackPanel.java:117)
>>>     at org.apache.wicket.markup.html.list.ListView.onPopulate(ListView.java:524)
>>>     at org.apache.wicket.markup.repeater.AbstractRepeater.onBeforeRender(AbstractRepeater.java:116)
>>> 
>>> Thus, just fyi, it is not documented in the migration guide what's happened
>>> to the NumberValidator... I did not find it, so I did not test another
>>> validator such as MaximumValidator...
>>> 
>>> Best regards,
>>> Sebastien
>> 
>> 
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
>> For additional commands, e-mail: users-help@wicket.apache.org
>> 
> 
> 
> 
> -- 
> Martin Grigorov
> jWeekend
> Training, Consulting, Development
> http://jWeekend.com
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
> For additional commands, e-mail: users-help@wicket.apache.org
> 


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
For additional commands, e-mail: users-help@wicket.apache.org


Re: Wicket 6.0.0-beta1: RangeValidator Issue (NPE)

Posted by Martin Grigorov <mg...@apache.org>.
Guys,

Please use Jira for bug reports.

On Thu, May 10, 2012 at 9:28 AM, Thomas Götz <to...@decoded.de> wrote:
> I can confirm this, see this quickstart: http://decoded.de/wicket-quickstart.zip
> The NPE only occurs if there is a FeedbackPanel on the page. If you take it out -> no exception. Besides, there is no WARN log if you are missing a FeedbackPanel and there are messages to be rendered, bug or feature?!
>
> Cheers,
>   -Tom
>
>
> On 09.05.2012 at 22:49 Sebastien wrote:
>
>> Hi wicket's team,
>>
>> While using the following code:
>>
>>        final TextField<Integer> input = new TextField<Integer>("input",
>> new Model<Integer>(15), Integer.class);
>>        input.add(new RangeValidator<Integer>(0, 200));
>>        form.add(input);
>>
>> I've got a NPE with wicket6.0.0-beta1, when I submit the form with a value
>> not inside the validator's bounds. (ie, 500).
>> I tested in a simple quickstart to be sure... It is ok with 1.5.6 and crash
>> with 6.0.0-beta1
>>
>> java.lang.NullPointerException
>>     at org.apache.wicket.markup.html.form.ValidationErrorFeedback.toString(ValidationErrorFeedback.java:83)
>>     at org.apache.wicket.markup.html.panel.FeedbackPanel.newMessageDisplayComponent(FeedbackPanel.java:338)
>>     at org.apache.wicket.markup.html.panel.FeedbackPanel$MessageListView.populateItem(FeedbackPanel.java:117)
>>     at org.apache.wicket.markup.html.list.ListView.onPopulate(ListView.java:524)
>>     at org.apache.wicket.markup.repeater.AbstractRepeater.onBeforeRender(AbstractRepeater.java:116)
>>
>> Thus, just fyi, it is not documented in the migration guide what's happened
>> to the NumberValidator... I did not find it, so I did not test another
>> validator such as MaximumValidator...
>>
>> Best regards,
>> Sebastien
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
> For additional commands, e-mail: users-help@wicket.apache.org
>



-- 
Martin Grigorov
jWeekend
Training, Consulting, Development
http://jWeekend.com

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
For additional commands, e-mail: users-help@wicket.apache.org


Re: Wicket 6.0.0-beta1: RangeValidator Issue (NPE)

Posted by Thomas Götz <to...@decoded.de>.
I can confirm this, see this quickstart: http://decoded.de/wicket-quickstart.zip
The NPE only occurs if there is a FeedbackPanel on the page. If you take it out -> no exception. Besides, there is no WARN log if you are missing a FeedbackPanel and there are messages to be rendered, bug or feature?!

Cheers,
   -Tom


On 09.05.2012 at 22:49 Sebastien wrote:

> Hi wicket's team,
> 
> While using the following code:
> 
>        final TextField<Integer> input = new TextField<Integer>("input",
> new Model<Integer>(15), Integer.class);
>        input.add(new RangeValidator<Integer>(0, 200));
>        form.add(input);
> 
> I've got a NPE with wicket6.0.0-beta1, when I submit the form with a value
> not inside the validator's bounds. (ie, 500).
> I tested in a simple quickstart to be sure... It is ok with 1.5.6 and crash
> with 6.0.0-beta1
> 
> java.lang.NullPointerException
>     at org.apache.wicket.markup.html.form.ValidationErrorFeedback.toString(ValidationErrorFeedback.java:83)
>     at org.apache.wicket.markup.html.panel.FeedbackPanel.newMessageDisplayComponent(FeedbackPanel.java:338)
>     at org.apache.wicket.markup.html.panel.FeedbackPanel$MessageListView.populateItem(FeedbackPanel.java:117)
>     at org.apache.wicket.markup.html.list.ListView.onPopulate(ListView.java:524)
>     at org.apache.wicket.markup.repeater.AbstractRepeater.onBeforeRender(AbstractRepeater.java:116)
> 
> Thus, just fyi, it is not documented in the migration guide what's happened
> to the NumberValidator... I did not find it, so I did not test another
> validator such as MaximumValidator...
> 
> Best regards,
> Sebastien


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
For additional commands, e-mail: users-help@wicket.apache.org