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 7085777
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 28, 20262026-05-28T07:28:01+00:00 2026-05-28T07:28:01+00:00

I have a popup with three tabs in primefaces tabPanel. In the middle is

  • 0

I have a popup with three tabs in primefaces tabPanel. In the middle is a table called “composicao”, this tab is rendered when user marks checkbox that is located in first tab.
The tables have a lot of inputs, selects and checkboxes that user can fill in any order, so if the user fill all fields and then mark the checkbox, all fields are cleared cause that checkbox update the tabView. I tryied set some fields immediate attribute to true and set p:ajax process attribute to @all, but with this approach nothing happens.

This is the code of tabPanel:

<h:panelGroup id="abasCadastroProduto">
        <p:tabView>
            <p:tab title="base">
                <ui:include src="../../tabs/abaEdicaoBaseProduto.xhtml"/>
            </p:tab>
            <p:tab id="abaComposicao" title="composicao" rendered="#{produto.composto}">
                <ui:include src="../../tabs/abaEdicaoComposicaoProduto.xhtml"/>
            </p:tab>
            <p:tab
                    title="tributacao">
                <ui:include src="../../tabs/abaEdicaoTributacaoProduto.xhtml"/>
            </p:tab>
        </p:tabView>
    </h:panelGroup>

this is part of the code of first tab:

<h:panelGroup layout="block">
<p:fieldset legend="geral">
<h:panelGroup layout="block">
    <h:selectBooleanCheckbox id="produtoAtivoCheck"
                             value="#{produto.ativo}"/>
    <h:outputLabel value="ativo" for="produtoAtivoCheck"/>
    <h:selectBooleanCheckbox id="produtoMovimentoCheck"
                             value="#{produto.movimentaEstoque}"/>
    <h:outputLabel value="movimento" for="produtoMovimentoCheck"/>

    <!-- THIS IS THE CHECKBOX -->
    <h:selectBooleanCheckbox id="produtoCompostoCheck"
                             value="#{produto.composto}">
        <p:ajax event="change" update="abasCadastroProduto" process="@all"/>
    </h:selectBooleanCheckbox>

    <h:outputLabel value="composto" for="produtoCompostoCheck" />
</h:panelGroup>
.......
<h:panelGroup layout="block">
    <h:outputLabel value="descricao"/>
    <p:inputText value="#{produto.descricao}" required="true" immediate="true"
                 requiredMessage="obrigatorio"/>
    <h:outputLabel value="complemento"/>
    <p:inputText value="#{produto.descricaoComplementar}"/>
</h:panelGroup>
......
</p:fieldset>
</h:panelGroup>

Is there a way I can solve this problem??
I think is unnaceptable to user see fields they spend some time to fill, been cleared when you click in a checkbox…

  • 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-05-28T07:28:01+00:00Added an answer on May 28, 2026 at 7:28 am

    Solved.
    The problem was validation of required fields, so I’ve created a REQUIRED parameter and set it to false when user clicks checkbox:

    <h:selectBooleanCheckbox id="produtoCompostoCheck"
                         value="#{produto.composto}" styleClass="popup-produto-geral-check">
            <f:param name="REQUIRED" value="false"/>
            <f:ajax event="change" immediate="true" render="abasCadastroProduto" execute="@form" />
    </h:selectBooleanCheckbox>
    <h:selectOneMenu value="#{produto.idClasse}" immediate="true"
                         required="#{param['REQUIRED']}" validatorMessage="#{cadastroMsg['popup.cadastro.produto.base.classe.invalido']}"
                         requiredMessage="#{cadastroMsg['popup.cadastro.produto.base.classe.obrigatorio']}">
            <f:selectItems value="#{selectItemClasse.itens}"/>
            <f:ajax event="change" immediate="true" render="selectSubclasse"/>
    </h:selectOneMenu>
    

    and I’ve made submit button set “REQUIRED” parameter to true.

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

Sidebar

Related Questions

I have three tabs in a Windows Forms tab control. Currently in Tab1 I
I have a popup search box that is shown when the user mouses over
I have a Popup defined like this: <Popup Name=myPopup StaysOpen=True Placement=Bottom PlacementRectangle=0,20,0,20 PlacementTarget={Binding ElementName=myPopupAnchor}>
I have 1st popup, and this 1st popup opens 2nd popup Code: <view-state id=paneMaintenance
I have a popup that contains a TabNavigator control. The tabs are dynamically added
In my manifest i have this: popup: 1_options.html and in the above html file
I have three DIVs, something like this: <div id=header> ... </div> <div id=content> <div
I have three pages main page popup page started from main page using onclick
I have a page that will popup a fancybox using $('#showpopup').fancybox().trigger('click'); This may be
I have a site that need to know if the user have other pages/tabs

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.