Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7868305
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 3, 20262026-06-03T00:57:31+00:00 2026-06-03T00:57:31+00:00

Hello i am using primefaces version 3.2 The ui layout which i am using

  • 0

Hello i am using primefaces version 3.2 The ui layout which i am using is tabview, inside it, i’ve accordion panel, and inside every tab of the accordion, i’ve two forms.

Just like
tabview>tab>accordionpanel>tab>form1 and

tabview>tab>accordionpanel>tab>form2 and so on…

Now, the problem is that the active index action is not called in the above scenario. However, when i remove on of the froms from the accordion panel tab, it is called and works fine.

This is my xhtml tabview code

    <p:tabView id="tabView" activeIndex="#{profileInfoManagedBean.myCurrentTab}" >
        <p:ajax event="tabChange" listener="#{profileInfoManagedBean.tabIsChanged}" />

        <p:tab id="locationInfoTab" title="Location Info">

            <p:accordionPanel id="aPanel">

                <p:tab id="tab1" title="Country">
                    <h:form id="form1">
                        <p:growl id="growl" life="5000" />

                        <p:messages id="messages"  /> 

                        <h:panelGrid columns="3" cellpadding="5" cellspacing="5">

                            <p:column>
                                <h:outputLabel for="country"  value="Country: "></h:outputLabel>
                            </p:column>
                            <p:column>
                                <p:inputText id="country" value="#{profileInfoManagedBean.country.country}" required="true" label="City">

                                    <f:validateLength minimum="5" maximum="20" />
                                    <p:ajax event="blur" update="msg1"></p:ajax>
                                </p:inputText>
                            </p:column>
                            <p:column>
                                <p:message id="msg1" for="country" display="icon"></p:message>
                            </p:column>

                        </h:panelGrid>
                        <p:commandButton type="submit" action="#{profileInfoManagedBean.addCountry}" value="Save" ajax="true" ></p:commandButton>

                    </h:form>
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-03T00:57:32+00:00Added an answer on June 3, 2026 at 12:57 am

    Are you wanting active index on the locationInfoTab or on the accordion tab1?

    I tested and modified your code a little to get the active index on both:

    <h:form id="tabViewForm">
    
    <p:tabView id="tabView" activeIndex="#{profileInfoManagedBean.myCurrentTab}" >
      <p:ajax event="tabChange" listener="#{profileInfoManagedBean.tabIsChanged}" update=":tabViewForm"/>
      <p:tab id="locationInfoTab" title="Location Info">
          <p:accordionPanel id="aPanel" activeIndex="#{profileInfoManagedBean.myCurrentAccordionTab}">
            <p:ajax event="tabChange" listener="#{profileInfoManagedBean.tabIsChanged}" update=":tabViewForm" />
            <p:tab id="tab1" title="Country">
              <h:form id="form1">
    .
    .
    .
    <p:inputText id="country" value="#{profileInfoManagedBean.country.name}" required="true" label="Country">
      <f:validateLength minimum="5" maximum="20" />
      <p:ajax event="blur" update="country msg1 growl messages"></p:ajax>
    </p:inputText>
    .
    .
    .
      </p:accordionPanel>
    </p:tab>
    <p:tab id="tab2" title="Tab Information">
    </p:tab>
    </p:tabView>
    </h:form>
    

    I added tab change event to the accordion panel, update the tabViewForm when tabs change, updated messages when the input changes, and added another tab for testing.

    I think the original problem is because of the validator on the input field causing error, but the view was not being updated to show you the message.

    By updating the form on a tab change, the validator error message is clear.

    I hope this helps you.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Hello i am using primefaces version 3.2 The ui layout which i am using
Hello i am using the latest version of artoolkit, and succesfully compiled simplevrml, but
I'm just trying to compile the hello world example of boost.python WITHOUT using all
Hello I am using jQuery UI Accodions By default, the first accordion is shown
I'm trying to build a hello world using GTK, which includes the line: #include
Hello i am using following xml to create some sort of Transparent panel .
I have written simple first stage bootloader which displays Hello world using interrupt to
Hello I am using a tab bar application. I want to reload a view
Hello im using page nation which is amazing but now im trying to print
Hello I am using jquery layout plugin from http://layout.jquery-dev.net/ . my options are following:

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.