use of javax.portlet.faces.BridgeException in project liferay-faces-bridge-impl by liferay.
the class BridgePhaseCompat_2_0_Impl method throwQueuedExceptionIfNecessary.
protected void throwQueuedExceptionIfNecessary(FacesContext facesContext) throws BridgeException {
// If there were any "handled" exceptions queued, then throw a BridgeException.
ExceptionHandler exceptionHandler = facesContext.getExceptionHandler();
Throwable t = getQueuedException(exceptionHandler, true);
if (t == null) {
// Otherwise, if there were any "unhandled" exceptions queued, then throw a BridgeException.
t = getQueuedException(exceptionHandler, false);
}
if (t != null) {
if (t instanceof BridgeException) {
throw (BridgeException) t;
} else {
Throwable cause = t.getCause();
if ((cause != null) && (cause instanceof BridgeInvalidViewPathException)) {
throw (BridgeException) cause;
} else {
throw new BridgeException(t);
}
}
}
}
use of javax.portlet.faces.BridgeException in project liferay-faces-bridge-impl by liferay.
the class BridgeURLFactoryImpl method getBridgeBookmarkableURL.
@Override
public BridgeURL getBridgeBookmarkableURL(FacesContext facesContext, String uri, Map<String, List<String>> parameters) throws BridgeException {
ExternalContext externalContext = facesContext.getExternalContext();
ContextInfo contextInfo = new ContextInfo(facesContext.getViewRoot(), externalContext, facesContext.getResponseWriter());
ClientWindowInfo clientWindowInfo = new ClientWindowInfo(externalContext);
try {
return new BridgeURLBookmarkableImpl(uri, contextInfo.contextPath, contextInfo.namespace, contextInfo.encoding, contextInfo.facesURLEncoder, contextInfo.currentFacesViewId, parameters, clientWindowInfo.isRenderModeEnabled(facesContext), clientWindowInfo.getId(), clientWindowInfo.getUrlParameters(facesContext), contextInfo.portletConfig, contextInfo.bridgeConfig);
} catch (URISyntaxException | UnsupportedEncodingException e) {
throw new BridgeException(e);
}
}
use of javax.portlet.faces.BridgeException in project liferay-faces-bridge-impl by liferay.
the class BridgeURLFactoryImpl method getBridgeRedirectURL.
@Override
public BridgeURL getBridgeRedirectURL(FacesContext facesContext, String uri, Map<String, List<String>> parameters) throws BridgeException {
ExternalContext externalContext = facesContext.getExternalContext();
ContextInfo contextInfo = new ContextInfo(facesContext.getViewRoot(), externalContext, facesContext.getResponseWriter());
ClientWindowInfo clientWindowInfo = new ClientWindowInfo(externalContext);
try {
return new BridgeURLRedirectImpl(uri, contextInfo.contextPath, contextInfo.namespace, contextInfo.encoding, contextInfo.facesURLEncoder, parameters, clientWindowInfo.isRenderModeEnabled(facesContext), clientWindowInfo.getId(), clientWindowInfo.getUrlParameters(facesContext), contextInfo.portletConfig, contextInfo.bridgeConfig);
} catch (URISyntaxException | UnsupportedEncodingException e) {
throw new BridgeException(e);
}
}
use of javax.portlet.faces.BridgeException in project liferay-faces-bridge-impl by liferay.
the class BridgeURLFactoryImpl method getBridgeActionURL.
@Override
public BridgeURL getBridgeActionURL(FacesContext facesContext, String uri) throws BridgeException {
ExternalContext externalContext = facesContext.getExternalContext();
ContextInfo contextInfo = new ContextInfo(facesContext.getViewRoot(), externalContext, facesContext.getResponseWriter());
ClientWindowInfo clientWindowInfo = new ClientWindowInfo(externalContext);
try {
return new BridgeURLActionImpl(uri, contextInfo.contextPath, contextInfo.namespace, contextInfo.encoding, contextInfo.facesURLEncoder, contextInfo.currentFacesViewId, clientWindowInfo.isRenderModeEnabled(facesContext), clientWindowInfo.getId(), clientWindowInfo.getUrlParameters(facesContext), contextInfo.portletConfig, contextInfo.bridgeConfig);
} catch (URISyntaxException | UnsupportedEncodingException e) {
throw new BridgeException(e);
}
}
Aggregations