myfaces-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Michael Kurz (JIRA)" <...@myfaces.apache.org>
Subject [jira] [Commented] (MYFACES-2552) TagValueExpression.getType() returns null if the property in the managed bean is null and the expression points to a facelets composite component attribute
Date Wed, 21 Sep 2011 17:20:09 GMT

    [ https://issues.apache.org/jira/browse/MYFACES-2552?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13109672#comment-13109672
] 

Michael Kurz commented on MYFACES-2552:
---------------------------------------

It's no real issue for me at present and there are several ways to make it work (with detours).
But I am convinced this should be fixed as IMO this is basic functionality.

> TagValueExpression.getType() returns null if the property in the managed bean is null
and the expression points to a facelets composite component attribute
> -----------------------------------------------------------------------------------------------------------------------------------------------------------
>
>                 Key: MYFACES-2552
>                 URL: https://issues.apache.org/jira/browse/MYFACES-2552
>             Project: MyFaces Core
>          Issue Type: Bug
>          Components: JSR-314
>    Affects Versions: 2.1.0
>            Reporter: Jakob Korherr
>            Assignee: Jakob Korherr
>         Attachments: MYFACES-2552-spec-proposal.patch
>
>
> if you have a facelets composite component with an attribute "test" that points to a
property in a managed bean (e.g. #{myBean.property}) which is currently null and you refer
to that attribute in the implementation via #{cc.attrs.test} you can get the current value
(null) or set a new value but you cannot get the type of the property (e.g. String[]). However
if the property in the managed bean is non-null you can get the type.
> For example:
> <cc:interface name="mycomponent">
>     <cc:attribute name="test" required="true"/>
> </cc:interface>
> <cc:implementation>
>     <h:selectManyListbox value="#{cc.attrs.test}">
>         <f:selectItems value="#{some select items}"/>
>     </h:selectManyListbox>
> </cc:implementation>
> --> calling #{cc.attrs.test}.getType() will fail if #{cc.attrs.test} resolves to null,
but will work if #{cc.attrs.test} resolves to some valid value.
> This currently results in a NullPointerException in _SharedRendererUtils.getConvertedUISelectManyValue().

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

Mime
View raw message