incubator-adffaces-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Renzo Tomaselli <renzo.tomase...@tecnotp.it>
Subject [Trinidad] managing selection in tr:tree
Date Mon, 08 Jan 2007 17:44:52 GMT
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
  <meta content="text/html;charset=ISO-8859-1" http-equiv="Content-Type">
</head>
<body bgcolor="#ffffff" text="#000000">
<font size="+1">Hi, while using a tr:tree component, I want to use
selection for navigating in a separated panel.<br>
If I place a commandLink within the nodeStamp, then I can manage events
and actions, however I don't know how to get the selected node identity.<br>
Then I tried to use the selectionListener attribute like the following:<br>
<br>
&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &lt;tr:tree value="#{dbTreeTrBean.treeData}"
var="node"<br>
&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;
&nbsp;&nbsp;&nbsp; selectionListener="#{dbTreeTrBean.selection}"
onclick="submit()"&gt;<br>
&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
&lt;f:facet name="nodeStamp"&gt;<br>
&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;
&nbsp;&nbsp;&nbsp; &lt;tr:panelGroupLayout layout="horizontal"&gt;<br>
&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
&nbsp;&nbsp; &lt;tr:image source="#{node.image}"/&gt;<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &lt;tr:outputText value="#{node.description}"/&gt;<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
&lt;/tr:panelGroupLayout&gt;<br>
&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
&lt;/f:facet&gt;<br>
&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &lt;/tr:tree&gt;<br>
<br>
but the pointed method "selection" is *never* called. The basic idea
was to force a submit on click and to manage the selection event to
navigate.<br>
Adding the onclick introduced a full can of exceptions while
expanding/restricting branches, such as "Cannot exit the root
container",<br>
"row is unavailable", or just silent expansion misbehavior. Actually
I'm using a straight ChildPropertyTreeModel as treeData.<br>
Without onclick expansion runs fine, but then I miss the timely
selection.<br>
While I will investigate further about the wrong expansion, I still
wonder if anybody succeeded in getting those events. Demos do not use
them at all.<br>
-- Renzo<br>
<br>
</font>
</body>
</html>

Mime
View raw message