Foros de discusión
Liferay Search - Search Toggle
Alex Curtui, modificado hace 11 años.
Liferay Search - Search Toggle
Junior Member Mensajes: 30 Fecha de incorporación: 8/11/12 Mensajes recientes
Hello,
I wrote the following code
which displays a list of users. My problem is that I need to have two types of search: simple and advanced.
I know that I should use
Thank you in advance,
Alex C.
I wrote the following code
<liferay-ui:search-container delta="5" emptyresultsmessage="no-users-were-found" orderbycol="<%= orderByCol %>" orderbytype="<%= orderByType %>">
<liferay-ui:search-container-results results="<%= ContactsPortlet.getUsersFiltered(request, searchContainer.getStart(), searchContainer.getEnd(), orderByComparator) %>" total="<%= ContactsPortlet.userSize %>" />
<liferay-ui:search-container-row classname="com.contacts.model.UserInterface" keyproperty="firstName" modelvar="user">
<liferay-ui:search-container-column-text name="First Name" value="<%= user.getFirstName() %>" orderable="true" orderableProperty="firstName" />
<liferay-ui:search-container-column-text name="Last Name" value="<%= user.getLastName() %>" orderable="true" orderableProperty="lastName" />
<liferay-ui:search-container-column-text name="Phone Number" value="<%= user.getPhonesString() %>" />
<liferay-ui:search-container-column-text name="Department" value="<%= user.getDepartment() %>" orderable="true" orderableProperty="department" />
<liferay-ui:search-container-column-text name="Building" value="<%= user.getBuilding() %>" orderable="true" orderableProperty="building" />
</liferay-ui:search-container-row>
<liferay-ui:search-iterator />
</liferay-ui:search-container>
which displays a list of users. My problem is that I need to have two types of search: simple and advanced.
I know that I should use
<liferay-ui:search-form page="/html/contactsportlet/viewForm.jsp" />
where viewForm.jsp should contain a liferay-ui:search-toggle, but that's all I know.Thank you in advance,
Alex C.