Hello
I have the following situation: a users table, and users have photos, I would like to move the mouse over the user name, present a tooltip of the primefaces with the image of the user, which is already happening.
The problem arises when we filter the table data, after filtering the image no longer appears.
Comments:
- The image is being inserted through a StreamedContent object.
- I've found some people are reporting problems with the filter being set null, so when filtering, it loses the reference of the data, even though I could not solve the problem, follow the link of the possible problem: http: / forum. primefaces.org/viewtopic.php?f=3&t=44524
Even following the steps mentioned, it did not work for me, however I believe this is the problem.
Any help is welcome.
<p:dataTable id="tableUsers" var="userTable" value="#{usersController.listUsers}" selection="#{usersController.selectedUsers}" filteredValue="#{usersController.filteredUsers}" rowKey="#{userTable.id}">
<p:ajax event="filter" listener="#{usersController.onFilterTable}" />
<p:column headerText="ID" sortBy="#{userTable.id}" filterBy="#{userTable.id}" filterMatchMode="exact">
<h:outputText value="#{userTable.id}" />
</p:column>
<p:column headerText="Nome" sortBy="#{userTable.name}" filterBy="#{userTable.name}" filterMatchMode="contains">
<h:outputLink id="content" value="#" style="text-decoration:none;">
<h:outputText value="#{userTable.name}" style="z-index:1;" />
</h:outputLink>
<p:tooltip id="toolTipContent" for="content" position="bottom">
<p:graphicImage id="imageThumbnail" cache="false" rendered="#{userTable.imageStreamed != null}" value="#{userTable.imageStreamed}" width="80" height="80" stream="false" />
<h:outputText rendered="#{userTable.imageStreamed == null}" value="Sem foto" />
</p:tooltip>
</p:column>
</p:dataTable>