0

I've a form, and i want it to show some inputs only if the user mark yes on a selectOneRadio.

Here is the code:

<p:selectOneRadio id="someSelectRadio" value="#{someBean.someClass.someSelectRadio}" >
                        <f:selectItem itemLabel="Sim" itemValue="Sim" />
                        <f:selectItem itemLabel="Não" itemValue="Não" />

//Here i use event=change to reconize if the user mark a option on selectOneRadio
<p:ajax  event="change" process="someSelectRadio" update="panelGeral" />  
                    </p:selectOneRadio>
 //Here is the panel that i want to appear if the user mark selectOneRadio
<p:outputPanel id="panelGeral">
                      <p:panel id="panel" autoUpdate="true" rendered="#{someBean.someClass.someMethod}" />   

                    </p:outputPanel>

I already have tryied to change event do click, on click, both doesn't work for me.

BalusC
  • 1,082,665
  • 372
  • 3,610
  • 3,555
Baptista
  • 128
  • 2
  • 11

1 Answers1

1

This may be due to the problem with event . Change to

<p:ajax  event="valueChange" process="someSelectRadio" update="panelGeral" />  

More info

Community
  • 1
  • 1
rashidnk
  • 4,096
  • 2
  • 22
  • 32