This content has been marked as final.
Show 2 replies
-
1. Re: How to switch tab according to URL parameter <rich:tab>
ppitonak May 26, 2011 1:46 PM (in response to bhaskaronline4u)Hi,
you can try to use view parameters:
<f:metadata> <f:viewParam name="activetab" value="#{bean.tab}"/> </f:metadata> <rich:tabPanel activeItem="#{bean.tab}"> <rich:tab name="tab1">...</rich:tab> <rich:tab name="tab2">...</rich:tab> <rich:tab name="tab3">...</rich:tab> </rich:tabPanel>
Then you could call open page with URL similar to http://localhost:8080/myapp/faces/mypage.xhtml?activetab=tab2
Try to find more documentation about view parameters. At least I suggest to use a validator for f:viewParam.
Regards,
Palo
-
2. Re: How to switch tab according to URL parameter <rich:tab>
bhaskaronline4u May 26, 2011 11:42 PM (in response to ppitonak)Thanks a ton Pavol
it works..
can we skip the nullPointerException when we pass the wrong tab name as parameter, and show a default tab ..
that will be very helpfull ...
Anyway thanks again..