0

我有一个表单,我希望它仅在用户在 selectOneRadio 上标记为“是”时才显示一些输入。

这是代码:

<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>

我已经尝试更改事件单击,单击时,两者都对我不起作用。

4

1 回答 1

1

这可能是由于event的问题。改成

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

更多信息

于 2016-05-26T10:25:32.273 回答