Foros de discusión

StrutsPortlet vs. SearchContainer

Michael Illgner, modificado hace 14 años.

StrutsPortlet vs. SearchContainer

Junior Member Mensajes: 33 Fecha de incorporación: 30/06/09 Mensajes recientes
Hi folks,
I've got a strange problem using a liferay searchcontainer in a struts portlet. I want to have a list of database objects and a popup for viewing/deleting objects. I am using the SDK environment, so I have to use the apache bridge implementation of the StrutsPortlet.

A click on an popup/view entry should redirect to a new JSP view.jsp which displays the details of the selected database object

The SearchContainer it self is working already, here is a snippet of my code

<liferay-ui:search-container-row>
<liferay-ui:search-container-column-jsp align="right" path="/html/edit_actions.jsp" />
</liferay-ui:search-container-row>
<liferay-ui:search-iterator />

a snippet from the edit-actions.jsp

<portlet:renderURL windowState="<%= WindowState.MAXIMIZED.toString() %>" var="viewURL">
<portlet:param name="struts_action" value="/enquiry/view" />
<portlet:param name="resourcePrimKey" value="<%=String.valueOf(enquiry.getPrimaryKey()) %>" />
</portlet:renderURL>
<liferay-ui:icon image="view" url="<%=viewURL.toString() %>" />

a here a snippet from the struts_config.xml

<action path="/enquiry/view" forward="/html/view.jsp" />


The popupmenu is displayed, when I click on the view entry, nothing happens (there seems to be some server activity). No exception on the tomcat console, no entries in the log, nothing ...

Any idea what's going wrong ?
Did I miss something ?

Any help woruld be appreciated ...
Michael Illgner, modificado hace 14 años.

RE: StrutsPortlet vs. SearchContainer

Junior Member Mensajes: 33 Fecha de incorporación: 30/06/09 Mensajes recientes
Got it myself ;-)

The definition of the ActionURL was wrong for the apache portlet bridge, it should be

<portlet:actionURL var="viewURL">
<portlet:param name="_spage" value="/portlet_action/enquiry/view" />
<portlet:param name="redirect" value="<%= currentURL %>" />
<portlet:param name="resourcePrimKey" value="<%=String.valueOf(enquiry.getPrimaryKey()) %>" />
</portlet:actionURL>