Boa tarde,
Estou com esse .xhtml de cadastro e o button de id=“botaoSalvar” processa o form de maneira correta, mas o button de id=“addEquip” já não processa, alguém poderia me explicar o porque?
<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
xmlns:ui="http://java.sun.com/jsf/facelets"
xmlns:h="http://java.sun.com/jsf/html"
xmlns:p="http://primefaces.org/ui"
xmlns:f="http://java.sun.com/jsf/core">
<ui:composition id="composicao" template="/template.xhtml">
<!-- <ui:define name="title">
<h:outputText value="#{bundle.CreateParciaisEdesImobAreasTitle}"> </h:outputText>
</ui:define> -->
<ui:define name="body">
<f:view>
<f:metadata>
<f:viewParam name="codigo" value="#{parciaisEdesImobAreasController.selected}" />
</f:metadata>
<h:outputScript name="js/locale-primefaces.js"/>
<h:outputScript name="js/jquery.maskMoney.js"/>
<script type="text/javascript">
$(document).ready(format);
function format() {
jQuery('input[id*=odex]').unmaskMoney();
jQuery('input[id*=odex]').maskMoney({symbolStay: false, symbol: "R$ ", decimal: "", thousands: "", showSymbol: false});
jQuery('input[id*=odd]').unmaskMoney();
jQuery('input[id*=odd]').maskMoney({symbolStay: false, symbol: "R$ ", decimal: "", thousands: "", showSymbol: false});
jQuery('input[id*=projeto]').unmaskMoney();
jQuery('input[id*=projeto]').maskMoney({symbolStay: false, symbol: "R$ ", decimal: "", thousands: "", showSymbol: false});
jQuery('input[id*=valor]').unmaskMoney();
jQuery('input[id*=valor]').maskMoney({symbolStay: false, symbol: "R$ ", decimal: ",", thousands: ".", showSymbol: true, precision: 2 });
}
</script>
<h:form id="form">
<p:panel id="panelData" styleClass="centralizado" header="#{bundle.CreateParciaisEdesImobAreasTitle}" style="margin-top: 10px; width: 1024px;">
<h:panelGrid width="100%" columnClasses="colunaTabela33,colunaTabela33,colunaTabela33" columns="3">
<h:outputLabel value="#{bundle.CreateParciaisEdesImobAreasLabel_odex}" for="odex" />
<h:outputLabel value="#{bundle.CreateParciaisEdesImobAreasLabel_odd}" for="odd" />
<h:outputLabel value="#{bundle.CreateParciaisEdesImobAreasLabel_projeto}" for="projeto" />
<p:inputText id="odex" maxlength="255" value="#{parciaisEdesImobAreasController.selected.odex}" title="#{bundle.CreateParciaisEdesImobAreasTitle_odex}"/>
<p:inputText id="odd" maxlength="255" value="#{parciaisEdesImobAreasController.selected.odd}" title="#{bundle.CreateParciaisEdesImobAreasTitle_odd}"/>
<p:inputText id="projeto" maxlength="255" value="#{parciaisEdesImobAreasController.selected.projeto}" title="#{bundle.CreateParciaisEdesImobAreasTitle_projeto}" required="true" requiredMessage="Preencha o campo #{bundle.CreateParciaisEdesImobAreasTitle_projeto}"/>
</h:panelGrid>
<h:panelGrid width="100%" columnClasses="colunaTabela50,colunaTabela50" columns="2">
<h:outputLabel value="#{bundle.CreateParciaisEdesImobAreasLabel_responsavel}" for="responsavel" />
<h:outputLabel value="#{bundle.CreateParciaisEdesImobAreasLabel_valor}" for="valor" />
<p:inputText id="responsavel" maxlength="50" size="50" onblur="value=value.toUpperCase()" value="#{parciaisEdesImobAreasController.selected.responsavel}" title="#{bundle.CreateParciaisEdesImobAreasTitle_responsavel}" required="true" requiredMessage="Preencha o campo #{bundle.CreateParciaisEdesImobAreasTitle_responsavel}"/>
<p:inputText id="valor" value="#{parciaisEdesImobAreasController.selected.valor}" title="#{bundle.CreateParciaisEdesImobAreasTitle_valor}" >
<f:convertNumber pattern="#,##0.00"/>
</p:inputText>
</h:panelGrid>
<h:panelGrid width="100%" columnClasses="colunaTabela50,colunaTabela50" columns="2">
<h:outputLabel value="#{bundle.CreateParciaisEdesImobAreasLabel_tipoDoc}" for="tipoDoc" />
<h:outputLabel value="#{bundle.CreateParciaisEdesImobAreasLabel_data}" for="data" />
<p:inputText id="tipoDoc" maxlength="50" size="50" onblur="value=value.toUpperCase()" value="#{parciaisEdesImobAreasController.selected.tipoDoc}" title="#{bundle.CreateParciaisEdesImobAreasTitle_tipoDoc}" required="true" requiredMessage="Preencha o campo #{bundle.CreateParciaisEdesImobAreasTitle_tipoDoc}"/>
<p:calendar locale="pt" pattern="dd/MM/yyyy" id="data" value="#{parciaisEdesImobAreasController.selected.data}" title="#{bundle.CreateParciaisEdesImobAreasTitle_data}" required="true" requiredMessage="Preencha o campo #{bundle.CreateParciaisEdesImobAreasTitle_data}"/>
</h:panelGrid>
<h:panelGrid width="100%" columnClasses="colunaTabela50,colunaTabela50" columns="2">
<h:outputLabel value="#{bundle.CreateParciaisEdesImobAreasLabel_cr}" for="cr" />
<h:outputLabel value="#{bundle.CreateParciaisEdesImobAreasLabel_numDoc}" for="numDoc" />
<p:autoComplete id="cr" forceSelection="true" value="#{parciaisEdesImobAreasController.selected.cr}"
maxResults="8" size="30" dropdown="true" required="true" requiredMessage="Preencha o campo CR"
var="cr" itemLabel="#{cr.cr}#{cr.idArea.area}#{cr.idDepartamento.departamento}" itemValue="#{cr}"
completeMethod="#{crController.completeCreate}" converter="crConverter"/>
<p:inputMask mask="9999/9999" id="numDoc" maxlength="20" value="#{parciaisEdesImobAreasController.selected.numDoc}" title="#{bundle.CreateParciaisEdesImobAreasTitle_numDoc}" />
</h:panelGrid>
<br/>
<p:commandButton id="addEquip" value="Adicionar" action="#{parciaisEdesImobAreasController.addItemInList}" update="dataTable" immediate="true" ajax="false"/>
<p:commandButton id="rmvEquip" value="Remover" action="#{parciaisEdesImobAreasController.rmvItemList}" update="dataTable" immediate="true" process="rmvEquip, form:panelData"/>
<br/>
<br/>
<p:dataTable id="dataTable" var="item" emptyMessage="Sem documentos inseridos." selectionMode="single" value="#{parciaisEdesImobAreasController.dataModel}" selection="#{parciaisEdesImobAreasController.current}" rowKey="#{item.codigo}" rows="10">
<f:facet name="header">
Lista de Documentos
</f:facet>
<p:ajax event="rowSelect"/>
<p:column headerText="#{bundle.CreateParciaisEdesImobAreasTitle_odex}" >
#{item.odex}
</p:column>
<p:column headerText="#{bundle.CreateParciaisEdesImobAreasTitle_odd}" >
#{item.odd}
</p:column>
<p:column headerText="#{bundle.CreateParciaisEdesImobAreasTitle_projeto}" >
#{item.projeto}
</p:column>
<p:column headerText="#{bundle.CreateParciaisEdesImobAreasTitle_responsavel}" >
#{item.responsavel}
</p:column>
<p:column headerText="#{bundle.CreateParciaisEdesImobAreasTitle_valor}" >
R$ #{item.valor}
</p:column>
<p:column headerText="#{bundle.CreateParciaisEdesImobAreasTitle_tipoDoc}" >
#{item.tipoDoc}
</p:column>
<p:column headerText="#{bundle.CreateParciaisEdesImobAreasTitle_data}" >
#{item.data}
</p:column>
<p:column headerText="#{bundle.CreateParciaisEdesImobAreasTitle_cr}" >
#{item.cr.cr} - #{item.cr.idArea.area}
</p:column>
<p:column headerText="#{bundle.CreateParciaisEdesImobAreasTitle_numDoc}" >
#{item.numDoc}
</p:column>
</p:dataTable>
</p:panel>
<p:panel styleClass="centralizado" header="#{bundle.acoes}" style="margin-top: 10px; width: 1024px;">
<h:panelGrid style="text-align: center" columnClasses="colunaTabela33, colunaTabela33, colunaTabela33" columns="3" width="100%">
<p:commandButton id="botaoSalvar" icon="ui-icon-disk" action="#{parciaisEdesImobAreasController.create}" value="#{bundle.CreateParciaisEdesImobAreasSaveLink}" ajax="false" />
<p:commandButton id="botaoConsultar" icon="ui-icon-search" action="#{parciaisEdesImobAreasController.prepareList}" value="#{bundle.CreateParciaisEdesImobAreasShowAllLink}" ajax="false" immediate="true"/>
<p:commandButton id="botaoNovo" icon="ui-icon-document" value="#{bundle.novo}" action="#{parciaisEdesImobAreasController.prepareCreate}" ajax="false" immediate="true"/>
</h:panelGrid>
</p:panel>
</h:form>
</f:view>
</ui:define>
</ui:composition>
</html>
