是否有可能重定向搜索结果(门户:$ theme.journalContentSearch())到我的“ HTTP://本地主机/搜索 ”页?
我需要这个,因为家里的网页上,我没有任何的portlet占位符,之后提交搜索表单,我什么也看不见。 如果我使用其他页面上的这个功能,它做工精细,但停留在同一个页面,在这里我的形式提交,如“/接触?**** **** blablabla”
/* 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);
}
这是行不通的,因为我留在同一个页面提交表单后:(