ajax - Primefaces <p:tree /> event listeners not being called on the server - but work locally -
i have odd issue primefaces p:tree data structure. when deployed server (gae) event listeners (onselect(), onunselect(), etc...)are not being called, although work fine when deployed on local dev machine.... ideas appreciated...
xhtml:
<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"> <h:form id="leftcontentform"> <p:growl id="messages" showdetail="true" /> <div id="url_tree" class="client_dashboard, urllinks_dashboard"> <p:growl id="growl1" showsummary="true" showdetail="true" autoupdate="true" /> <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" > <p:ajax event="expand" update=":leftcontentform:messages, :centrecontentform" listener="#{fullscreendashboardbean.onnodeexpand}" /> <p:ajax event="collapse" update=":leftcontentform:messages, :centrecontentform" listener="#{fullscreendashboardbean.onnodecollapse}" /> <p:ajax event="select" update=":leftcontentform:messages, :centrecontentform" listener="#{fullscreendashboardbean.onnodeselect}" /> <p:ajax event="unselect" update=":leftcontentform:messages, :centrecontentform" listener="#{fullscreendashboardbean.onnodeunselect}" /> <p:treenode type="node"> <h:outputtext value="#{node}" /> </p:treenode> <p:treenode type="leaf"> <h:outputtext value="#{node}" /> </p:treenode> </p:tree> </div> <p:blockui block="tree1" trigger="tree1"><br /> <p:graphicimage value="/images/ajax-loader.gif" /> </p:blockui> </h:form> </p:layoutunit>
//////////////// fullscreendashboardbean.java: // backingbean...
@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(); // backlink datatable data 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); }
any thoughts?
Comments
Post a Comment