incubator-adffaces-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Adam Winer" <awi...@gmail.com>
Subject Re: Maintaining selected tab
Date Sat, 27 Jan 2007 02:38:14 GMT
You might try enabling the "change manager" in web.xml:

  <context-param>
    <param-name>org.apache.myfaces.trinidad.CHANGE_PERSISTENCE</param-name>
    <param-value>session</param-value>
  </context-param>

... which will do some automatic persistence of UI changes for you.

-- Adam


On 1/25/07, David Brunette <David.Brunette@chordiant.com> wrote:
>
>      A little more info on this...
>
>      When I select a tab and navigate to the next page, the panelTabbed
> is defaulted back to showing the first tab.  But if I navigate back to
> the first page again, then the panelTabbed is showing the tab that I
> selected before.  It seems as though the state is being kept, but only
> page-by-page instead of for ALL pages that include that component and
> bind it to the same CorePabelTabbed.
>
>      Any ideas of what I'm missing here??  Thanks...
>
> Dave
>
> -----Original Message-----
> From: David Brunette [mailto:David.Brunette@chordiant.com]
> Sent: Wednesday, January 24, 2007 4:13 PM
> To: adffaces-user@incubator.apache.org
> Subject: Maintaining selected tab
>
>
>
>      Hi.
>
>
>
>      I have two simple pages, both of which have a simple
> <tr:panelTabbed /> component showing the exactly same tabs and content.
> On the first page, I select a different tab and then click a button that
> will navigate me to the second page.  When the second page loads, I
> would like to have the selected tab be the same as the one that was
> selected when I submitted from the first page.
>
>
>
>      I tried to do this by binding the <tr:panelTabbed /> components on
> each page to the same property in my session-scoped bean, but when the
> second page loads, I am always defaulted to the first tab again.  Does
> anybody know how I can keep track of which tab is selected for my
> panelTabbed component across different pages?  Thanks...
>
>
>
> Dave
>
>
>
> <tr:panelTabbed binding="#{keepTabStateBean.tabs}" position="above">
>
>       <tr:showDetailItem text="First" immediate="true">
>
>             <tr:outputText value="First Content" />
>
>       </tr:showDetailItem>
>
>       <tr:showDetailItem text="Second" immediate="true">
>
>             <tr:outputText value="Second Content" />
>
>       </tr:showDetailItem>
>
>       <tr:showDetailItem text="Third" immediate="true">
>
>             <tr:outputText value="Third Content" />
>
>       </tr:showDetailItem>
>
> </tr:panelTabbed>
>
>
>
> public class KeepTabStateBean {
>
>
>
>       private CorePanelTabbed tabs;
>
>
>
>       public final CorePanelTabbed getTabs() {
>
>             return tabs;
>
>       }
>
>
>
>       public final void setTabs(CorePanelTabbed tabs) {
>
>             this.tabs = tabs;
>
>       }
>
>
>
> }
>
> The information transmitted herewith is sensitive      information of
> Chordiant Software or its customers and is intended only for use to the
> individual or entity to which it is addressed. If the reader of this
> message is not the intended recipient, you are hereby notified that any
> review, retransmission, dissemination, distribution, copying or other
> use of, or taking of any action in reliance upon, this information is
> strictly prohibited. If you have received this communication in error,
> please contact the sender and delete the material from your computer.
> The information transmitted herewith is sensitive      information of Chordiant Software
or its customers and is intended only for use to the individual or entity to which it is addressed.
If the reader of this message is not the intended recipient, you are hereby notified that
any review, retransmission, dissemination, distribution, copying or other use of, or taking
of any action in reliance upon, this information is strictly prohibited. If you have received
this communication in error, please contact the sender and delete the material from your computer.
>

Mime
View raw message