2016年4月22日 | Leave a comment 问题: sellectionOneButton valueChangeListener 不起作用 <p:selectOneButton value="#{orderBean.orientation}" valueChangeListener="#{orderBean.orientationChanged}" > <f:selectItem value="#{orderBean.allstatuList}"/> </p:selectOneButton> 123 <p:selectOneButton value="#{orderBean.orientation}" valueChangeListener="#{orderBean.orientationChanged}" > <f:selectItem value="#{orderBean.allstatuList}"/> </p:selectOneButton> 解决: onchange=”submit()” <p:selectOneButton value="#{orderBean.orientation}" valueChangeListener="#{orderBean.orientationChanged}" onchange="submit()"> <f:selectItem value="#{orderBean.allstatuList}"/> </p:selectOneButton> 123 <p:selectOneButton value="#{orderBean.orientation}" valueChangeListener="#{orderBean.orientationChanged}" onchange="submit()"> <f:selectItem value="#{orderBean.allstatuList}"/> </p:selectOneButton> 参考: http://www.mkyong.com/jsf2/jsf-2-valuechangelistener-example/