I'm working on a portlet for showing a list of rules, for selection.
And I want to focus the row of content selected on my database (rules variable loaded on init.jsp
).
What I should do for focusing/highlighting exactly one row?
Should I use <c:when
<c:otherwhise
for all the .jsp
:
I show a list of rules with this code:
<%@ taglib uri="http://java.sun.com/portlet_2_0" prefix="portlet" %>
<portlet:defineObjects />
<liferay-ui:search-container emptyResultsMessage="there-are-no-products" delta="5">
<liferay-ui:search-container-results>
<%
List<IRRule> tempResults = ActionUtil.getRules(renderRequest);
results = ListUtil.subList(tempResults, searchContainer.getStart(),
searchContainer.getEnd());
total = tempResults.size();
pageContext.setAttribute("results", results);
pageContext.setAttribute("total", total);
%>
</liferay-ui:search-container-results>
<liferay-ui:search-container-row
className="com.everis.oriol.inputrules.model.IRRule"
keyProperty="ruleId"
modelVar="rule">
<liferay-ui:search-container-column-text
name="ruleName"
property="ruleName"
/>
<liferay-ui:search-container-column-text
name="ruleDescription"
property="ruleDescription"
/>
<liferay-ui:search-container-column-jsp
path="/row.jsp"
align="right"
/>
</liferay-ui:search-container-row>
<liferay-ui:search-iterator />
</liferay-ui:search-container>
In the init.jsp
file I have...
<%
long groupId = themeDisplay.getScopeGroupId();
List<IRSelect> rulesPas = IRSelectLocalServiceUtil.getRule(groupId);
String rules = rulesPas.get(0).getRuleName();
%>
I exactly want to compare...
<liferay-ui:search-container-column-text
name="ruleName"
property="ruleName"
/>
with...
rules
Thank you for your help