jsf 2 - Why does the ajax event not fire? -


I got a prefix tree in my application. I tried to load all the data once, which is equivalent to 2500 objects It is, only a few are used. So I tried to apply some sort of lazy loading, the first level is loaded and I want to load the required data while expanding the node. I made some examples mistake and modified it for my purpose. But in my case Ajax does not fire, what am I missing here?

XHTML part

  & lt; H: form & gt; & Lt; P: panel id = "add_elev2list" header = "LFGEEEEE" collapsed = "true" toggle = "true" & gt; & Lt; P: tree value = "# {bookb.root}" var = "node" dynamic = "true" & gt; & Lt; P: ajax event = "select" update = "@ this" listener = "# {bookb.onNodeSelect}" /> & Lt; P: tree node & gt; & Lt; H: output text value = "# {node}" /> & Lt; / P: treeNode & gt; & Lt; / P: tree & gt; & Lt; / P: Panel & gt; & Lt; / H: form & gt;   

Before loading the first level of the tree

  Public Zero Trigger Tribune () {root = New DefaultTreeNode ("root", blank); ObjectContainer localdb = dbConnector.connDB (); ObjectSet & LT; SbasUserList & gt; Race; Query query = localdb.query (); Query.constrain (sbasUserList.class); //query.descend("klass").constrain(true); Res = query.execute (); (SbasUserList sbu: res) {if (sbu.isClass ()) {TreeNode node0 = New DefaultTreeNode (sbu.getGroupname (), root); Node0.get hair (). Add (New DefaultTreeNode ("head"); }} Localdb.close (); }   

The Ajax event should trigger this which works fine, but it does not.

  Node selects on public zeroes (nodeselected event) {log ("extension"); // wrapper for system.out.println ... SbasUserList sbu = (sbasUserList) nee.getTreeNode () for some types of debugging. GetData (); String [] allstd = sbu.getAllusers (). the division (","); ObjectContainer localdb = dbConnector.connDB (); For (string personal: alasted) {nee.getTreeNode (). GetChildren () Add (New DefaultTreeNode (Personal DB, Personal) (GetUserbyby). GetRealname ())); } Localdb.close (); }   

Any ideas why?

Best regards Ralf

Tomcat 7.0.52 JSF 2.2 and PrimeForce 4.0

You have not set the attribute selectionMode = "single" .

  & lt; P: tree value = "# {treeBasicView.root}" var = "node" dynamic = "true" selection mode = "single" & gt; & Lt; P: ajax event = "select" listener = "# {treeBasicView.onNodeSelect}" /> & Lt; P: treeNode & gt; & Lt; H: output text value = "# {node}" /> & Lt; / P: treeNode & gt; & Lt; / P: tree & gt;    

Comments

Popular posts from this blog

java - ImportError: No module named py4j.java_gateway -

python - Receiving "KeyError" after decoding json result from url -

.net - Creating a new Queue Manager and Queue in Websphere MQ (using C#) -