You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@wicket.apache.org by "Kent Tong (JIRA)" <ji...@apache.org> on 2007/12/12 16:23:43 UTC

[jira] Created: (WICKET-1221) setRequired(true) will force a Checkbox to be checked

setRequired(true) will force a Checkbox to be checked
-----------------------------------------------------

                 Key: WICKET-1221
                 URL: https://issues.apache.org/jira/browse/WICKET-1221
             Project: Wicket
          Issue Type: Improvement
          Components: wicket
    Affects Versions: 1.3.0-beta4
            Reporter: Kent Tong
            Priority: Minor


If you call setRequired(true) on a Checkbox, then if the user clear the checkbox, it will be treated as an error. Suggest overriding checkRequired() 
in the Checkbox class to always return true.

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


[jira] Reopened: (WICKET-1221) setRequired(true) will force a Checkbox to be checked

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

Johan Compagner reopened WICKET-1221:
-------------------------------------


i already thought we already reverted this again.?
But setRequired should be a no operation on a boolean 

For this a tristate checkbox is the only option not a normal one.

> setRequired(true) will force a Checkbox to be checked
> -----------------------------------------------------
>
>                 Key: WICKET-1221
>                 URL: https://issues.apache.org/jira/browse/WICKET-1221
>             Project: Wicket
>          Issue Type: Improvement
>          Components: wicket
>    Affects Versions: 1.3.0-beta4
>            Reporter: Kent Tong
>            Assignee: Igor Vaynberg
>            Priority: Minor
>
> If you call setRequired(true) on a Checkbox, then if the user clear the checkbox, it will be treated as an error. Suggest overriding checkRequired() 
> in the Checkbox class to always return true.

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


[jira] Commented: (WICKET-1221) setRequired(true) will force a Checkbox to be checked

Posted by "Kent Tong (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/WICKET-1221?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12598266#action_12598266 ] 

Kent Tong commented on WICKET-1221:
-----------------------------------

According to the thread http://www.nabble.com/-VOTE--meaning-of-setRequired(true)-on-a-Checkbox-td15220180.html I believe the vote is passed. Please reopen this issue. Thanks!

> setRequired(true) will force a Checkbox to be checked
> -----------------------------------------------------
>
>                 Key: WICKET-1221
>                 URL: https://issues.apache.org/jira/browse/WICKET-1221
>             Project: Wicket
>          Issue Type: Improvement
>          Components: wicket
>    Affects Versions: 1.3.0-beta4
>            Reporter: Kent Tong
>            Assignee: Igor Vaynberg
>            Priority: Minor
>
> If you call setRequired(true) on a Checkbox, then if the user clear the checkbox, it will be treated as an error. Suggest overriding checkRequired() 
> in the Checkbox class to always return true.

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


[jira] Updated: (WICKET-1221) setRequired(true) will force a Checkbox to be checked

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

Frank Bille Jensen updated WICKET-1221:
---------------------------------------

    Fix Version/s:     (was: 1.3.1)

> setRequired(true) will force a Checkbox to be checked
> -----------------------------------------------------
>
>                 Key: WICKET-1221
>                 URL: https://issues.apache.org/jira/browse/WICKET-1221
>             Project: Wicket
>          Issue Type: Improvement
>          Components: wicket
>    Affects Versions: 1.3.0-beta4
>            Reporter: Kent Tong
>            Assignee: Igor Vaynberg
>            Priority: Minor
>
> If you call setRequired(true) on a Checkbox, then if the user clear the checkbox, it will be treated as an error. Suggest overriding checkRequired() 
> in the Checkbox class to always return true.

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


[jira] Resolved: (WICKET-1221) setRequired(true) will force a Checkbox to be checked

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

Igor Vaynberg resolved WICKET-1221.
-----------------------------------

       Resolution: Won't Fix
    Fix Version/s:     (was: 1.3.0-final)
                   1.3.1

> setRequired(true) will force a Checkbox to be checked
> -----------------------------------------------------
>
>                 Key: WICKET-1221
>                 URL: https://issues.apache.org/jira/browse/WICKET-1221
>             Project: Wicket
>          Issue Type: Improvement
>          Components: wicket
>    Affects Versions: 1.3.0-beta4
>            Reporter: Kent Tong
>            Assignee: Igor Vaynberg
>            Priority: Minor
>             Fix For: 1.3.1
>
>
> If you call setRequired(true) on a Checkbox, then if the user clear the checkbox, it will be treated as an error. Suggest overriding checkRequired() 
> in the Checkbox class to always return true.

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


[jira] Commented: (WICKET-1221) setRequired(true) will force a Checkbox to be checked

Posted by "Igor Vaynberg (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/WICKET-1221?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12556466#action_12556466 ] 

Igor Vaynberg commented on WICKET-1221:
---------------------------------------

i have reverted this. see WICKET-1260

