Forums

Home » Liferay Portal » English » 3. Development

Combination View Flat View Tree View
Threads [ Previous | Next ]
toggle
Sridharan Narayanan
Pagination Of list Objects with Search Container
April 28, 2010 3:17 AM
Answer

Sridharan Narayanan

Rank: New Member

Posts: 2

Join Date: April 9, 2010

Recent Posts

I am using Search Container with the following Code for list of Objects;


I am Getting first 5 set of records but i am pressing next button its showing same page

without Search Container


Please help to rectify this




<%
List patientList = (List) request.getAttribute("attr");

PortletURL portletURL = renderResponse.createRenderURL();

portletURL.setWindowState(WindowState.MAXIMIZED);

%>


<liferay-ui:search-container delta="5" emptyResultsMessage="No Patients To display">


<liferay-ui:search-container-results
total="<%= patientList.size() %>"
results="<%= ListUtil.subList(patientList, searchContainer.getStart(), searchContainer.getEnd()) %>"
/>

<liferay-ui:search-container-row modelVar="patients" className="org.healthnet.bs.vo.PatientVO" >



<liferay-ui:search-container-column-text name="GivenName" value="<%= patients.getGivenName()%>" />
<liferay-ui:search-container-column-text name="MiddleName" value="<%= patients.getMiddleName() %>" />
<liferay-ui:search-container-column-text name="FamilyName" value="<%= patients.getFamilyName() %>" />
<liferay-ui:search-container-column-text name="Gender" value="<%= patients.getGender() %>" />
<liferay-ui:search-container-column-text name="DateOfBirth" value="<%= patients.getBirthdate().toString() %>" />
<liferay-ui:search-container-column-text name="Age" value="<%= patients.getAge().toString() %>" />

</liferay-ui:search-container-row>

<liferay-ui:search-iterator searchContainer="<%= searchContainer%>" />

</liferay-ui:search-container>
venka reddy
RE: Pagination Of list Objects with Search Container
April 5, 2011 4:23 AM
Answer

venka reddy

Rank: Regular Member

Posts: 231

Join Date: March 23, 2011

Recent Posts

Can u post me sortable search container sample code
Tanweer .
RE: Pagination Of list Objects with Search Container
April 5, 2011 11:17 AM
Answer

Tanweer .

Rank: Expert

Posts: 319

Join Date: March 11, 2010

Recent Posts

Hi Sridharan,

Try removing the line "portletURL.setWindowState(WindowState.MAXIMIZED);" from your code because when you press the next button,the search iterator makes a call with the WindowState in MAXIMIZED mode , so you get the same result in the MAXIMIZED mode.Removing the above line should fix the issue.
Hope this helps.
Tanweer .
RE: Pagination Of list Objects with Search Container
April 5, 2011 11:38 AM
Answer

Tanweer .

Rank: Expert

Posts: 319

Join Date: March 11, 2010

Recent Posts

Venka ,

THis link may be of use to you.
Mittal Patoliya
RE: Pagination Of list Objects with Search Container
July 31, 2013 6:18 AM
Answer

Mittal Patoliya

Rank: New Member

Posts: 24

Join Date: December 14, 2011

Recent Posts

Hey could you suggest me the implementation of org.healthnet.bs.vo.PatientVO class?
I am also having custom object list which I wanted to iterate