ICEfaces
  1. ICEfaces
  2. ICE-7766

ace:ajax throws NullPointerException within a h:commandButton

    Details

    • Type: Bug Bug
    • Status: Open
    • Priority: Major Major
    • Resolution: Unresolved
    • Affects Version/s: 3.0
    • Fix Version/s: None
    • Component/s: ACE-Components
    • Labels:
      None
    • Environment:
      Tomcat 7, Mojarra 2.1.6
    • Workaround Description:
      use f:ajax (but not sure if onevent works the same way onComplete and so on do)

      Description

      I've added a ace:ajax tag into a h:commandButton:

      <h:commandButton value="#{msg['rt.aktualisieren']}" action="#{updateExternerAdressatTextAction.execute}" onclick="cleanupRte();">
        <ace:ajax execute="@this" render="@all" />
      </h:commandButton>

      But I get a NullPointerException:

      java.lang.NullPointerException
      at org.icefaces.ace.util.JSONBuilder.escapeString(JSONBuilder.java:365)
      at org.icefaces.ace.util.JSONBuilder.entry(JSONBuilder.java:287)
      at org.icefaces.ace.util.JSONBuilder.entry(JSONBuilder.java:272)
      at org.icefaces.ace.component.ajax.AjaxBehaviorRenderer.getScript(AjaxBehaviorRenderer.java:80)
      at javax.faces.component.behavior.ClientBehaviorBase.getScript(ClientBehaviorBase.java:103)
      at com.sun.faces.renderkit.RenderKitUtils.appendBehaviorsToChain(RenderKitUtils.java:1418)
      at com.sun.faces.renderkit.RenderKitUtils.getChainedHandler(RenderKitUtils.java:1556)
      at com.sun.faces.renderkit.RenderKitUtils.renderHandler(RenderKitUtils.java:1721)
      at com.sun.faces.renderkit.RenderKitUtils.renderOnclick(RenderKitUtils.java:452)
      at com.sun.faces.renderkit.html_basic.ButtonRenderer.encodeBegin(ButtonRenderer.java:166)
      at javax.faces.component.UIComponentBase.encodeBegin(UIComponentBase.java:820)
      at javax.faces.component.UIComponent.encodeAll(UIComponent.java:1755)
      at javax.faces.render.Renderer.encodeChildren(Renderer.java:168)
      at org.icefaces.impl.renderkit.RendererWrapper.encodeChildren(RendererWrapper.java:49)
      at javax.faces.component.UIComponentBase.encodeChildren(UIComponentBase.java:845)
      at javax.faces.component.UIComponent.encodeAll(UIComponent.java:1757)
      at javax.faces.component.UIComponent.encodeAll(UIComponent.java:1760)
      at javax.faces.component.UIComponent.encodeAll(UIComponent.java:1760)
      at com.sun.faces.application.view.FaceletViewHandlingStrategy.renderView(FaceletViewHandlingStrategy.java:402)
      at com.sun.faces.application.view.MultiViewHandler.renderView(MultiViewHandler.java:131)
      at javax.faces.application.ViewHandlerWrapper.renderView(ViewHandlerWrapper.java:288)
      at javax.faces.application.ViewHandlerWrapper.renderView(ViewHandlerWrapper.java:288)
      at com.sun.faces.lifecycle.RenderResponsePhase.execute(RenderResponsePhase.java:121)
      at com.sun.faces.lifecycle.Phase.doPhase(Phase.java:101)
      at com.sun.faces.lifecycle.LifecycleImpl.render(LifecycleImpl.java:139)
      at javax.faces.webapp.FacesServlet.service(FacesServlet.java:594)
      ...

        Activity

        Hide
        Antonio Varela added a comment - - edited

        I can confirm the same issue with a <h:selectOneMenu>. Same error and similar stack trace. (Tomcat 7.0.22, Mojarra 2.1.1)

        Show
        Antonio Varela added a comment - - edited I can confirm the same issue with a <h:selectOneMenu>. Same error and similar stack trace. (Tomcat 7.0.22, Mojarra 2.1.1)
        Hide
        Kevin Gunn added a comment -

        I also had this exception using the ace:ajax inside a h:selectOneMenu. Resolved by reverting back to the f:ajax core tag.

        Listener method takes a AjaxBehaviorEvent parameter but it's not as complete as icefaces DateSelectEvent.

        Show
        Kevin Gunn added a comment - I also had this exception using the ace:ajax inside a h:selectOneMenu. Resolved by reverting back to the f:ajax core tag. Listener method takes a AjaxBehaviorEvent parameter but it's not as complete as icefaces DateSelectEvent.
        Hide
        Mark Collette added a comment - - edited

        Please re-try using ace:ajax with h:commandButton, since some work was done after 3.0 in ICE-7909 to support ace:ajax working with h: components.

        Show
        Mark Collette added a comment - - edited Please re-try using ace:ajax with h:commandButton, since some work was done after 3.0 in ICE-7909 to support ace:ajax working with h: components.

          People

          • Assignee:
            Unassigned
            Reporter:
            Werner Mueller
          • Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

            • Created:
              Updated: