4 Replies Latest reply on Feb 25, 2009 5:51 AM by marmalis

    NullPointerException in ELexpression (<rich:suggestionbox>)

      I have the next code:

       <script type="text/javascript">
       function doNothing(){
       }
       </script>
      
       <h:panelGrid columns="2" border="0" cellpadding="0" cellspacing="0">
       <h:inputText value="#{bean.text}" id="textId"\>
       <h:graphicImage value="/img/arrow.png"
       onclick="#{rich:component('sugg')}.callSuggestion(true)"
       alt="" />
       </h:panelGrid>
      
       <rich:suggestionbox for="textId id="sugg"
       usingSuggestObjects="true"
       onobjectchange="doNothing()"
       suggestionAction="#{bean.autocomplete}"
       var="region">
       <h:column>
       <h:outputText value="#{region.text}" width="260"/>
       </h:column>
       </rich:suggestionbox>
       </h:form>
      


      When i use:
      javax.faces.STATE_SAVING_METHOD='client'

      i have the next exception:

      java.lang.NullPointerException
       at org.apache.el.lang.FunctionMapperImpl$Function.writeExternal(FunctionMapperImpl.java:123)
       at java.io.ObjectOutputStream.writeExternalData(ObjectOutputStream.java:1310)
      ........
       at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:583)
       at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:446)
       at java.lang.Thread.run(Thread.java:595)
      18:09:28,198 WARN [lifecycle] executePhase(RENDER_RESPONSE 6,com.sun.faces.context.FacesContextImpl@140037d) threw exception
      java.lang.NullPointerException
       at org.apache.el.lang.FunctionMapperImpl$Function.writeExternal(FunctionMapperImpl.java:123)
       at java.io.ObjectOutputStream.writeExternalData(ObjectOutputStream.java:1310)
      .........
       at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:446)
       at java.lang.Thread.run(Thread.java:595)
      Caused by: java.lang.NullPointerException
       at org.apache.el.lang.FunctionMapperImpl$Function.writeExternal(FunctionMapperImpl.java:123)
       at java.io.ObjectOutputStream.writeExternalData(ObjectOutputStream.java:1310)
      ..........
      




      if i use javax.faces.STATE_SAVING_METHOD='server'
      it works fine.

      What i can change in code if i want use STATE_SAVING_METHOD='client'?
      Thank you!