Fix errors when using nxdir:selectItems with a condition on attribute 
itemRendered
----------------------------------------------------------------------------------

                 Key: NXP-6619
                 URL: https://jira.nuxeo.com/browse/NXP-6619
             Project: Nuxeo Enterprise Platform
          Issue Type: Bug
    Affects Versions: 5.4.1
            Reporter: Anahide Tchertchian
            Assignee: Anahide Tchertchian
             Fix For: 5.4.2


When the nxdir:selectItems component is used with a condition on 
"itemRendered", every item that is not rendered will produce a 
NullPointerException:

for instance, using:
<h:form>
  <h:selectOneMenu>
    <nxdir:selectItems
      directoryName="topic"
      var="item"
      itemValue="#{item.id}"
      itemLabel="#{item.vocabulary.label}"
      itemRendered="#{item.id != 'art'}" />
  </h:selectOneMenu>
</h:form>

Will cause:

15:16:26,010 ERROR [BaseXMLFilter] Exception in the filter chain
javax.servlet.ServletException
        at javax.faces.webapp.FacesServlet.service(FacesServlet.java:277)
        at 
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
...
Caused by: java.lang.NullPointerException
        at 
com.sun.faces.renderkit.html_basic.MenuRenderer.renderOption(MenuRenderer.java:480)
        at 
com.sun.faces.renderkit.html_basic.MenuRenderer.renderOptions(MenuRenderer.java:772)
        at 
com.sun.faces.renderkit.html_basic.MenuRenderer.renderSelect(MenuRenderer.java:832)


-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: 
https://jira.nuxeo.com/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        
_______________________________________________
ECM-tickets mailing list
[email protected]
http://lists.nuxeo.com/mailman/listinfo/ecm-tickets

Reply via email to