我正在使用包含primefaces选项列表的表单。当我点击commandButton时没有任何反应。如果我删除了pickList,它可以正常工作。
<ui:define name="content">
<h:form>
<div class="form">
<p:panel id="panel" header="#{msgs['group.message.create']}">
<p:messages id="msgs" display="icon" />
<h:panelGrid columns="3">
<h:outputLabel for="name" value="#{msgs['general.text.name']} *" />
<h:outputText value="#{groupBean.group.name}" rendered="#{groupBean.group.id != null and groupBean.group.id != 0}" />
<p:inputText required="true" id="name" value="#{groupBean.group.name}" label="#{msgs['general.text.name']}"
rendered="#{groupBean.group.id == null or groupBean.group.id == 0}"/>
<p:message for="name" display="icon" />
<h:outputLabel for="description" value="#{msgs['general.text.description']} *" />
<p:inputTextarea required="true" id="description" value="#{groupBean.group.description}" label="#{msgs['general.text.description']}"/>
<p:message for="description" display="icon" />
<h:outputLabel for="pickList" value="#{msgs['group.message.permissions']} *" />
<p:pickList required="true" id="pickList" value="#{groupBean.permissions}" label="#{msgs['group.message.permissions']}"
var="p" itemLabel="#{p.description}" itemValue="#{p}" converter="permissionConverter"/>
<br/>
</h:panelGrid>
<div class="buttons">
<h:commandButton id="save" value="#{msgs['common.saveButton']}" action="#{groupBean.saveGroup}" styleClass="redButton" />
<h:commandButton class="greyButton" id="cancel" value="#{msgs['general.text.cancel']}" action="listGroups.xhtml?faces-redirect=true" immediate="true" />
</div>
</p:panel>
<h:inputHidden id="groupId" value="#{groupBean.group.id}" />
</div>
</h:form>