From adffaces-user-return-1746-apmail-incubator-adffaces-user-archive=incubator.apache.org@incubator.apache.org Mon Jan 08 17:45:28 2007 Return-Path: Delivered-To: apmail-incubator-adffaces-user-archive@locus.apache.org Received: (qmail 83917 invoked from network); 8 Jan 2007 17:45:28 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 8 Jan 2007 17:45:28 -0000 Received: (qmail 31135 invoked by uid 500); 8 Jan 2007 17:45:34 -0000 Delivered-To: apmail-incubator-adffaces-user-archive@incubator.apache.org Received: (qmail 31111 invoked by uid 500); 8 Jan 2007 17:45:34 -0000 Mailing-List: contact adffaces-user-help@incubator.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: adffaces-user@incubator.apache.org Delivered-To: mailing list adffaces-user@incubator.apache.org Received: (qmail 31098 invoked by uid 99); 8 Jan 2007 17:45:34 -0000 Received: from herse.apache.org (HELO herse.apache.org) (140.211.11.133) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 08 Jan 2007 09:45:34 -0800 X-ASF-Spam-Status: No, hits=2.3 required=10.0 tests=HTML_FONT_BIG,HTML_MESSAGE,MIME_HTML_ONLY,SPF_HELO_PASS X-Spam-Check-By: apache.org Received-SPF: neutral (herse.apache.org: local policy) Received: from [213.205.33.43] (HELO mail-relay-3.tiscali.it) (213.205.33.43) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 08 Jan 2007 09:45:23 -0800 Received: from [192.168.0.3] (84.223.64.206) by mail-relay-3.tiscali.it (7.2.079) id 458A7C0800187D08 for adffaces-user@incubator.apache.org; Mon, 8 Jan 2007 18:44:53 +0100 Message-ID: <45A28314.6080701@tecnotp.it> Date: Mon, 08 Jan 2007 18:44:52 +0100 From: Renzo Tomaselli User-Agent: Thunderbird 1.5.0.9 (Windows/20061207) MIME-Version: 1.0 To: adffaces-user@incubator.apache.org Subject: [Trinidad] managing selection in tr:tree Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit X-Virus-Checked: Checked by ClamAV on apache.org Hi, while using a tr:tree component, I want to use selection for navigating in a separated panel.
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.
Then I tried to use the selectionListener attribute like the following:

        <tr:tree value="#{dbTreeTrBean.treeData}" var="node"
                selectionListener="#{dbTreeTrBean.selection}" onclick="submit()">
            <f:facet name="nodeStamp">
                <tr:panelGroupLayout layout="horizontal">
                      <tr:image source="#{node.image}"/>
                      <tr:outputText value="#{node.description}"/>
                </tr:panelGroupLayout>
            </f:facet>
        </tr:tree>

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.
Adding the onclick introduced a full can of exceptions while expanding/restricting branches, such as "Cannot exit the root container",
"row is unavailable", or just silent expansion misbehavior. Actually I'm using a straight ChildPropertyTreeModel as treeData.
Without onclick expansion runs fine, but then I miss the timely selection.
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.
-- Renzo