I’m developing a liferay portlet. Here is my code in jsp file:
<table class="DDGridView">
<tr class="td">
<td class="th">Complex Name</td>
<td class="th">City</td>
<td class="th">Status</td>
</tr>
<%
Complex complex;
for(int i = 0 ; i < complexList.size(); i++)
{
complex = (Complex)complexList.get(i);
%>
<tr class="td">
<td><%=complex.complexName %></td>
<td><%=complex.complexCity %></td>
<%
if(complex.isActive == 1)
{
%>
<td class="th">Active</td>
<%
}
else
{
%>
<td>Not Active</td>
<%
}
%>
<td><a href="<%=prepareEditComplexURL%>">Edit</a></td>
<td><a>Delete</a></td>
</tr>
<%
}
%>
</table>
When user clicks on Edit url, I want to send the selected row items to the portlet class. But I don’t know how to do that. How can I do that?
By your comment it seems you need help in constructing URLs.
So, you can construct the URL inside the
forloop like:If you want to use these details to do some database operations like
updateorinsertOr if you want to render (or show) some page depending on these fields then use Render URL, like this:
Also it would help if you can refer some concepts regarding portletURLs and how to use them. There are good tutorials available and also
Portlets in Actionis a good book regarding almost all the concepts of portlet development in one place.Hope this helps.