Skip to content

Instantly share code, notes, and snippets.

@chingovan
Last active February 20, 2017 18:18
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save chingovan/3d745c833c3cd5e3c82b to your computer and use it in GitHub Desktop.
Save chingovan/3d745c833c3cd5e3c82b to your computer and use it in GitHub Desktop.
<%@page import="com.liferay.portal.kernel.dao.search.RowChecker"%>
<%@include file="/html/actions/init.jsp"%>
<%
PortletURL portletURL = renderResponse.createRenderURL();
String portletURLString = portletURL.toString();
StudentSearchContainer studentSearchContainer = new StudentSearchContainer(renderRequest, portletURL);
StudentDisplayTerms displayTerms = (StudentDisplayTerms)studentSearchContainer.getDisplayTerms();
RowChecker rowChecker = new RowChecker(renderResponse);
%>
<aui:form action="<%= portletURLString %>" method="post" name="fm">
<liferay-ui:search-container searchContainer="<%= studentSearchContainer %>" rowChecker="<%= rowChecker %>">
<liferay-ui:search-form page="/html/actions/search.jsp" servletContext="<%= application %>" />
<liferay-ui:search-container-results
results="<%= StudentLocalServiceUtil.search(displayTerms.getCode(), displayTerms.getName(), displayTerms.getGender(), studentSearchContainer.getStart(), studentSearchContainer.getEnd())%>"
total="<%= StudentLocalServiceUtil.count(displayTerms.getCode(), displayTerms.getName(), displayTerms.getGender())%>"
/>
<liferay-ui:search-container-row
className="com.blogspot.chingovan.tutorial.actions.model.Student"
modelVar="student" keyProperty="studentId"
>
<portlet:renderURL var="viewDetailURL" >
<portlet:param name="studentId" value="<%= String.valueOf(student.getStudentId()) %>"/>
<portlet:param name="mvcPath" value="/html/actions/detail.jsp" />
</portlet:renderURL>
<liferay-ui:search-container-column-text property="code" href="<%= viewDetailURL %>"/>
<liferay-ui:search-container-column-text property="fullName" href="<%= viewDetailURL %>"/>
<liferay-ui:search-container-column-text name="gender" value='<%= student.isGender() == false ? "Nam" : "Nu" %>' href="<%= viewDetailURL %>"/>
<liferay-ui:search-container-column-text property="address" href="<%= viewDetailURL %>"/>
<liferay-ui:search-container-column-jsp path="/html/actions/action.jsp" name="actions" />
</liferay-ui:search-container-row>
<liferay-ui:search-iterator />
</liferay-ui:search-container>
<aui:button name="delete" type="button" icon="icon-delete" value="delete"/>
</aui:form>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment