Forums

Home » Liferay Portal » English » 3. Development

Combination View Flat View Tree View
Threads [ Previous | Next ]
toggle
Seeya S Kudtarker
Display Images from DL Library
April 15, 2013 12:24 AM
Answer

Seeya S Kudtarker

Rank: Regular Member

Posts: 187

Join Date: January 15, 2013

Recent Posts

I have a jsp where I display information of the employees and their details
I am doing this using search container as follows:

portlet:renderURL var="viewPendingLeaveApplicationsURL"/>
<liferay-ui:search-container delta="20" emptyResultsMessage="No Results Found">
<liferay-ui:search-container-results total="<%= pendingApprovals .size() %>"
results="<%= ListUtil.subList(pendingApprovals , searchContainer.getStart(), searchContainer.getEnd()) %>" />
<liferay-ui:search-container-row modelVar="search"
className="com.test.mis.portal.model.Employee">

<liferay-ui:search-container-column-text name='Leave Duration' value='<%=String.valueOf(search.getEmpName())%>' href="" />

<liferay-ui:search-container-column-text name="From" value ='<%=String.valueOf(search.getEmpAge())%>' href = ""/>

<liferay-ui:search-container-column-text name="To" value ='<%=String.valueOf(search.getEmpAddress())%>' href = ""/>

<liferay-ui:search-container-column-text name="Reason" value ='<%=String.valueOf(search.getEmpother())%>' href = ""/>

</liferay-ui:search-container-row>
<liferay-ui:search-iterator searchContainer="<%=searchContainer %>" paginate="<%=true %>" />
</liferay-ui:search-container>



I have stored the images of all the employees in the Document Library.
How should I display the images for each in the same search container above?? I had tried displaying an image by providing the fileEntryId of one employee. The same image gor displayed everywhere since I had supplied one fileEntryId.

How should I go about displaying the correct pics of each employee??
mohammad azaruddin
RE: Display Images from DL Library
April 15, 2013 12:43 AM
Answer

mohammad azaruddin

Rank: Expert

Posts: 455

Join Date: September 17, 2012

Recent Posts

HI try this
link

for 6.0.5 <img src="<%= themeDisplay.getPathImage() %>/image_gallery?img_id=<%= itemm.getSmallImageId() %>"/>

This is the method.but u need to do R&D on this