> setRequired(true) will force a Checkbox to be checked
> -----------------------------------------------------
>
>                 Key: WICKET-1221
>                 URL: https://issues.apache.org/jira/browse/WICKET-1221
>             Project: Wicket
>          Issue Type: Improvement
>          Components: wicket
>    Affects Versions: 1.3.0-beta4
>            Reporter: Kent Tong
>            Assignee: Igor Vaynberg
>            Priority: Minor
>             Fix For: 1.3.0-final
>
>
> If you call setRequired(true) on a Checkbox, then if the user clear the checkbox, it will be treated as an error. Suggest overriding checkRequired() 
> in the Checkbox class to always return true.

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


[jira] Commented: (WICKET-1221) setRequired(true) will force a Checkbox to be checked

Posted by "Kent Tong (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/WICKET-1221?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12564305#action_12564305 ] 

Kent Tong commented on WICKET-1221:
-----------------------------------

You will start a vote, right?

> setRequired(true) will force a Checkbox to be checked
> -----------------------------------------------------
>
>                 Key: WICKET-1221
>                 URL: https://issues.apache.org/jira/browse/WICKET-1221
>             Project: Wicket
>          Issue Type: Improvement
>          Components: wicket
>    Affects Versions: 1.3.0-beta4
>            Reporter: Kent Tong
>            Assignee: Igor Vaynberg
>            Priority: Minor
>
> If you call setRequired(true) on a Checkbox, then if the user clear the checkbox, it will be treated as an error. Suggest overriding checkRequired() 
> in the Checkbox class to always return true.

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


[jira] Commented: (WICKET-1221) setRequired(true) will force a Checkbox to be checked

Posted by "Igor Vaynberg (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/WICKET-1221?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12564307#action_12564307 ] 

Igor Vaynberg commented on WICKET-1221:
---------------------------------------

no, you should - its your issue

> setRequired(true) will force a Checkbox to be checked
> -----------------------------------------------------
>
>                 Key: WICKET-1221
>                 URL: https://issues.apache.org/jira/browse/WICKET-1221
>             Project: Wicket
>          Issue Type: Improvement
>          Components: wicket
>    Affects Versions: 1.3.0-beta4
>            Reporter: Kent Tong
>            Assignee: Igor Vaynberg
>            Priority: Minor
>
> If you call setRequired(true) on a Checkbox, then if the user clear the checkbox, it will be treated as an error. Suggest overriding checkRequired() 
> in the Checkbox class to always return true.

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


[jira] Commented: (WICKET-1221) setRequired(true) will force a Checkbox to be checked

Posted by "Eelco Hillenius (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/WICKET-1221?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12564319#action_12564319 ] 

Eelco Hillenius commented on WICKET-1221:
-----------------------------------------

I agree this behavior is weird

> setRequired(true) will force a Checkbox to be checked
> -----------------------------------------------------
>
>                 Key: WICKET-1221
>                 URL: https://issues.apache.org/jira/browse/WICKET-1221
>             Project: Wicket
>          Issue Type: Improvement
>          Components: wicket
>    Affects Versions: 1.3.0-beta4
>            Reporter: Kent Tong
>            Assignee: Igor Vaynberg
>            Priority: Minor
>
> If you call setRequired(true) on a Checkbox, then if the user clear the checkbox, it will be treated as an error. Suggest overriding checkRequired() 
> in the Checkbox class to always return true.

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


[jira] Reopened: (WICKET-1221) setRequired(true) will force a Checkbox to be checked

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

Igor Vaynberg reopened WICKET-1221:
-----------------------------------


rolling back


> setRequired(true) will force a Checkbox to be checked
> -----------------------------------------------------
>
>                 Key: WICKET-1221
>                 URL: https://issues.apache.org/jira/browse/WICKET-1221
>             Project: Wicket
>          Issue Type: Improvement
>          Components: wicket
>    Affects Versions: 1.3.0-beta4
>            Reporter: Kent Tong
>            Assignee: Igor Vaynberg
>            Priority: Minor
>             Fix For: 1.3.1
>
>
> If you call setRequired(true) on a Checkbox, then if the user clear the checkbox, it will be treated as an error. Suggest overriding checkRequired() 
> in the Checkbox class to always return true.

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


[jira] Commented: (WICKET-1221) setRequired(true) will force a Checkbox to be checked

Posted by "Igor Vaynberg (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/WICKET-1221?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12564299#action_12564299 ] 

Igor Vaynberg commented on WICKET-1221:
---------------------------------------

i think so, i was hoping more core devs would give their opinion, but only johan participated.

> setRequired(true) will force a Checkbox to be checked
> -----------------------------------------------------
>
>                 Key: WICKET-1221
>                 URL: https://issues.apache.org/jira/browse/WICKET-1221
>             Project: Wicket
>          Issue Type: Improvement
>          Components: wicket
>    Affects Versions: 1.3.0-beta4
>            Reporter: Kent Tong
>            Assignee: Igor Vaynberg
>            Priority: Minor
>
> If you call setRequired(true) on a Checkbox, then if the user clear the checkbox, it will be treated as an error. Suggest overriding checkRequired() 
> in the Checkbox class to always return true.

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


[jira] Resolved: (WICKET-1221) setRequired(true) will force a Checkbox to be checked

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

Igor Vaynberg resolved WICKET-1221.
-----------------------------------

       Resolution: Fixed
    Fix Version/s: 1.3.0-rc3
         Assignee: Igor Vaynberg

