[
https://issues.jboss.org/browse/GTNPORTAL-1910?page=com.atlassian.jira.pl...
]
Toshiya Kobayashi updated GTNPORTAL-1910:
-----------------------------------------
Description:
If you call org.exoplatform.webui.form.UIFormCheckBoxInput.setValue() with a String
"true", it will be evaluated as "false" because it parses only
Boolean, not String.
{noformat}
public UIFormInput setValue(T value)
{
if (value == null)
return super.setValue(value);
if (value instanceof Boolean)
{
checked = ((Boolean)value).booleanValue();
}
else if (boolean.class.isInstance(value))
{
checked = boolean.class.cast(value);
}
typeValue_ = (Class<T>)value.getClass();
return super.setValue(value);
}
{noformat}
The caller may be changed to pass a Boolean but fixing UIFormCheckBoxInput to accept a
String would be an essential resolution.
Actually org.exoplatform.ecm.webui.component.explorer.popup.admin.UIPropertyForm in
WCM(Site Publisher) is hitting this issue.
Please look at JBEPP-958 for reproduce steps with Site Publisher and the patch file which
can be applied to gatein trunk as well.
was:
If you call org.exoplatform.webui.form.UIFormCheckBoxInput.setValue() with a String
"true", it will be evaluated as "false" because it parses only
Boolean, not String.
====
public UIFormInput setValue(T value)
{
if (value == null)
return super.setValue(value);
if (value instanceof Boolean)
{
checked = ((Boolean)value).booleanValue();
}
else if (boolean.class.isInstance(value))
{
checked = boolean.class.cast(value);
}
typeValue_ = (Class<T>)value.getClass();
return super.setValue(value);
}
====
The caller may be changed to pass a Boolean but fixing UIFormCheckBoxInput to accept a
String would be an essential resolution.
Actually org.exoplatform.ecm.webui.component.explorer.popup.admin.UIPropertyForm in
WCM(Site Publisher) is hitting this issue.
Please look at JBEPP-958 for reproduce steps with Site Publisher and the patch file which
can be applied to gatein trunk.
UIFormCheckBoxInput.setValue() doesn't parse String
---------------------------------------------------
Key: GTNPORTAL-1910
URL:
https://issues.jboss.org/browse/GTNPORTAL-1910
Project: GateIn Portal
Issue Type: Bug
Security Level: Public(Everyone can see)
Components: WebUI
Affects Versions: 3.1.0-GA
Reporter: Toshiya Kobayashi
If you call org.exoplatform.webui.form.UIFormCheckBoxInput.setValue() with a String
"true", it will be evaluated as "false" because it parses only
Boolean, not String.
{noformat}
public UIFormInput setValue(T value)
{
if (value == null)
return super.setValue(value);
if (value instanceof Boolean)
{
checked = ((Boolean)value).booleanValue();
}
else if (boolean.class.isInstance(value))
{
checked = boolean.class.cast(value);
}
typeValue_ = (Class<T>)value.getClass();
return super.setValue(value);
}
{noformat}
The caller may be changed to pass a Boolean but fixing UIFormCheckBoxInput to accept a
String would be an essential resolution.
Actually org.exoplatform.ecm.webui.component.explorer.popup.admin.UIPropertyForm in
WCM(Site Publisher) is hitting this issue.
Please look at JBEPP-958 for reproduce steps with Site Publisher and the patch file which
can be applied to gatein trunk as well.
--
This message is automatically generated by JIRA.
For more information on JIRA, see:
http://www.atlassian.com/software/jira