I have 2 problems when trying to submit the form

0

Well I'm having a little problem here on my form, in reality it would be 2 problems.

1 - I'm using an autComplete, so I can get my object through the search, but at the time of submitting my form it simply deletes what I had completed.

2 - I have a tabView with 2 required fields, if it does not fill anything, it informs a random ID that I can not find, my components are with id.

NOTE: this form is in 3 different files, it follows the TABVIEW file

<ui:composition xmlns="http://www.w3.org/1999/xhtml"
xmlns:h="http://xmlns.jcp.org/jsf/html"
xmlns:f="http://xmlns.jcp.org/jsf/core"
xmlns:ui="http://java.sun.com/jsf/facelets"
xmlns:p="http://primefaces.org/ui" xmlns:o="http://omnifaces.org/ui">

    <p:tabView>
        <p:tab title="Serviço">
            <br />
            <h:panelGrid columns="4" styleClass="checkTipoServico">
                <p:selectBooleanCheckbox id="escapamento"
                    value="#{cadastroServicoBean.servico.tipoServico.escapamento}" />
                <p:outputLabel for="escapamento" value="Escapamento" />

                <p:selectBooleanCheckbox id="mecanica"
                    value="#{cadastroServicoBean.servico.tipoServico.mecanicaEmGeral}" />
                <p:outputLabel for="mecanica" value="Mecânica em Geral" />

                <p:selectBooleanCheckbox id="suspensaoRosca"
                    value="#{cadastroServicoBean.servico.tipoServico.suspensaoRosca}" />
                <p:outputLabel for="suspensaoRosca" value="Suspensão a Rosca"
                    style="margin-right:5px;" />

                <p:selectBooleanCheckbox id="suspensaoAr"
                    value="#{cadastroServicoBean.servico.tipoServico.suspensaoAr}" />
                <p:outputLabel for="suspensaoAr" value="Suspensão a Ar" />
            </h:panelGrid>
        </p:tab>

        <p:tab title="Descrição Serviço">
            <p:inputTextarea id="descricaoServico" rows="10"
                value="#{cadastroServicoBean.servico.descricaoServico}" cols="100"
                counter="display" maxlength="200"
                counterTemplate="{0} caracteres restantes." autoResize="false" />
            <h:outputText id="display" />
        </p:tab>
        <p:tab title="Observação">
            <h:panelGroup layout="block" style="padding-righ">
                <p:inputTextarea rows="10" style="width:99%" required="true"
                    value="#{cadastroServicoBean.servico.observacao}" />
            </h:panelGroup>
        </p:tab>
    </p:tabView>

Follow the image

    
asked by anonymous 22.03.2017 / 23:51

1 answer

0
  

1 - I'm using an autComplete, so I can get my object through the search, but at the time of submitting my form it simply deletes what I had completed.

Does the command to which you are submitting the form have any updates referring to the same form? (this is quite typical of this scenario).

  

2 - I have a tabView with 2 required fields, if it does not fill anything, it informs a random ID that I can not find, my components are with id.

For this case here, take a look at this showcase link , it's the same scenario that you're apparently having another component of primefaces <p:> that precedes the <p:inputTextarea> field.

    
29.03.2017 / 06:49