use of javax.portlet.PortletModeException in project liferay-faces-bridge-impl by liferay.
the class ApplicantBacking method initPortletURLs.
protected void initPortletURLs() {
FacesContext facesContext = FacesContext.getCurrentInstance();
ExternalContext externalContext = facesContext.getExternalContext();
Object response = externalContext.getResponse();
if (response instanceof MimeResponse) {
MimeResponse mimeResponse = (MimeResponse) response;
PortletURL portletURL = mimeResponse.createRenderURL();
try {
portletURL.setPortletMode(PortletMode.VIEW);
viewModeURL = portletURL.toString();
portletURL.setPortletMode(PortletMode.EDIT);
editModeURL = portletURL.toString();
portletURL.setPortletMode(PortletMode.HELP);
helpModeURL = portletURL.toString();
} catch (PortletModeException e) {
logger.error(e);
}
}
}
Aggregations