title: Primefaces <p:tree /> event listeners not being called on the server - but work locally
body: <p>I have an odd issue with my Primefaces p:tree data structure. When deployed to the server (GAE) the event listeners  (onSelect(), onUnselect(), etc...)are not being called, although they work fine when deployed on my local dev machine.... Any ideas greatly appreciated...</p>
  
  <p>xhtml: </p>
  
  <pre><code>&lt;p:layoutUnit widgetvar="west_content_widget" id="west_content_panel"
              position="west" size="300" resizable="true" closable="false"
              collapsible="true" collapseSize="30" styleClass="client_dashboard, urlLinks_dashboard" header="Target URLs"&gt;
  
              &lt;h:form id="leftContentForm"&gt;
  
              &lt;p:growl id="messages" showDetail="true" /&gt;  
  
                  &lt;div id="url_tree" class="client_dashboard, urlLinks_dashboard"&gt;
  
                      &lt;p:growl id="growl1" showSummary="true" showDetail="true"
                          autoUpdate="true" /&gt;
  
                      &lt;p:tree id="tree1"
                          value="#{fullScreenDashboardBean.urlTreeBean.model}" var="node"
                          selectionMode="checkbox"
                          selection="#{fullScreenDashboardBean.selectedNodes}"
                          rendered="#{fullScreenDashboardBean.showTree}" dyanmic="true"
                          style="width:100%"
                          cache="false" &gt;
  
  
  
      &lt;p:ajax event="expand" update=":leftContentForm:messages, :centreContentForm" listener="#{fullScreenDashboardBean.onNodeExpand}" /&gt;  
      &lt;p:ajax event="collapse" update=":leftContentForm:messages, :centreContentForm" listener="#{fullScreenDashboardBean.onNodeCollapse}" /&gt;  
      &lt;p:ajax event="select" update=":leftContentForm:messages, :centreContentForm" listener="#{fullScreenDashboardBean.onNodeSelect}" /&gt;  
      &lt;p:ajax event="unselect" update=":leftContentForm:messages, :centreContentForm" listener="#{fullScreenDashboardBean.onNodeUnselect}" /&gt; 
  
                           &lt;p:treeNode type="node"&gt;
                              &lt;h:outputText value="#{node}" /&gt;    
                          &lt;/p:treeNode&gt;
                          &lt;p:treeNode type="leaf"&gt;
                              &lt;h:outputText value="#{node}" /&gt;
                          &lt;/p:treeNode&gt;
  
                      &lt;/p:tree&gt;
                  &lt;/div&gt;
                   &lt;p:blockUI block="tree1" trigger="tree1"&gt;&lt;br /&gt;
                      &lt;p:graphicImage value="/images/ajax-loader.gif" /&gt;
                  &lt;/p:blockUI&gt;
  
  
              &lt;/h:form&gt;
          &lt;/p:layoutUnit&gt;
  </code></pre>
  
  <p>////////////////
  FullScreenDashboardBean.java: // backingBean...</p>
  
  <pre><code>@ManagedBean
  @SessionScoped
  public class FullScreenDashboardBean implements Serializable {
  
  // ////////////
  //
  private static final long serialVersionUID = 1L;
  
  ....
  
  public void onNodeExpand(NodeExpandEvent event) {  
      FacesMessage message = new FacesMessage(FacesMessage.SEVERITY_INFO, "Expanded", event.getTreeNode().toString());  
  
      FacesContext.getCurrentInstance().addMessage(null, message);  
  }  
  
  public void onNodeCollapse(NodeCollapseEvent event) {  
      FacesMessage message = new FacesMessage(FacesMessage.SEVERITY_INFO, "Collapsed", event.getTreeNode().toString());  
  
      FacesContext.getCurrentInstance().addMessage(null, message);  
  }  
  
  public void onNodeSelect(NodeSelectEvent event) {  
      FacesMessage message = new FacesMessage(FacesMessage.SEVERITY_INFO, "Selected", event.getTreeNode().toString());  
  
      FacesContext.getCurrentInstance().addMessage(null, message);  
  
      URLDBService urlDB = new URLDBService();
      String urlAddress = event.getTreeNode().toString();
   // Get backlink datatable data from DB.
      Integer urlID = urlDB.getURLIDFromAddress(urlAddress);
  
      backLinkTableBean.addBackLinksToTable(urlID);
  
  }  
  
  public void onNodeUnselect(NodeUnselectEvent event) {  
      FacesMessage message = new FacesMessage(FacesMessage.SEVERITY_INFO, "Unselected", event.getTreeNode().toString());  
  
      FacesContext.getCurrentInstance().addMessage(null, message);  
  
      String urlAddress;
      Integer urlID;
  
      URLDBService urlDB = new URLDBService();
  
      urlAddress = event.getTreeNode().getData().toString();
      urlID = urlDB.getURLIDFromAddress(urlAddress);
  
      backLinkTableBean.removeBackLinksFromTable(urlID);
  }  
  </code></pre>
  
  <p>Any thoughts?</p>