Return-Path: Delivered-To: apmail-myfaces-users-archive@www.apache.org Received: (qmail 67878 invoked from network); 15 Apr 2008 22:48:13 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 15 Apr 2008 22:48:13 -0000 Received: (qmail 45778 invoked by uid 500); 15 Apr 2008 22:48:08 -0000 Delivered-To: apmail-myfaces-users-archive@myfaces.apache.org Received: (qmail 45756 invoked by uid 500); 15 Apr 2008 22:48:08 -0000 Mailing-List: contact users-help@myfaces.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: "MyFaces Discussion" Delivered-To: mailing list users@myfaces.apache.org Received: (qmail 45745 invoked by uid 99); 15 Apr 2008 22:48:08 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 15 Apr 2008 15:48:08 -0700 X-ASF-Spam-Status: No, hits=-0.0 required=10.0 tests=SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (nike.apache.org: domain of andrew.rw.robinson@gmail.com designates 209.85.200.172 as permitted sender) Received: from [209.85.200.172] (HELO wf-out-1314.google.com) (209.85.200.172) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 15 Apr 2008 22:47:16 +0000 Received: by wf-out-1314.google.com with SMTP id 29so2187976wff.24 for ; Tue, 15 Apr 2008 15:47:36 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:message-id:date:from:to:subject:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references; bh=3XWfXN55LC9n9hl1PUAOgnm5qoM2CkiTIfHZitCBwwQ=; b=YF7gpllFrxAPeKVWDhrLm26KBVp9aXTxau7b3H/PH0mhVGzIzOUhMl0CBPnd+Xb7wDiu0q5asg5Y2G0odE1DTdWOGf7nHvmbY8s1pisYkgv5QkjWPQ7Ua+a01b2kJMnObCi8uvcZz5JMT8zyHYf0SRAlwO3JZypxWRVT9u80fkE= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=message-id:date:from:to:subject:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references; b=tvI8sloqNTPqeVqqNT5hVwvxXAv6ynk6hW2yFxlOs1Ss1BqG74JPnGAH3Hy1lDaJZvY7tAggOfo76HEHV2sy5of8RZ2MZviIDrnuJRWSyeWj+6w5BwHc5P/fnnCoaJvCRBJKqr6d6UQkfL+g7hwrQ2J60BLu1Fplv5tGpahxVNk= Received: by 10.142.84.3 with SMTP id h3mr2447230wfb.34.1208299656254; Tue, 15 Apr 2008 15:47:36 -0700 (PDT) Received: by 10.142.203.16 with HTTP; Tue, 15 Apr 2008 15:47:36 -0700 (PDT) Message-ID: Date: Tue, 15 Apr 2008 16:47:36 -0600 From: "Andrew Robinson" To: "MyFaces Discussion" Subject: Re: [Trinidad] setActionListener before actionListener or partialSubmit with action In-Reply-To: <007601c89f49$c4493460$14b2a8c0@matzenote> MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Content-Disposition: inline References: <007601c89f49$c4493460$14b2a8c0@matzenote> X-Virus-Checked: Checked by ClamAV on apache.org Response inline > > Use action instead of actionListener? Actions are always fired last. > > Yes, I know. But if I use actions, PPR won't work. The whole page is > refreshed, regardless of the action outcome. But I'd like to use PPR. Returning null is the correct way to ensure that the navigation handler does not change the current view root. I have used it with Trinidad without issues, so I know it works. If the action is non-null it should only navigate if there is a match. Do you have any "catch" all navigation rules (where the outcome or action are not specified)? > I found a solution by myself. Instead of declaring the actionListener as a > commandLink parameter, I'v implemented ActionListener in the backing bean > and used f:actionListener after tr:setActionListener. Now the execution > order is correct. > > > /> > > > > IMHO: setActionListener should be executed before any UIComponent > actionListener. Shall I open a JIRA? No, the action listeners should be invoked in the order that they are added to a component. A setActionListener should not get preferential treatment. If you need listeners to be invoked in a specific order, you need to make sure they are added in that order. And even then, the JavaDoc of UIComponent does not guarantee that the listeners will be returned in any specific order: http://java.sun.com/javaee/javaserverfaces/1.2/docs/api/javax/faces/component/UIComponent.html#getFacesListeners(java.lang.Class) Maybe the spec. says something? > > -- > Kind regards, > Mathias > > > > > > > On Tue, Apr 15, 2008 at 3:51 PM, Mathias Walter > > wrote: > > > Hi, > > > > > > is it possible to use partialSubmit without an > > actionListener and only with > > > an action on a tr:commandLink? I tried it, but the whole > > page is refreshed > > > not only the relevant part. > > > > > > I'd like to use actionListener, but unfortunatelly a > > tr:setActionListener > > > will be executed after actionListener. In such case, it's > > impossibel to set > > > a pageFlowScope variable with setActionListener. > > > > > > Example: > > > > > > > > partialSubmit="true" immediate="true"> > > > > to="#{pageFlowScope.data}" /> > > > > > > > > > This does not work, because backingBean.add is fired before the > > > setActionListener. > > > > > > -- > > > Kind regards, > > > Mathias > > > > > > > >