From adffaces-user-return-2680-apmail-incubator-adffaces-user-archive=incubator.apache.org@incubator.apache.org Tue Apr 10 08:14:29 2007 Return-Path: Delivered-To: apmail-incubator-adffaces-user-archive@locus.apache.org Received: (qmail 70231 invoked from network); 10 Apr 2007 08:14:29 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 10 Apr 2007 08:14:29 -0000 Received: (qmail 24352 invoked by uid 500); 10 Apr 2007 08:14:35 -0000 Delivered-To: apmail-incubator-adffaces-user-archive@incubator.apache.org Received: (qmail 24319 invoked by uid 500); 10 Apr 2007 08:14: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 24310 invoked by uid 99); 10 Apr 2007 08:14:34 -0000 Received: from herse.apache.org (HELO herse.apache.org) (140.211.11.133) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 10 Apr 2007 01:14:34 -0700 X-ASF-Spam-Status: No, hits=0.6 required=10.0 tests=NO_REAL_NAME X-Spam-Check-By: apache.org Received-SPF: pass (herse.apache.org: local policy) Received: from [195.65.1.4] (HELO hsb567as.main.root.bkw-fmb.ch) (195.65.1.4) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 10 Apr 2007 01:14:27 -0700 Received: from HSB106EX.main.root.bkw-fmb.ch ([159.232.2.63]) by hsb567as.main.root.bkw-fmb.ch with InterScan Message Security Suite; Tue, 10 Apr 2007 10:14:03 +0200 X-MimeOLE: Produced By Microsoft Exchange V6.5 Content-class: urn:content-classes:message MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable Subject: Highlight selected tab on NavigationPane using PPR Date: Tue, 10 Apr 2007 10:14:03 +0200 Message-ID: <8CB94491C38B5D479753A775AED68ADF118124@HSB106EX.main.root.bkw-fmb.ch> X-MS-Has-Attach: X-MS-TNEF-Correlator: Thread-Topic: Skin Swap Thread-Index: Acd3c3OQtkBHniYFSdq72aZCYmAyCAAChmGwAPJVuiA= From: To: X-Virus-Checked: Checked by ClamAV on apache.org Hi all, similar to the demo navigation pane example, I'd like that the selected = tab on my NavigationPane is highlighted if I click on it. I'm using = facelets and a template that contains the layout. In the debug-mode, I = can see that the commandNavigationItem backing bean is called and the = selected property is set correctly. But after page refresh, nothing has = been changed. Can anybody help? Thanks Here my faclet template: = =20 = =20 = =20 = =20 and here my backing bean: @SuppressWarnings("unchecked") public void navigationItemAction(ActionEvent event) { UIComponent actionItem =3D event.getComponent(); UIComponent parent =3D actionItem.getParent(); while (! (parent instanceof UIXNavigationHierarchy) ) { parent =3D parent.getParent(); if (parent =3D=3D null) { System.err.println( "Unexpected component hierarchy, no UIXNavigationHierarchy = found."); return; } } List children =3D parent.getChildren(); for (UIXCommand child : children) { FacesBean childFacesBean =3D child.getFacesBean(); FacesBean.Type type =3D childFacesBean.getType(); PropertyKey selectedKey =3D type.findKey("selected"); if (selectedKey !=3D null) { boolean isSelected =3D (child =3D=3D actionItem); childFacesBean.setProperty(selectedKey, isSelected); } } RequestContext adfContext =3D RequestContext.getCurrentInstance(); adfContext.addPartialTarget(parent); }