我在 Bootstrap 中有以下模态表单,其中用户插入数据以添加新行但 p:commandbutton 从不执行 lineaBean.insertar() 并且当我有一个看起来的删除模态表单时我不知道它在做什么平等,像魅力一样工作......有什么想法吗?这是我的代码:
<!-- Bootstrap trigger to open modal -->
<div class="hide fade modal" id="insertar-linea">
<div class="modal-header">
<button type="button" class="close" data-dismiss="modal">×</button>
<h3>Alta de linea</h3>
</div>
<h:form class="form-horizontal well" id="form-insertar-linea">
<div class="modal-body">
<fieldset>
<h4>Número: </h4><h:inputText id="numero-form" class="validate[required]" value="#{lineasBean.numero}"></h:inputText>
<h4>Fecha Validacion: </h4><h:inputText id="fecha-form" class="validate[required]" value="#{lineasBean.fechaFact}"></h:inputText>
<h4>Publico: </h4>
<h:selectOneRadio id="publico-form" value="#{lineasBean.publico}">
<f:selectItem itemLabel="SI" itemValue="y"/>
<f:selectItem itemLabel="NO" itemValue="n"/>
</h:selectOneRadio>
</fieldset>
</div>
<div class="modal-footer">
<a href="#" class="btn" data-dismiss="modal">Cancelar</a>
<p:commandButton id="okInsertar" onclick="if($('#form-insertar-linea').validationEngine('validate')===false){return false;}"
styleClass="btn btn-primary ok" value="Ok" action="#{lineasBean.insertar()}"
oncomplete="checkCRUD(xhr, status, args)"/>
</div>
</h:form>
</div>