You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tapestry.apache.org by bu...@apache.org on 2004/03/11 06:07:06 UTC
DO NOT REPLY [Bug 27591] New: -
RadioGroup can not select the correct radion option
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://issues.apache.org/bugzilla/show_bug.cgi?id=27591>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND
INSERTED IN THE BUG DATABASE.
http://issues.apache.org/bugzilla/show_bug.cgi?id=27591
RadioGroup can not select the correct radion option
Summary: RadioGroup can not select the correct radion option
Product: Tapestry
Version: 3.0
Platform: Other
OS/Version: Other
Status: NEW
Severity: Critical
Priority: Other
Component: Framework
AssignedTo: tapestry-dev@jakarta.apache.org
ReportedBy: erazor_kwan@hotmail.com
When using the raido option with the radion group, if the default selected
option was null. The radion group will set every radion option to "checked"
In
org.apache.tapestry.form.RadioGroup
public boolean isSelection(Object value)
{
if (!_rendering)
throw Tapestry.createRenderOnlyPropertyException
(this, "selection");
if (_selection == value)
return true;
if (_selection == null || value == null)
return false;
return _selection.equals(value);
}
if the value or selection was null, it will return true.
So we need to check the nullpointer before _selection = value
The currect version should be
public boolean isSelection(Object value)
{
if (!_rendering)
throw Tapestry.createRenderOnlyPropertyException
(this, "selection");
if (_selection == null || value == null)
return false;
if (_selection == value)
return true;
return _selection.equals(value);
}
---------------------------------------------------------------------
To unsubscribe, e-mail: tapestry-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tapestry-dev-help@jakarta.apache.org