How can i use <pe:letterAvatar/> in <p:dataTable/>?

Community Driven Extensions Project
Post Reply
marcelocaser
Posts: 122
Joined: 13 Dec 2011, 15:07

03 May 2019, 13:12

How can i use <pe:letterAvatar/> in <p:dataTable/>? To understand better, see:

... when I open the user registration page, for example ..

Image

Ok. It shows me the component <pe:letterAvatar/>

But when I click the next page, the 'avatar' component is no longer displayed. What could be wrong?

Image

piece of code:

Code: Select all

<p:dataTable id="dtUsuarios" var="twebusuariosTO" value="#{usuariosBean.twebusuariosTOs}" widgetVar="usuarios" selection="#{usuariosBean.twebusuariosTO}" rowKey="#{twebusuariosTO.id}" paginatorPosition="top"
                                     rows="5" paginator="true" paginatorTemplate="{CurrentPageReport}  {FirstPageLink} {PreviousPageLink} {PageLinks} {NextPageLink} {LastPageLink} {RowsPerPageDropdown} {Exporters}"
                                     rowsPerPageTemplate="5,10,15,50,100,500,1000" emptyMessage="#{msg.nenhumUsuarioCadastrado}" reflow="true" editable="true" editMode="cell" >
                            <f:facet name="{Exporters}">
                                <p:outputPanel id="pnlGlobalFilter" style="float: left;">
                                    <p:focus for="globalFilter"/>
                                    <p:tooltip for="globalFilter" showEffect="clip" escape="false" position="top">
                                        #{msg.nome}<br/>
                                        #{msg.cpf}<br/>
                                        #{msg.ramal}<br/>
                                        #{msg.email}<br/>
                                    </p:tooltip>
                                    <p:inputText id="globalFilter" placeholder="#{msg.pesquisar}..." class="hidden-xm-down"/>
                                    <p:commandButton icon="fa fa-search" oncomplete="PF('usuarios').filter()" style="margin-left: 10px" update="pnlGlobalFilter"/>
                                </p:outputPanel>
                            </f:facet>
                            <p:column>
                                <pe:letterAvatar value="#{twebusuariosTO.nomeCompleto}" height="24" width="24" rounded="true"/>
                            </p:column>
                            <p:column headerText="#{msg.nome}" sortBy="#{twebusuariosTO.nomeCompleto}">
                                <h:outputText value="#{twebusuariosTO.nomeCompleto}" />
                            </p:column>
                            ....
                            <p:column style="text-align:center" width="8%">
                                <p:commandLink id="consultar" 
                                               action="#{usuariosBean.consultar()}">
                                    <i class="secondary-link-icon fa fa-search"></i>
                                    <p:tooltip for="consultar"
                                               value="#{msg.menusOpcoesToolTipConsultar}" />
                                    <f:setPropertyActionListener value="#{twebusuariosTO}"
                                                                 target="#{usuariosBean.twebusuariosTO}" />
                                </p:commandLink>
                                <p:commandLink id="exclusao" oncomplete="PF('confirmacaoExcluir').show()" process="dtUsuarios">
                                    <i class="danger-link-icon fa fa-trash-o"></i>
                                    <p:tooltip for="exclusao"
                                               value="#{msg.menusOpcoesToolTipExcluir}" />
                                    <f:setPropertyActionListener value="#{twebusuariosTO}"
                                                                 target="#{usuariosBean.twebusuariosTO}" />
                                </p:commandLink>
                            </p:column>
                            <f:facet name="footer">
                                <h:outputFormat value="#{msg.vocePossui}" >
                                    <f:param value="#{usuariosBean.twebusuariosTOs.size()}" />
                                </h:outputFormat>
                            </f:facet>
                        </p:dataTable>

Melloware
Posts: 3716
Joined: 22 Apr 2013, 15:48

03 May 2019, 13:17

That is a good question. Are you on PF 7.0 and PFE 7.0?

Let me see if I can reproduce.
PrimeFaces Developer | PrimeFaces Extensions Developer
GitHub Profile: https://github.com/melloware
PrimeFaces Elite 13.0.0 / PF Extensions 13.0.0
PrimeReact 9.6.1

marcelocaser
Posts: 122
Joined: 13 Dec 2011, 15:07

03 May 2019, 13:19

Sorry,

Yes, i use PF 7.0.1 and PFe 7.0, with JSF Mojarra 2.3.8, and JEE 8

Melloware
Posts: 3716
Joined: 22 Apr 2013, 15:48

03 May 2019, 13:22

OK its a bug. Can you please report it here: https://github.com/primefaces-extension ... com/issues
PrimeFaces Developer | PrimeFaces Extensions Developer
GitHub Profile: https://github.com/melloware
PrimeFaces Elite 13.0.0 / PF Extensions 13.0.0
PrimeReact 9.6.1

marcelocaser
Posts: 122
Joined: 13 Dec 2011, 15:07

03 May 2019, 13:26

Yes of course! :)

Melloware
Posts: 3716
Joined: 22 Apr 2013, 15:48

05 May 2019, 17:24

OK I fixed it and it will be part of PFE 7.0.1 release. Thanks for reporting!
PrimeFaces Developer | PrimeFaces Extensions Developer
GitHub Profile: https://github.com/melloware
PrimeFaces Elite 13.0.0 / PF Extensions 13.0.0
PrimeReact 9.6.1

Post Reply

Return to “Extensions”

  • Information
  • Who is online

    Users browsing this forum: No registered users and 4 guests