2015-11-02 59 views
0

有誰知道如何對齊這個selectOneMenu? 我在其他頁面有同樣的問題。 現在我只是發佈它,因爲stackoverflow說:它看起來像你的文章主要是代碼;請添加更多的數據。如何對齊這個selectOneMenu

enter image description here 代碼:

<!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:h="http://java.sun.com/jsf/html" 
    xmlns:f="http://java.sun.com/jsf/core" 
    xmlns:ui="http://java.sun.com/jsf/facelets" 
    xmlns:p="http://primefaces.org/ui" 
    xmlns:namespace="http://java.sun.com/jsf/composite/namespace" 
    xmlns:sec="http://www.springframework.org/security/facelets/tags"> 
<!-- 
     Replace path to template, title, header and body 
     with actual data. 
    --> 
<ui:composition template="Template.xhtml"> 
    <ui:define name="content"> 
     <div class="content_wrapper"> 
      <div class="content"> 
       <sec:ifAnyGranted roles="ROLE_ADMINISTRADOR,ROLE_USUARIO,ROLE_GERENCIADOR"> 




        <h:form id="formGrid"> 
        Data Inicial: <p:calendar id="popup" value="#{relatorioHistoricoMB.dataInicial}" /> 
        Data Final: <p:calendar id="popup2" value="#{relatorioHistoricoMB.dataFinal}" /> 
        <p:selectOneMenu value="#{relatorioHistoricoMB.reservatorio.idReservatorio}" 
         style="width:170px" required="true" 
         requiredMessage="Selecione algum."> 
         <f:selectItem itemLabel="Selecione o Reservatório" itemValue="0" /> 
         <f:selectItems value="#{relatorioHistoricoMB.listaReservatorio}" 
          var="reservatorio" itemLabel="#{reservatorio.nomeReservatorio}" 
          itemValue="#{reservatorio.idReservatorio}" /> 
        </p:selectOneMenu> 
        <p:commandButton value="Gerar relatório" update="formGrid" 
         actionListener="#{relatorioHistoricoMB.executar}" /> 

         <p:dataTable id="Grid" var="historico" 
          value="#{HistoricoBean.listaHistorico}" 
          selection="#{HistoricoBean.historico}" selectionMode="single" 
          rowKey="#{historico.idHistorico}" paginator="true" rows="5"> 
          <f:facet name="header"> 
           <h:outputText value="Historico" /> 
          </f:facet> 
          <p:column headerText="Reservatorio"> 
           <f:facet name="header"> 
            <h:outputText value="Reservatorio" /> 
           </f:facet> 
           <h:outputText value="#{historico.reservatorio.nomeReservatorio}" /> 
          </p:column> 


          <p:column headerText="Bomba"> 
           <f:facet name="header"> 
            <h:outputText value="Bomba" /> 
           </f:facet> 
           <h:outputText value="#{historico.bomba.nomeBomba}" /> 

          </p:column> 

          <p:column headerText="Data"> 
           <f:facet name="header"> 
            <h:outputText value="Data" /> 
           </f:facet> 
           <h:outputText value="#{historico.dataHistorico}" /> 
          </p:column> 

          <p:column headerText="Evento"> 
           <f:facet name="header"> 
            <h:outputText value="Evento" /> 
           </f:facet> 
           <h:outputText value="#{historico.novoStatusHistorico}" /> 
          </p:column> 


         </p:dataTable> 
        </h:form> 
       </sec:ifAnyGranted> 
      </div> 
     </div> 
    </ui:define> 
</ui:composition> 
</html> 
+0

整個數據表無關是(所有選擇都在外面)?然後請刪除問題中的代碼。所有隻是噪音。 – Kukeltje

回答