是否可以将搜索结果(portlet: $ theme.journalContentSearch())重定向到我的" http://localhost/search "页?
我需要这个,因为在主页上我没有任何portlet占位符,并且在提交搜索表单后,我什么都没看到。如果我在其他页面上使用此功能,它可以正常工作,但保持在我进行表单提交的同一页面,例如" /接触**** **** blablabla&#34?;
/* new */
long searchPlid = plid;
System.out.println(TAG + "plid: " + plid);
//My Hidden search page
Layout searchPage = LayoutLocalServiceUtil.fetchLayoutByFriendlyURL(group.getGroupId(), false, "/search");
if (null != searchPage) {
searchPlid = searchPage.getPlid();
System.out.println(TAG + "searchPlid. " + searchPlid);
}
/* /new */
if (portletResponse != null) {
LiferayPortletResponse liferayPortletResponse = (LiferayPortletResponse)portletResponse;
//portletURL = liferayPortletResponse.createLiferayPortletURL(PortletKeys.SEARCH, PortletRequest.RENDER_PHASE);
portletURL = liferayPortletResponse.createLiferayPortletURL(searchPlid, PortletKeys.SEARCH, PortletRequest.RENDER_PHASE);
}
else {
//portletURL = new PortletURLImpl(request, PortletKeys.SEARCH, plid, PortletRequest.RENDER_PHASE);
portletURL = new PortletURLImpl(request, PortletKeys.SEARCH, searchPlid, PortletRequest.RENDER_PHASE);
}
这不起作用,因为我在提交表格后保持同一页面:(