Portlet是否可以讀取其周圍頁面的請求參數?如何從LIferay/IceFaces/JSF portlet支持bean中獲取url請求參數
E.g. portlet所在頁面的URL是http://example.com/mygroup/mypage?foo=bar是否可以從該頁面上的portlet讀取「foo」參數?
Portlet Container是Liferay 6.0.5。
P.S.
我已經嘗試:
com.liferay.portal.util.PortalUtil.getOriginalServletRequest(com.liferay.portal.util.PortalUtil.getHttpServletRequest((javax.portlet.PortletRequest) FacesContext.getCurrentInstance().getExternalContext().getRequest())).getParameter("foo")
,但我總是爲null的productId
謝謝!
FacesContext.getCurrentInstance()getExternalContext()getRequestMap()得到。 (「foo」)爲我返回NULL。 – Negatizmo
對不起,錯字。編輯。 –
如果有幫助,我從partialSubmit =「True」icefaces命令按鈕來做這件事。因此,涉及ajax調用... – Negatizmo