Gerhard,
That's excellent information, and it works... almost. Two things I find:
1. Re: <tr:commandLink ... partialSubmit="true"/>
I needed to remove the partialSubmit="true" otherwise I didn't get the
requested tab rendered.
2. It works when the <tr:commandLink... /> 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):
>
> <tr:commandLink id="tabSwitcher" text="show 'Company' tab"
> actionListener="#{bean.showCompanyTab}" partialSubmit="true"/>
>
> <tr:panelTabbed position="above" id="aboutMenu" class="panelClass"
> partialTriggers="tabSwitcher">
> <tr:showDetailItem id="contactPanel" text="Contact"
> inlineStyle="float: left"
> disclosed="#{bean.showContact}"
> binding="#{bean.contact}">
> <tr:panelHeader text="Contact Us"/>
> </tr:showDetailItem>
>
> <tr:showDetailItem id="helpPanel" text="Company"
> inlineStyle="float: left"
> disclosed="#{bean.showCompany}"
> bean="#{bean.company}">
> <tr:panelHeader text="Company"/>
> </tr:showDetailItem>
> </tr:panelTabbed>
>
>
> 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 <[EMAIL PROTECTED]>:
>>
>>
>> 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?
>>
>> <<<about.xhtml>>>
>> <tr:panelTabbed position="above" id="aboutMenu" class="panelClass">
>> <tr:showDetailItem id="contactPanel" text="Contact"
>> inlineStyle="float: left">
>> <tr:panelHeader text="Contact Us"/>
>> </tr:showDetailItem>
>>
>> <tr:showDetailItem id="helpPanel" text="Company"
>> inlineStyle="float: left">
>> <tr:panelHeader text="Contact Us"/>
>> </tr:showDetailItem>
>> </tr:panelTabbed>
>>
>> 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.