0

这是我的问题:当我点击我的数据网格上的查看详细信息时,它不显示所选项目的信息,它只显示带有空白信息的标签......我按照 primefaces 展示柜上的所有步骤,我找不到问题

网格:

<h:body>       
    <f:view>
        <h:form id="form">
    <p:dataGrid var="item" value="#{equipamentosControle.lista}" columns="3"  
    rows="12" paginator="true"  
    paginatorTemplate="{CurrentPageReport}  {FirstPageLink} {PreviousPageLink}                 
    {PageLinks} {NextPageLink} {LastPageLink} {RowsPerPageDropdown}"  
    rowsPerPageTemplate="9,12,15">  

    <p:panel header="#{item.idEquip}" style="text-align:center">  
        <h:panelGrid columns="1" style="width:100%">                     

            <h:outputText value="#{item.nomeEquip}" />  

            <p:commandLink update=":form:equipDetail" oncomplete="equipDialog.show()" title="Ver Detalhes">  
                <h:outputText styleClass="ui-icon ui-icon-search" style="margin:0 auto;" />   
                <f:setPropertyActionListener value="#{item}"   
                                      target="#{equipamentosControle.selectedEquip}" />  
            </p:commandLink>  

        </h:panelGrid>  
    </p:panel>  

</p:dataGrid>  

<p:dialog header="Detalhes do equipamento" widgetVar="equipDialog" modal="true">  
    <p:outputPanel id="equipDetail" style="text-align:center;" layout="block">  


        <h:panelGrid  columns="2" cellpadding="5">  
            <h:outputLabel for="nomeEquip" value="Nome: " />  
            <h:outputText id="nomeEquip" value="#{equipamentosControle.selectedEquip.nomeEquip}" />  

            <h:outputLabel for="descEquip" value="Descrição: " />  
            <h:outputText id="descEquip" value="#{item.descEquip}" /> <!-- I also tried this way.. -->
   </h:panelGrid>  
        </p:outputPanel>  
      </p:dialog> 
      </h:form>
    </f:view>
 </h:body>                                 

这是托管bean:

@ManagedBean
@SessionScoped
public class EquipamentosControle {
 private Equipamentos equ = new Equipamentos();
EntityManager em = GeraEntityManager.getInstance().getEntityManager();
private List<Equipamentos> lista = new ArrayList<Equipamentos>();
private Equipamentos selectedEquip;
public Equipamentos getSelectedEquip() {  
    return selectedEquip;  
}  

public void setSelectedEquip(Equipamentos selectedEquip) {  
    this.selectedEquip = selectedEquip;  
}

关于我做错了什么的任何想法?

4

0 回答 0