I have 2 problems that when trying to submit the fomulário

Asked

Viewed 26 times

0

well I’m having little problem here on my form in fact would be 2 problems.

1 - I am using an autComplete, and then I can get my object through the search, only that at the time of submitting my fomulário it simply erases what had completed.

2 - I have a tabview with 2 required fields, if you do not fill anything, it informs a random ID that I cannot find, my components are with id.

NOTE: this form is in 3 different files, follow 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>

inserir a descrição da imagem aqui

Follow the image

  • anyone?? up....

  • Post the convert from your autocomplete.

1 answer

0

1 - I am using an autComplete, and then I can get my object through the search, only that at the time of submitting my fomulário it simply erases what had completed.

the command to which you are submitting the form has any update referencing to the same form? (this is quite typical of this scenario).

2 - I have a tabview with 2 required fields, if you do not fill anything, it informs a random ID that I cannot find, my components are with id.

For this case here, take a look at this showcase https://www.primefaces.org/showcase/ui/misc/outputLabel.xhtml, is the same scenario you are having, apparently you need another component of the first faces <p:> ahead of the field <p:inputTextarea>.

Browser other questions tagged

You are not signed in. Login or sign up in order to post.