-
1. Re: jump to tabpanel id
ilya40umov Dec 24, 2012 2:01 PM (in response to chivu55)I think you might be looking for this: http://stackoverflow.com/questions/6601642/how-to-redirect-to-an-anchor-in-jsf
-
2. Re: jump to tabpanel id
chivu55 Dec 25, 2012 2:46 AM (in response to ilya40umov)public void doSomething() throws IOException {
ExternalContext ec = FacesContext.getCurrentInstance().getExternalContext();
ec.getFlash().put("msg", "Something was done successfully");
ec.redirect("view.xhtml#msg");
}I have this tried, but don't function.
This was my example
ec.redirect("b.xhtml#tab2");
I think i made a mistake
-
3. Re: jump to tabpanel id
ilya40umov Dec 25, 2012 3:58 AM (in response to chivu55)1) You are using switchType="ajax".
Here is the bit from the docs about it:
Ajax:
Activation of a<rich:tab>
component causes the parent<rich:tabPanel>
component to perform an Ajax form submission, and the content of the tab panel is refreshed. Only one tab at a time is rendered to the client side.Using #tab2 won't help because it's based on html anchors(it could be used to redirect to a particular fragment of the tab, in the case when the tab IS displayed).
2) Here are several options: Use
activeItem
attribute to specify the tab you would like to see; OR use JavaScript API to switch to a partcular tab on a client after the page is rendered.The
activeItem
attribute holds the active tab name. This name is a reference to thename
identifier of the active child<rich:tab>
component.