Duplicated control in primefaces

2

I am working with primefaces and I have created a login where I select which database I will connect to since I have several depending on the choice so I initialize the connection, but the problem is at the level of the view that the control appears as tripled in the browser, I do not know what to do if I'm missing a library or what problem could be

This is my code

<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml"
      xmlns:f="http://java.sun.com/jsf/core"
      xmlns:h="http://java.sun.com/jsf/html"
      xmlns:p="http://primefaces.org/ui"
      xmlns:pm="http://primefaces.org/mobile"  
      contentType="text/html">

    <f:view renderKitId="PRIMEFACES_MOBILE" />
    <h:head />

    <h:body>
        <pm:page title="Login" loadingMessage="Cargando...">
            <pm:header title=" Mobile" />

            <pm:content>
                <h:form id="login_frm">
                    <p:remoteCommand  name="loadBD"
                                      process="@this"
                                      async="true"
                                      autoRun="true"
                                      update="somBD" 
                                      action="#{loginBean.loadBD()}" />

                    <p:growl id="messageError" for="msgError" showDetail="true" widgetVar="messageError" showSummary="true" />

                    <p:panel header="Login" >
                        <p:inputText label="Usuario: * " widgetVar="username" id="username" value="#{loginBean.username}" required="true" styleClass="input" title="#{component.valid ? '' : 'El Código de usuario no puede ir vacío'}" />
                        <pm:field>
                            <p:outputLabel for="password" value="Contraseña " styleClass="label"/>  
                            <p:password id="password" label="Contraseña" value="#{loginBean.password}" redisplay="true" required="true" styleClass="password" title="#{component.valid ? '' : 'Debe de introducir un password para ingresar al sistema'}" />
                        </pm:field>
                        <pm:field>
                            <h:outputLabel for="somBD" value="Empresa: "/>
                            <h:selectOneMenu id="somBD" value="#{loginBean.idbd}" > 
                                <f:selectItem itemLabel="Seleccione..." itemDisabled="true" itemValue="#{null}" />
                                <f:selectItems value="#{loginBean.l_bases_de_datos}" var="bd" itemLabel="#{bd.nombrebd}" itemValue="#{bd.idbd}"/>  
                            </h:selectOneMenu>
                        </pm:field>

                        <p:commandButton action="#{loginBean.validUser}" value="Ingresar" styleClass="button-primary" update=":login_frm:messageError" process="@form" />
                    </p:panel>
                </h:form>
            </pm:content>
        </pm:page>
    </h:body>
</html>
    
asked by Chris 11.08.2017 в 17:47
source

0 answers