2 Replies Latest reply on Apr 30, 2008 8:08 AM by kdcosta

    action after rendering

    kdcosta

      hi

      i have used a tree menu in my page.
      i also have a <a4j:commandLink> its rendred property is binding to backing bean and at first it is set to false.

      so when the tree node, i have to make this link visibile.so i made the rendered property true from the nodeselectionaction.

      it is all working fine. the commandLink is getting visible and invisible.

      But the problem is that, after the click and the link is visible, then when i click the link, no action is taking place. its not inside the action method.
      but if i give the rendred=true beging itself, the action is working fine.

      any idea why its happening like this?????

      <a4j:outputPanel id="preButtonPanel" >
       <a4j:commandLink binding="#{treebean.preButton}" actionListener="#{treebean.previousButtonClicked}"
       reRender="tabPanel" rendered="#{treebean.buttonNeeded}">
      
       <h:graphicImage id="previous" styleClass=""
       value="/Images/previous_record_button.GIF" alt="Previous" border="0" />
       </a4j:commandLink>
       </a4j:outputPanel>
      
      public void processSelection(NodeSelectedEvent event) {
      
      
       UITree tree = (UITree) event.getComponent();
       nodeTitle = (String) tree.getRowData();
      
      
      
       setButtonNeeded(true);
      }