0 Replies Latest reply on Jul 8, 2008 6:16 AM by Eivind Rønnevik

    Why doesn't ReRendering work on componentBindings?

    Eivind Rønnevik Newbie


      I have a question when it comes to reRendering.

      If I have a h:outputText with a valuebinding pointing to a backing-beans property, I can reRender this outputText if I my value in bb change.

      But If I have a h:panelGrid with componentBinding, and in the getter of the HtmlPanelGrid I add an OutputText-component programmatically, I can't reRender the HtmlPanelgrid with it's children. The getter for the componentBinding is never asked.

      I've also tried to put my panelGrid inside an a4j:panel with ajaxRendered="true", but this didn't help me either.

      Am I missing something obvious here or shouldn't this work? :)

      So, this works:

      <h:inputText id="myinput" value="#{userBean.name}">
       <a4j:support event="onkeyup" reRender="outtext" />
       <h:outputText id="outtext" value="#{userBean.name}" />

      But this doesnt:
       <h:inputText id="myinput" value="#{userBean.name}">
       <a4j:support event="onkeyup" reRender="outPanel" />
       <h:panelGrid id="outPanel" binding="#{userBean.panelGrid}">
      //----------------------------- JAVA code for componentBinding ---------------
      public HtmlPanelGrid getPanelgrid()
       HtmlOutpuText out = new HtmlOutputText();
       out.setValueExpression(FacesContext. getCurrent...........#{userBean.name}......);
       return panelGrid;