You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@wicket.apache.org by "Minto van der Sluis (JIRA)" <ji...@apache.org> on 2008/10/24 08:55:44 UTC
[jira] Created: (WICKET-1893) Extend FormTester to easily handle
CheckBox components.
Extend FormTester to easily handle CheckBox components.
-------------------------------------------------------
Key: WICKET-1893
URL: https://issues.apache.org/jira/browse/WICKET-1893
Project: Wicket
Issue Type: Improvement
Components: wicket
Affects Versions: 1.3.5, 1.3.6, 1.4-M4, 1.5-M1
Reporter: Minto van der Sluis
Priority: Minor
Add methods to the FormTester to support unittesting CheckBox.
The following methods could be added:
public boolean getCheckBoxComponentValue(java.lang.String id);
public void setValue(java.lang.String formComponentId, boolean value);
When the given component ID is not a CheckBox (or one of its subclasses) then these methods could/should throw an exception.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Resolved: (WICKET-1893) Extend FormTester to easily handle
CheckBox components.
Posted by "Timo Rantalaiho (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/WICKET-1893?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Timo Rantalaiho resolved WICKET-1893.
-------------------------------------
Resolution: Fixed
Fix Version/s: 1.4-RC2
Committed a fix for this in 1.4, the workaround is enough for 1.3.
> Extend FormTester to easily handle CheckBox components.
> -------------------------------------------------------
>
> Key: WICKET-1893
> URL: https://issues.apache.org/jira/browse/WICKET-1893
> Project: Wicket
> Issue Type: Improvement
> Components: wicket
> Affects Versions: 1.3.5, 1.4-M3
> Reporter: Minto van der Sluis
> Assignee: Timo Rantalaiho
> Priority: Minor
> Fix For: 1.4-RC2
>
>
> Add methods to the FormTester to support unittesting CheckBox.
> The following methods could be added:
> public boolean getCheckBoxComponentValue(java.lang.String id);
> public void setValue(java.lang.String formComponentId, boolean value);
> When the given component ID is not a CheckBox (or one of its subclasses) then these methods could/should throw an exception.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Commented: (WICKET-1893) Extend FormTester to easily handle
CheckBox components.
Posted by "Timo Rantalaiho (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/WICKET-1893?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12643456#action_12643456 ]
Timo Rantalaiho commented on WICKET-1893:
-----------------------------------------
Ah, here you have it
formTester.setValue( getCheckboxPath(), "on" ); // check
formTester.setValue( getCheckboxPath(), "off" ); // uncheck
http://www.nabble.com/how-to-unittest-a-checkbox-tt20106917.html#a20130698
> Extend FormTester to easily handle CheckBox components.
> -------------------------------------------------------
>
> Key: WICKET-1893
> URL: https://issues.apache.org/jira/browse/WICKET-1893
> Project: Wicket
> Issue Type: Improvement
> Components: wicket
> Affects Versions: 1.3.5, 1.4-M3
> Reporter: Minto van der Sluis
> Assignee: Timo Rantalaiho
> Priority: Minor
>
> Add methods to the FormTester to support unittesting CheckBox.
> The following methods could be added:
> public boolean getCheckBoxComponentValue(java.lang.String id);
> public void setValue(java.lang.String formComponentId, boolean value);
> When the given component ID is not a CheckBox (or one of its subclasses) then these methods could/should throw an exception.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Updated: (WICKET-1893) Extend FormTester to easily handle
CheckBox components.
Posted by "Timo Rantalaiho (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/WICKET-1893?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Timo Rantalaiho updated WICKET-1893:
------------------------------------
Affects Version/s: (was: 1.4-M4)
(was: 1.3.6)
(was: 1.5-M1)
1.4-M3
Assignee: Timo Rantalaiho
Have you tried
setValue(checkBoxId, "true");
?
Maybe it would be enough to just have overridden
setValue(checkBoxId, true)
I don't think that the getter is warranted -- what would be the use of it exactly?
> Extend FormTester to easily handle CheckBox components.
> -------------------------------------------------------
>
> Key: WICKET-1893
> URL: https://issues.apache.org/jira/browse/WICKET-1893
> Project: Wicket
> Issue Type: Improvement
> Components: wicket
> Affects Versions: 1.3.5, 1.4-M3
> Reporter: Minto van der Sluis
> Assignee: Timo Rantalaiho
> Priority: Minor
>
> Add methods to the FormTester to support unittesting CheckBox.
> The following methods could be added:
> public boolean getCheckBoxComponentValue(java.lang.String id);
> public void setValue(java.lang.String formComponentId, boolean value);
> When the given component ID is not a CheckBox (or one of its subclasses) then these methods could/should throw an exception.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.