You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@wicket.apache.org by "Ivana Cace (JIRA)" <ji...@apache.org> on 2007/04/19 14:49:15 UTC

[jira] Created: (WICKET-486) nullvalue when using CheckGroup and a Validator

nullvalue when using CheckGroup and a Validator
-----------------------------------------------

                 Key: WICKET-486
                 URL: https://issues.apache.org/jira/browse/WICKET-486
             Project: Wicket
          Issue Type: Bug
          Components: wicket
    Affects Versions: 1.2.5
         Environment: tomcat 5.5, java 1.5
            Reporter: Ivana Cace


Problem occurs when using a listView with a checkgroup in the same form with a input Validator. When the Validator detects invalid input *and* no items from the CheckGroup were selected, Wicket throws a NullPointer Exception on the first ListView item. 

Specifically, in the Check class, the group.getInputAsArray() returns null and causes the NPE:
     if (group.hasRawInput()) 	{
			final String[] input = group.getInputAsArray();
			for (int i = 0; i < input.length; i++)
			{ ....
				
The problem is solved by overriding the isNullable() method for CheckGroup to return false.
    @Override
    public boolean isInputNullable() {
	return false;
		}

Apologies for describing symptoms rather than mechanism. More experienced programmers in the office think the model for CheckGroup is not attached or detached properly when used in conjunction with the (Pattern)Validator.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Assigned: (WICKET-486) NullPointerException when using CheckGroup and a Validator

Posted by "Igor Vaynberg (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/WICKET-486?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Igor Vaynberg reassigned WICKET-486:
------------------------------------

    Assignee: Igor Vaynberg

> NullPointerException when using CheckGroup and a Validator
> ----------------------------------------------------------
>
>                 Key: WICKET-486
>                 URL: https://issues.apache.org/jira/browse/WICKET-486
>             Project: Wicket
>          Issue Type: Bug
>          Components: wicket
>    Affects Versions: 1.2.5
>         Environment: tomcat 5.5, java 1.5
>            Reporter: Ivana Cace
>         Assigned To: Igor Vaynberg
>
> Problem occurs when using a listView with a checkgroup in the same form with a input Validator. When the Validator detects invalid input *and* no items from the CheckGroup were selected, Wicket throws a NullPointer Exception on the first ListView item. 
> Specifically, in the Check class, the group.getInputAsArray() returns null and causes the NPE:
>      if (group.hasRawInput()) 	{
> 			final String[] input = group.getInputAsArray();
> 			for (int i = 0; i < input.length; i++)
> 			{ ....
> 				
> The problem is solved by overriding the isNullable() method for CheckGroup to return false.
>     @Override
>     public boolean isInputNullable() {
> 	return false;
> 		}
> Apologies for describing symptoms rather than mechanism. More experienced programmers in the office think the model for CheckGroup is not attached or detached properly when used in conjunction with the (Pattern)Validator.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (WICKET-486) NullPointerException when using CheckGroup and a Validator

Posted by "Jean-Baptiste Quenot (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/WICKET-486?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12491825 ] 

Jean-Baptiste Quenot commented on WICKET-486:
---------------------------------------------

As always, a small quickstart, or a unit test is more than welcome.

> NullPointerException when using CheckGroup and a Validator
> ----------------------------------------------------------
>
>                 Key: WICKET-486
>                 URL: https://issues.apache.org/jira/browse/WICKET-486
>             Project: Wicket
>          Issue Type: Bug
>          Components: wicket
>    Affects Versions: 1.2.5
>         Environment: tomcat 5.5, java 1.5
>            Reporter: Ivana Cace
>
> Problem occurs when using a listView with a checkgroup in the same form with a input Validator. When the Validator detects invalid input *and* no items from the CheckGroup were selected, Wicket throws a NullPointer Exception on the first ListView item. 
> Specifically, in the Check class, the group.getInputAsArray() returns null and causes the NPE:
>      if (group.hasRawInput()) 	{
> 			final String[] input = group.getInputAsArray();
> 			for (int i = 0; i < input.length; i++)
> 			{ ....
> 				
> The problem is solved by overriding the isNullable() method for CheckGroup to return false.
>     @Override
>     public boolean isInputNullable() {
> 	return false;
> 		}
> Apologies for describing symptoms rather than mechanism. More experienced programmers in the office think the model for CheckGroup is not attached or detached properly when used in conjunction with the (Pattern)Validator.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Updated: (WICKET-486) NullPointerException when using CheckGroup and a Validator

Posted by "Ivana Cace (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/WICKET-486?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Ivana Cace updated WICKET-486:
------------------------------

    Summary: NullPointerException when using CheckGroup and a Validator  (was: nullvalue when using CheckGroup and a Validator)

> NullPointerException when using CheckGroup and a Validator
> ----------------------------------------------------------
>
>                 Key: WICKET-486
>                 URL: https://issues.apache.org/jira/browse/WICKET-486
>             Project: Wicket
>          Issue Type: Bug
>          Components: wicket
>    Affects Versions: 1.2.5
>         Environment: tomcat 5.5, java 1.5
>            Reporter: Ivana Cace
>
> Problem occurs when using a listView with a checkgroup in the same form with a input Validator. When the Validator detects invalid input *and* no items from the CheckGroup were selected, Wicket throws a NullPointer Exception on the first ListView item. 
> Specifically, in the Check class, the group.getInputAsArray() returns null and causes the NPE:
>      if (group.hasRawInput()) 	{
> 			final String[] input = group.getInputAsArray();
> 			for (int i = 0; i < input.length; i++)
> 			{ ....
> 				
> The problem is solved by overriding the isNullable() method for CheckGroup to return false.
>     @Override
>     public boolean isInputNullable() {
> 	return false;
> 		}
> Apologies for describing symptoms rather than mechanism. More experienced programmers in the office think the model for CheckGroup is not attached or detached properly when used in conjunction with the (Pattern)Validator.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Resolved: (WICKET-486) NullPointerException when using CheckGroup and a Validator

Posted by "Igor Vaynberg (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/WICKET-486?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Igor Vaynberg resolved WICKET-486.
----------------------------------

       Resolution: Fixed
    Fix Version/s: 1.2.6

> NullPointerException when using CheckGroup and a Validator
> ----------------------------------------------------------
>
>                 Key: WICKET-486
>                 URL: https://issues.apache.org/jira/browse/WICKET-486
>             Project: Wicket
>          Issue Type: Bug
>          Components: wicket
>    Affects Versions: 1.2.5
>         Environment: tomcat 5.5, java 1.5
>            Reporter: Ivana Cace
>         Assigned To: Igor Vaynberg
>             Fix For: 1.2.6
>
>
> Problem occurs when using a listView with a checkgroup in the same form with a input Validator. When the Validator detects invalid input *and* no items from the CheckGroup were selected, Wicket throws a NullPointer Exception on the first ListView item. 
> Specifically, in the Check class, the group.getInputAsArray() returns null and causes the NPE:
>      if (group.hasRawInput()) 	{
> 			final String[] input = group.getInputAsArray();
> 			for (int i = 0; i < input.length; i++)
> 			{ ....
> 				
> The problem is solved by overriding the isNullable() method for CheckGroup to return false.
>     @Override
>     public boolean isInputNullable() {
> 	return false;
> 		}
> Apologies for describing symptoms rather than mechanism. More experienced programmers in the office think the model for CheckGroup is not attached or detached properly when used in conjunction with the (Pattern)Validator.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.