6 Replies Latest reply on Jun 25, 2009 9:07 PM by demetrio812

    Can't reRender a binded h:panelGrid

    demetrio812 Apprentice

      I've binded a h:panelGrid that generate a list of components based on an array.

      I also have an a:commandButton to add an element to the array and regenerate the UIPanel of the binded component.

      The problem is that it is not updating, the list is inside a conversation (the component is outjected with EVENT scope) so if I refresh the page from the browser the panel is updated but if I reRender it doesn't work.

      The strange thing is that it doesn't work also with h:commandButton.

      Also, if I try to render the content of the UIPanel inside an h:outputText I can see it is updated after pushing the button.

      This is m code:

      public class AdvancedSearchHelper {
       @Out(scope = ScopeType.EVENT, required = false)
       UIPanel dynamicPropertiesUI;
       @Factory(value = "dynamicPropertiesUI", autoCreate = true)
       public void fillIn() {
       HtmlPanelGrid mainPanel = new HtmlPanelGrid();
       for (GenericSearchProperty property : getProperties()) {
       dynamicPropertiesUI = mainPanel;

      and the XHTML is:

       <h:panelGrid id="propertiesPanel" columns="1">
       <h:panelGrid binding="#{dynamicPropertiesUI}"/>
       <a:commandButton action="#{advancedSearchHelper.addSearchProperty}" value="+" ajaxSingle="true"
       reRender="propertiesPanel" />

      How can I solve this?

      Thank you!