> setRequired(true) will force a Checkbox to be checked
> -----------------------------------------------------
>
>                 Key: WICKET-1221
>                 URL: https://issues.apache.org/jira/browse/WICKET-1221
>             Project: Wicket
>          Issue Type: Improvement
>          Components: wicket
>    Affects Versions: 1.3.0-beta4
>            Reporter: Kent Tong
>            Assignee: Igor Vaynberg
>            Priority: Minor
>             Fix For: 1.3.0-rc3
>
>
> If you call setRequired(true) on a Checkbox, then if the user clear the checkbox, it will be treated as an error. Suggest overriding checkRequired() 
> in the Checkbox class to always return true.

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


[jira] Commented: (WICKET-1221) setRequired(true) will force a Checkbox to be checked

Posted by "Kent Tong (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/WICKET-1221?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12564266#action_12564266 ] 

Kent Tong commented on WICKET-1221:
-----------------------------------

Please see the thread at http://www.nabble.com/%22required%22-for-Checkbox-ts14662131.html#a14680214

Do you think a vote is needed?

> setRequired(true) will force a Checkbox to be checked
> -----------------------------------------------------
>
>                 Key: WICKET-1221
>                 URL: https://issues.apache.org/jira/browse/WICKET-1221
>             Project: Wicket
>          Issue Type: Improvement
>          Components: wicket
>    Affects Versions: 1.3.0-beta4
>            Reporter: Kent Tong
>            Assignee: Igor Vaynberg
>            Priority: Minor
>
> If you call setRequired(true) on a Checkbox, then if the user clear the checkbox, it will be treated as an error. Suggest overriding checkRequired() 
> in the Checkbox class to always return true.

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


[jira] Updated: (WICKET-1221) setRequired(true) will force a Checkbox to be checked

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

Frank Bille Jensen updated WICKET-1221:
---------------------------------------

    Fix Version/s:     (was: 1.3.0-rc3)
                   1.3.0-final

> setRequired(true) will force a Checkbox to be checked
> -----------------------------------------------------
>
>                 Key: WICKET-1221
>                 URL: https://issues.apache.org/jira/browse/WICKET-1221
>             Project: Wicket
>          Issue Type: Improvement
>          Components: wicket
>    Affects Versions: 1.3.0-beta4
>            Reporter: Kent Tong
>            Assignee: Igor Vaynberg
>            Priority: Minor
>             Fix For: 1.3.0-final
>
>
> If you call setRequired(true) on a Checkbox, then if the user clear the checkbox, it will be treated as an error. Suggest overriding checkRequired() 
> in the Checkbox class to always return true.

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


[jira] Commented: (WICKET-1221) setRequired(true) will force a Checkbox to be checked

Posted by "Igor Vaynberg (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/WICKET-1221?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12556471#action_12556471 ] 

Igor Vaynberg commented on WICKET-1221:
---------------------------------------

if you feel that strongly about it then bring it up on the list

strictly speaking in html the absense of check means there is no value in post vars  - eg required makes sense but depends on what abstraction you are thinking about it.

> setRequired(true) will force a Checkbox to be checked
> -----------------------------------------------------
>
>                 Key: WICKET-1221
>                 URL: https://issues.apache.org/jira/browse/WICKET-1221
>             Project: Wicket
>          Issue Type: Improvement
>          Components: wicket
>    Affects Versions: 1.3.0-beta4
>            Reporter: Kent Tong
>            Assignee: Igor Vaynberg
>            Priority: Minor
>             Fix For: 1.3.1
>
>
> If you call setRequired(true) on a Checkbox, then if the user clear the checkbox, it will be treated as an error. Suggest overriding checkRequired() 
> in the Checkbox class to always return true.

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


[jira] Commented: (WICKET-1221) setRequired(true) will force a Checkbox to be checked

Posted by "Kent Tong (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/WICKET-1221?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12556469#action_12556469 ] 

Kent Tong commented on WICKET-1221:
-----------------------------------

I think "required" means that a value must be provided. For a check box, if it is checked, it has a value of true. if it is unchecked, it has a value of false. Treating "required" as "having a value of true" doesn't sound correct to me.

If you consider the error message that should be used, for the case of 
forcing the user to check the box, it should say "you must check xxx", which
is quite different from the error message for "required": "you must provide
xxx".

For the former use case, I think an IsChecked validator should be used, which
can provide a much better default error message.

> setRequired(true) will force a Checkbox to be checked
> -----------------------------------------------------
>
>                 Key: WICKET-1221
>                 URL: https://issues.apache.org/jira/browse/WICKET-1221
>             Project: Wicket
>          Issue Type: Improvement
>          Components: wicket
>    Affects Versions: 1.3.0-beta4
>            Reporter: Kent Tong
>            Assignee: Igor Vaynberg
>            Priority: Minor
>             Fix For: 1.3.1
>
>
> If you call setRequired(true) on a Checkbox, then if the user clear the checkbox, it will be treated as an error. Suggest overriding checkRequired() 
> in the Checkbox class to always return true.

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