<tabView> repeat tab content

UI Components for JSF
Post Reply
aix
Posts: 7
Joined: 21 Apr 2010, 12:24

20 Jul 2010, 08:05

Hello, I have a TabView event "mouseover" and navigate between tabs just fine, but when I validate a field and show the menssagem error, or even show a message when a value entered correctly, if I pass the mouse over the tab next to the tab displays all the contents first (repeat everything that has at first), as I do not ocontecer for this? I want to navigate between tabs and each show only the content you have, how do I?

cod. example

Code: Select all

            <h:outputStylesheet library="skins/smoothness" name="skin.css"></h:outputStylesheet>
            <h:form prependId="false">
                <p:tabView event="mouseover">
                    <p:tab title="Cadastro de Fornecedores" id="panel">
                <p:messages id="messages"/>
                    <h:outputLabel for="nome" value="Razão Social:" styleClass="labelRazaoSocial"></h:outputLabel>
                    <h:inputText id="nome" value="#{pessoaController.nome}" label="Razão Social" styleClass="campos" size="60" maxlength="100" autocomplete="off">
			<p:ajax event="blur" update="messages" />
                    </h:inputText>
                    <h:outputLabel for="pessoa_id" value="ID:" styleClass="labelID"></h:outputLabel>
                    <h:inputText id="pessoa_id" value="#{pessoaController.pessoa_id}" styleClass="campos" size="20" maxlength="14" autocomplete="off"></h:inputText><br></br>
                    <h:outputLabel for="nomeFantasia" value="Nome Fantasia:" styleClass="labelNomeFantasia"></h:outputLabel>
                    <h:inputText id="nomeFantasia" value="#{pessoaController.nomeFantasia}" styleClass="campos" size="60" maxlength="100" autocomplete="off"></h:inputText><br></br>
                    <h:outputLabel for="observacaoe" value="Observação:" styleClass="labelObservacao"></h:outputLabel>
                    <h:inputText id="observacaoe" value="#{pessoaController.observacaoe}" styleClass="campos" size="60" maxlength="200" autocomplete="off"></h:inputText><br></br>
<br></br><p></p>
                    <p:ajaxStatus style="width:1px;height:1px;">
                        <f:facet name="start">
                            <h:graphicImage value="/image/ajax-loader.gif" />
			</f:facet>
			<f:facet name="complete">
                            <h:outputText value="" />
			</f:facet>
                    </p:ajaxStatus>
                    <p:commandButton value="Salvar" update="panel ? messages"  style="margin-left: 100px;" action="#{pessoaController.adicionarPessoa}"></p:commandButton>
                    <p></p>
                </p:tab>
                <p:tab title="Situação">
                <p:messages id="messages2"/>
                    <h:outputLabel for="nome2" value="Razão Social:" styleClass="labelRazaoSocial"></h:outputLabel>
                    <h:inputText id="nome2"  label="Razão Social" styleClass="campos" size="60" maxlength="100" autocomplete="off">
			<p:ajax event="blur" update="messages2" />
                    </h:inputText>
                    <h:outputLabel for="pessoa_id2" value="ID:" styleClass="labelID"></h:outputLabel>
                    <h:inputText id="pessoa_id2"  styleClass="campos" size="20" maxlength="14" autocomplete="off"></h:inputText><br></br>
                    <p:ajaxStatus style="width:1px;height:1px;">
                        <f:facet name="start">
                            <h:graphicImage value="/image/ajax-loader.gif" />
			</f:facet>
			<f:facet name="complete">
                            <h:outputText value="" />
			</f:facet>
                    </p:ajaxStatus>
                    <p:commandButton value="Salvar" update="messages2" style="margin-left: 100px;" ></p:commandButton>
                    <p></p>
                </p:tab>


Post Reply

Return to “PrimeFaces”

  • Information
  • Who is online

    Users browsing this forum: No registered users and 17 guests