0

I am working on a project in which I use RichFaces JSF implementation.

I use Jboss 5.1 application server and RichFaces 3.3.

The application works fine with RichFaces, untill I want to use a pickList component.

I get the following:

exception

javax.servlet.ServletException
    javax.faces.webapp.FacesServlet.service(FacesServlet.java:277)
    org.ajax4jsf.webapp.BaseXMLFilter.doXmlFilter(BaseXMLFilter.java:206)...

rootcause

java.lang.NullPointerException
    org.richfaces.renderkit.ConvertedSelectItem.get(ConvertedSelectItem.java:43)
    org.richfaces.renderkit.PickListRenderer.getConvertedItems(PickListRenderer.java:523)
    org.richfaces.renderkit.html.PickListRendererGen.doEncodeChildren(PickListRendererGen.java:283)
    org.richfaces.renderkit.html.PickListRendererGen.doEncodeChildren(PickListRendererGen.java:264)
    org.ajax4jsf.renderkit.RendererBase.encodeChildren(RendererBase.java:120)

Can anyone help me?

(Let me know if other details are needed)

Alina Danila
  • 1,683
  • 1
  • 24
  • 60
  • 1
    I guess there are problems with items list. Are you sure you provide correct list of items? How do you use the picklist on your JSF page? – DRCB Apr 04 '12 at 10:15
  • on my colleagues stations the page is properly displayed. It worked at some moment even on my station, but I don't know what hapened that I get this exception. – Alina Danila Apr 04 '12 at 10:37

1 Answers1

0
richfaces exception at rendering picklist

Add this code in your picklist.xhtml page

<h:panelGroup>
    <rich:pickList id="rightsList" listsHeight="92px;" 
    tabindex="7" sourceListWidth="340px;"
    value="#{userManagementForm.rightsPickList}"
    targetListWidth="340px;" showButtonsLabel="true"
    style="float:left;">
    <f:selectItems value="#{rightsList}" />
    </rich:pickList>
</h:panelGroup>
Pravin
  • 103
  • 1
  • 14
  • Do you possess some magic crystal ball that lets you see what the OP needs for markup? And can you, for the less initiated of us, explain why this fixes the OP's error? – mabi Mar 03 '14 at 11:20