You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@myfaces.apache.org by "dennis hoersch (JIRA)" <de...@myfaces.apache.org> on 2013/08/12 11:45:47 UTC
[jira] [Created] (MYFACES-3748) Bug in check for required attribute
at Composite Components
dennis hoersch created MYFACES-3748:
---------------------------------------
Summary: Bug in check for required attribute at Composite Components
Key: MYFACES-3748
URL: https://issues.apache.org/jira/browse/MYFACES-3748
Project: MyFaces Core
Issue Type: Bug
Affects Versions: 2.1.12
Reporter: dennis hoersch
The check for required attributes at Composite Components in CompositeComponentResourceTagHandler does not parses literal booleans right. It uses Boolean.getBoolen(systemProperty) which looks up a System property with the given name. Boolean.valueOf(string) should be used instead:
CompositeComponentResourceTagHandler.createComponent(FaceletContext)
Object value = ve.getValue(facesContext.getELContext());
Boolean required = null;
if (value instanceof Boolean)
{
required = (Boolean) value;
}
else if (value != null)
{
required = Boolean.valueOf(value.toString());
}
if (required != null && required.booleanValue())
{
Object attrValue = this.tag.getAttributes().get (propertyDescriptor.getName());
if (attrValue == null)
{
throw new TagException(this.tag, "Attribute '" + propertyDescriptor.getName()
+ "' is required");
}
}
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira