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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 10, 20262026-06-10T19:43:06+00:00 2026-06-10T19:43:06+00:00

I have this <p:selectOneMenu id=dec value=#{editCommandController.myCom.decision} > <f:selectItems value=#{editCommandController.decisions} /> <p:ajax update=etat :myform:alors event=change

  • 0

I have this

<p:selectOneMenu  id="dec" value="#{editCommandController.myCom.decision}" >  
                        <f:selectItems value="#{editCommandController.decisions}" />  
                        <p:ajax update="etat :myform:alors" event="change" />
                    </p:selectOneMenu>  

it allow to disable this

<p:selectOneMenu  id="etat" value="#{editCommandController.myCom.etat}" disabled="#{editCommandController.myCom.decision eq 'rejettée'}" >  
                        <f:selectItems value="#{editCommandController.etats}" />   
                    </p:selectOneMenu> 

when the condition is checked
and I would like to also hide this panelgrid when the same condition is checked :

 <h:panelGrid id="alors"   rendered="#{editCommandController.myCom.decision ne 'rejettée'}" >
                    <p:dataTable id="cars" style="width: 80px;" var="car" value="#{editCommandController.pdm}" paginator="true" rows="10"  
                                 selection="#{editCommandController.selectedPapier}" selectionMode="single" >  

                        <p:ajax event="rowSelect" listener="#{editCommandController.onRowSelect()}"   
                                update=":myform:jesuis" />  

                        <f:facet name="header">  
                            RadioButton Based Selection  
                        </f:facet>                    

                        <p:column headerText="libelle">  
                            #{car.libelle}  
                        </p:column>  

                        <p:column headerText="format">  
                            #{car.format}  
                        </p:column>  

                        <p:column headerText="stock" >  
                            #{car.stock}  
                        </p:column>  

                    </p:dataTable>  


                    <h:outputText  id="jesuis" value=" c est la papier : #{editCommandController.selectedPapier.libelle}"  />


                    <h:panelGrid columns="2" cellpadding="5" style="margin-top: 22px;">  
                        <h:outputLabel value="Reliure :" for="city" />
                        <p:selectOneMenu id="city" value="#{addPapierController.choixReliure}">  
                            <f:selectItem itemLabel="choisir reliure" itemValue="" />  
                            <f:selectItems value="#{addPapierController.libelleReliures}" />  
                            <p:ajax 
                                listener="#{addPapierController.handleCityChange}" />  
                        </p:selectOneMenu>
                    </h:panelGrid>

                </h:panelGrid>

but I notice it check the panelgrid once the panelgrid when the page loads for the first time

do you any idea to make working this feature for all the time like for selectonemenu above, thanks

  • 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-10T19:43:07+00:00Added an answer on June 10, 2026 at 7:43 pm

    Surround the panelGrid with a p:outputPanel. Then, in the “dec” selectOneMenu, also update the outputPanel. Assuming all these components are inside the same form, it would look like this:

    <p:selectOneMenu  id="dec" value="#{editCommandController.myCom.decision}" >  
           <f:selectItems value="#{editCommandController.decisions}" />  
           <p:ajax update="etat gridContainer :myform:alors" event="change" />
    </p:selectOneMenu>  
    
    <p:outputPanel id="gridContainer" layout="block" >
        <h:panelGrid id="alors" rendered="#{editCommandController.myCom.decision ne 'rejettée'}" >
             <!-- panel grid contents here.. -->  
        </h:panelGrid>
    </p:outputPanel>
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have this SelectOneMenu: <h:selectOneMenu value=#{orderController.requestVO.requestSituation}> <f:converter converterId=ComboConverter/> <f:selectItems value=#{orderController.requestSituation} var=requestSituation itemLabel=#{requestSituation.description} itemValue=#{requestSituation} />
I have problems with SelectOneMenu. I write this: <h:selectOneMenu id=listaEstados styleClass=comboboxStyle value=#{detalleSistemaBean.sistema.indEstado} immediate=true> <f:selectItems
I have this menu: <h:selectOneMenu value=#{ApplicationController.settings['SessionTTL']}> <f:selectItem itemValue=60 itemLabel=1 hour /> <f:selectItem itemValue=30 itemLabel=30
Hi I have the follonwing selectOneMenu <h:selectOneMenu value=#{modelsController.selected.idBrands}> <f:selectItems value={brandsController.itemsAvailableSelectOne} /> </h:selectOneMenu> <br/> which
i have a problem with ajax update .From a SelectOneMenu component i want to
I have a selectOneMenu that displays some different stuff categories: <h:selectOneMenu value=#{searchController.selectedCategory}> <f:selectItems value=#{searchController.formatedCategories()}
I have this selectOneMenu that asks for something, the default value is empty, because
I have pop-up with h:selectOneMenu . This pop-up will be displayed on a4j:commandLink click.
I have a IceFaces-form and several input fields. Let's say I have this: <ice:selectOneMenu
I have the following peace of code: <h:selectOneMenu id=countrycode styleClass=Width300 value=#{customer.countrycode} valueChangeListener=#{customer.countrycodechange} onchange=submit() immediate=true

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.