Return-Path: Delivered-To: apmail-myfaces-users-archive@www.apache.org Received: (qmail 60791 invoked from network); 13 Dec 2007 17:09:41 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 13 Dec 2007 17:09:41 -0000 Received: (qmail 93335 invoked by uid 500); 13 Dec 2007 17:09:25 -0000 Delivered-To: apmail-myfaces-users-archive@myfaces.apache.org Received: (qmail 93294 invoked by uid 500); 13 Dec 2007 17:09:25 -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 93261 invoked by uid 99); 13 Dec 2007 17:09:25 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 13 Dec 2007 09:09:25 -0800 X-ASF-Spam-Status: No, hits=2.6 required=10.0 tests=DNS_FROM_OPENWHOIS,SPF_HELO_PASS,SPF_PASS,WHOIS_MYPRIVREG X-Spam-Check-By: apache.org Received-SPF: pass (nike.apache.org: domain of lists@nabble.com designates 216.139.236.158 as permitted sender) Received: from [216.139.236.158] (HELO kuber.nabble.com) (216.139.236.158) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 13 Dec 2007 17:09:24 +0000 Received: from isper.nabble.com ([192.168.236.156]) by kuber.nabble.com with esmtp (Exim 4.63) (envelope-from ) id 1J2rYV-0007XB-M6 for users@myfaces.apache.org; Thu, 13 Dec 2007 09:09:03 -0800 Message-ID: <14320301.post@talk.nabble.com> Date: Thu, 13 Dec 2007 09:09:03 -0800 (PST) From: md10024 To: users@myfaces.apache.org Subject: Re: linking to non-default tr:showDetailItem in a tr:panelTabbed In-Reply-To: <2332f63b0712130217x4c94f925qfe27cd4ce45dfc37@mail.gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Nabble-From: md@qwizics.com References: <14307867.post@talk.nabble.com> <2332f63b0712130217x4c94f925qfe27cd4ce45dfc37@mail.gmail.com> X-Virus-Checked: Checked by ClamAV on apache.org Gerhard, That's excellent information, and it works... almost. Two things I find: 1. Re: I needed to remove the partialSubmit="true" otherwise I didn't get the requested tab rendered. 2. It works when the is on the same page as the tab (i.e. about.xhtml) but what if I want to put the the link on a different page (ex. main.xhtml) and get the non-default tab on the about.xhtml page rendered? This doesn't work for that scenario. Any suggestions? Gerhard Petracek wrote: > > hello mark, > > e.g.: add an actionListener to your link and the disclosed-attribute to > your > showDetailItems > > your snippet (+ modifications): > > actionListener="#{bean.showCompanyTab}" partialSubmit="true"/> > > partialTriggers="tabSwitcher"> > inlineStyle="float: left" > disclosed="#{bean.showContact}" > binding="#{bean.contact}"> > > > > inlineStyle="float: left" > disclosed="#{bean.showCompany}" > bean="#{bean.company}"> > > > > > > in my opinion the disclosed-attribute should be enough. > however, at the moment it doesn't work that way. > -> you also have to use component binding. (-> you also have to add the > binding-attribute - see above) > > a possible workaround: > (don't forget the getter and setter methods) > > within your bean - e.g.: > > private boolean showContact = true; > private boolean showCompany = false; > > //workaround: > private CoreShowDetailItem contact; > private CoreShowDetailItem company; > > public void showCompanyTab(ActionEvent event) > { > this.showContact = false; > this.showCompany = true; > > //workaround: > if(this.contact != null) > { > this.contact.setDisclosed( false ); > } > if(this.company != null) > { > this.company.setDisclosed( true ); > } > } > > regards, > gerhard > > > > 2007/12/13, md10024 : >> >> >> Hi, >> I'm using Trinidad with facelets. I have a page "about.xhtml" containing >> a >> tr:panelTabbed that has a default item of "Contact". I would like to also >> create a link to the "Company" item on the about.xhtml page. >> >> How do I programatically reveal the non-default item when linking to this >> page? >> >> <<>> >> >> > inlineStyle="float: left"> >> >> >> >> > inlineStyle="float: left"> >> >> >> >> >> Thanks in advance! >> >> Mark >> -- >> View this message in context: >> http://www.nabble.com/linking-to-non-default-tr%3AshowDetailItem-in-a-tr%3ApanelTabbed-tp14307867p14307867.html >> Sent from the MyFaces - Users mailing list archive at Nabble.com. >> >> > > > -- > > http://www.irian.at > > Your JSF powerhouse - > JSF Consulting, Development and > Courses in English and German > > Professional Support for Apache MyFaces > > -- View this message in context: http://www.nabble.com/linking-to-non-default-tr%3AshowDetailItem-in-a-tr%3ApanelTabbed-tp14307867p14320301.html Sent from the MyFaces - Users mailing list archive at Nabble.com.