[ 
https://issues.apache.org/jira/browse/MYFACES-3748?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Leonardo Uribe resolved MYFACES-3748.
-------------------------------------

       Resolution: Fixed
    Fix Version/s: 2.1.13
                   2.0.19
         Assignee: Leonardo Uribe

Thanks to Dennis Hoersch for provide this patch.
                
> 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
>            Assignee: Leonardo Uribe
>             Fix For: 2.0.19, 2.1.13
>
>
> 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

Reply via email to