-
1. Re: tabPanel in client mode
sergeysmirnov Apr 18, 2007 5:00 PM (in response to twocoasttb)tabPanel has selectedTab attribute. You can use EL there to set particular tab you want. selectedTab contains the value of 'name' attribute rich:tab has.
-
2. Re: tabPanel in client mode
twocoasttb Apr 18, 2007 6:49 PM (in response to twocoasttb)Sergiy,
Thanks for your response. Is there a proper way to capture the current tab when it is selected? Is this possible when the tabPanel is in client mode and isn't wrapped in a form?
Tom -
3. Re: tabPanel in client mode
sergeysmirnov Apr 18, 2007 7:54 PM (in response to twocoasttb)Right. tabPanel with switchMode="client" has a pure client side behavior and has no state saving feature out-of-the-box. So, it is up to you, how you change the property that will be used in the EL for selectedTab
-
4. Re: tabPanel in client mode
twocoasttb Apr 20, 2007 11:59 AM (in response to twocoasttb)Thanks again, Sergiy. Is 'oncomplete' supposed to work in rich:tab when rich:tabPanel is in client mode? It doesn't seem to do anything for me:
<head> <script type="text/javascript"> function tellMe() { alert("Here!!"); } </script> </head> <rich:tabPanel id="profileTabs" switchType="client"> <rich:tab name="profile" label="Basic Info" oncomplete="javascript:tellMe();"> <h:outputText value="content"/> </rich:tab> </rich:tabPanel>
It does work in "ajax" mode. BTW, I'm using a CVS build from around th 17th of April.
Thanks,
Tom -
5. Re: tabPanel in client mode
sergeysmirnov Apr 20, 2007 7:02 PM (in response to twocoasttb)no. all Ajax-oriented attributes work only in Ajax mode. So, it works now as designed.
However, the idea to have some pure javascript hookups on opening and leaving the tabs is not new. Also, we have a similar request for rich:panelBar. -
6. Re: tabPanel in client mode
swestbom Nov 12, 2007 2:45 PM (in response to twocoasttb)Ok, we are now on version 3.1.2 and we still have no out of the box state saving on client side tabs. Don't you ever make anything real with these tag libraries, that is basic behavior
-
7. Re: tabPanel in client mode
ilya_shaikovsky Nov 13, 2007 5:40 AM (in response to twocoasttb)loot to the first two Sergey's posts. It works for all the users that asked for it before you.
-
8. Re: tabPanel in client mode
swestbom Nov 15, 2007 5:08 PM (in response to twocoasttb)What is EL and how do I retrieve the current tab using client mode other than by rewriting the RichFaces.switchTab function to make an Ajax call to set the current tab?
-
9. Re: tabPanel in client mode
ilya_shaikovsky Nov 16, 2007 6:06 AM (in response to twocoasttb)<rich:tabPanel .. selectedTab="#{bean.selTab}"> .... .... <rich:tab name="somName"...> ....
So when you need the selTab property should be set to someName value. -
10. Re: tabPanel in client mode
swestbom Nov 16, 2007 9:29 AM (in response to twocoasttb)"ilya_shaikovsky" wrote:
<rich:tabPanel .. selectedTab="#{bean.selTab}"> .... .... <rich:tab name="somName"...> ....
So when you need the selTab property should be set to someName value.
That works for the initial load but once you submit a form from a tab the client doesn't keep the state of the tab and goes to the default unless I reset it with an actionListener server side, but If I do that and there is a validation error the actionListener doesn't fire and the user goes to the last tab specified server side. That is why I think a built in tab state option that works using the ajax, server or client setting is better.