Using activeIndex in p:tabmenu by passing hidden parameter

UI Components for JSF
Post Reply
akstheking
Posts: 9
Joined: 17 Jul 2014, 11:06

28 Jul 2014, 09:35

I am using the tabs where active index is selected by passing request parameter to the page :

Code: Select all

<ui:composition xmlns="http://www.w3.org/1999/xhtml"
    xmlns:ui="http://java.sun.com/jsf/facelets"
    xmlns:h="http://java.sun.com/jsf/html"
    xmlns:f="http://java.sun.com/jsf/core"
    xmlns:p="http://primefaces.org/ui">
    <p:tabMenu activeIndex="${param.i}" style="text-decoration: none">
        <p:menuitem value="Home" outcome="/home.xhtml">
            <f:param name="i" value="0"/>
        </p:menuitem>
        <p:menuitem value="Sign" outcome="/web/sign/SelectServer.xhtml">
            <f:param name="i" value="1"/>       
        </p:menuitem>
        <p:menuitem value="Certificate Management" outcome="/web/sign/FileUpload.xhtml">
            <f:param name="i" value="2" />
        </p:menuitem>
        <p:menuitem value="Support" outcome="/web/sign/FileUpload.xhtml">
            <f:param name="i" value="3" />
        </p:menuitem>
        <p:menuitem value="Admin" outcome="/web/sign/FileUpload.xhtml">
            <f:param name="i" value="4" />
        </p:menuitem>
    </p:tabMenu>
</ui:composition>
The problem is that it shows in the URL like :
http://localhost:7001/CodesignWebApp/fa ... .xhtml?i=1

which doesn't look good. Is there a way to pass this param as hidden. I dont see a option to do that in f:param. Or Do I have to use managed-bean to achieve that?

Post Reply

Return to “PrimeFaces”

  • Information
  • Who is online

    Users browsing this forum: No registered users and 42 guests