Hi!
I tried to post this question on the RichFaces user list, but didn't get any replies there so I try here instead.
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:inputText> <h:outputText id="outtext" value="#{userBean.name}" />
<h:inputText id="myinput" value="#{userBean.name}"> <a4j:support event="onkeyup" reRender="outPanel" /> </h:inputText> <h:panelGrid id="outPanel" binding="#{userBean.panelGrid}"> </h:panelGrid> //----------------------------- JAVA code for componentBinding --------------- public HtmlPanelGrid getPanelgrid() { HtmlOutpuText out = new HtmlOutputText(); out.setValueExpression(FacesContext. getCurrent...........#{userBean.name}......); panelGrid.getChildren().add(out); return panelGrid; }
userBean should be request scoped.