命令按钮在DataList控件accordionPanel的标签里面是更多钞票primefaces

2019-09-19 07:43发布

我不能让工作的命令按钮,所有数据都显示corectly和对话框中显示,但selectedcontacto没有改变。

    <p:tab title="#{grup.nombre}">
        <p:dataList value="#{grup.listausuarios}" var="cont"
                    paginator="true" rows="5"
                    paginatorTemplate="{PreviousPageLink} {CurrentPageReport} {NextPageLink} {RowsPerPageDropdown}"
                    rowsPerPageTemplate="5,10,15" type="none">      
            <p:commandButton icon="ui-icon-search" update=":frmindex:carDetail" onsuccess="carDialog.show()" title="View Detail">  
                <f:setPropertyActionListener value="#{cont.idusuario}" target="#{bnContactos.selectedcontacto}" />  
            </p:commandButton>

            <h:panelGrid columns="2">
                <p:graphicImage value="/resources/user.png"  width="60" height="100"/>
                <h:panelGrid columns="2">
                    <h:outputText value="Nombre: " />
                    <h:outputText value="#{cont.nombre}" style="font-weight: bold"/>
                    <h:outputText value="Correo: " />
                    <h:outputText value="#{cont.correo}" style="font-weight: bold"/>
                </h:panelGrid>
            </h:panelGrid>
        </p:dataList>       
    </p:tab>
</p:accordionPanel>

编辑:终于让我找到如何做,如果这里有人在乎我的新代码,它的工作(P:列加工艺=“@这个”造按钮的工作原理,为什么我不知道,我只取有东西在这里的东西,结果如下? )

<p:accordionPanel id="tcon" value="#{bnContactos.listagruposmodel}" dynamic="true"  var="grup" >
    <p:tab title="#{grup.nombre}">
        <p:dataList value="#{grup.listausuarios}" var="cont" id="dtus"
                    paginator="true" rows="5"
                    paginatorTemplate="{PreviousPageLink} {CurrentPageReport} {NextPageLink} {RowsPerPageDropdown}"
                    rowsPerPageTemplate="5,10,15" lazy="true" >                 
            <p:column>
                <h:panelGrid columns="2">
                    <p:graphicImage value="/resources/user.png"  width="60" height="100"/>
                    <h:panelGrid columns="2">
                        <h:outputText value="Nombre: " />
                        <h:outputText value="#{cont.nombre}" style="font-weight: bold"/>
                        <h:outputText value="Correo: " />
                        <h:outputText value="#{cont.correo}" style="font-weight: bold"/>
                        <p:commandButton process="@this" ajax="true" icon="ui-icon-search" update=":frmindex:messages" action="#{bnContactos.borrar(cont.idusuario)}" title="View Detail"/> 
                    </h:panelGrid>
                </h:panelGrid>
            </p:column>

        </p:dataList>
    </p:tab>
</p:accordionPanel>
文章来源: commandbutton in dataList inside tab of accordionPanel is it posible primefaces jsf