public StateCacheFactoryImpl() { _clientSideStateCache = new ClientSideStateCacheImpl(); _serverSideStateCache = new ServerSideStateCacheImpl(); }
private static void _init(FacesContext context) throws IOException { if (errorParts == null) { errorParts = _splitTemplate(_getErrorTemplate(context)); } if (debugParts == null) { debugParts = _splitTemplate(_getDebugTemplate(context)); } }
public HtmlResponseStateManager() { _stateCacheFactory = new StateCacheFactoryImpl(); }
private static void _prepareExceptionStack(Throwable ex) { if (ex == null) return; // check for getRootCause and getCause-methods if (!_initCausePerReflection(ex, "getRootCause")) { _initCausePerReflection(ex, "getCause"); } _prepareExceptionStack(ex.getCause()); }
/** * Generates the HTML error page for the given Throwable * and writes it to the given writer. * @param writer * @param faces * @param e * @throws IOException */ public static void debugHtml(Writer writer, FacesContext faces, Throwable e) throws IOException { debugHtml(writer, faces, faces.getViewRoot(), null, e); }
private static void _incrementVisitedFacetCount(UIComponent component) { visitedFacetCount.put(component, _getVisitedFacetCount(component) + 1); }
public Object get(Integer sequence, String viewId) { Object key = new SerializedViewKey(viewId, sequence); Object value = _serializedViews.get(key); if (value == null) { Map<Object,Object> oldSerializedViewMap = getOldSerializedViewsMap(); if (oldSerializedViewMap != null) { value = oldSerializedViewMap.get(key); } } return value; } }
@Override public Object restoreSerializedView(FacesContext facesContext, String viewId, Object viewState) { if (log.isLoggable(Level.FINEST)) log.finest("Restoring view from session"); Integer serverStateId = getServerStateId((Object[]) viewState); return (serverStateId == null) ? null : getSerializedViewFromServletSession(facesContext, viewId, serverStateId); }
@Override public Object saveSerializedView(FacesContext facesContext, Object serializedView) { if (log.isLoggable(Level.FINEST)) log.finest("Processing saveSerializedView - server-side state saving - save state"); //save state in server session saveSerializedViewInServletSession(facesContext, serializedView); if (log.isLoggable(Level.FINEST)) log.finest("Exiting saveSerializedView - server-side state saving - saved state"); return encodeSerializedState(facesContext, serializedView); }
public Object encodeSerializedState(FacesContext facesContext, Object serializedView) { Object[] identifier = new Object[2]; identifier[JSF_SEQUENCE_INDEX] = Integer.toString(getNextViewSequence(facesContext), Character.MAX_RADIX); return identifier; }
private static void _init(FacesContext context) throws IOException { if (ERROR_PARTS == null) { ERROR_PARTS = _splitTemplate(_getErrorTemplate(context)); } if (DEBUG_PARTS == null) { DEBUG_PARTS = _splitTemplate(_getDebugTemplate(context)); } }
private static void _prepareExceptionStack(Throwable ex) { if (ex == null) return; // check for getRootCause and getCause-methods if (!_initCausePerReflection(ex, "getRootCause")) { _initCausePerReflection(ex, "getCause"); } _prepareExceptionStack(ex.getCause()); }
/** * Generates the HTML error page for the given Throwable * and writes it to the given writer. * @param writer * @param faces * @param e * @throws IOException */ public static void debugHtml(Writer writer, FacesContext faces, Throwable e) throws IOException { debugHtml(writer, faces, e, faces.getViewRoot()); }
private static void _incrementVisitedFacetCount(UIComponent component) { visitedFacetCount.put(component, _getVisitedFacetCount(component) + 1); }
private static void _init(FacesContext context) throws IOException { if (ERROR_PARTS == null) { ERROR_PARTS = _splitTemplate(_getErrorTemplate(context)); } if (DEBUG_PARTS == null) { DEBUG_PARTS = _splitTemplate(_getDebugTemplate(context)); } }
private static void _prepareExceptionStack(Throwable ex) { if (ex == null) { return; } // check for getRootCause and getCause-methods if (!_initCausePerReflection(ex, "getRootCause")) { _initCausePerReflection(ex, "getCause"); } _prepareExceptionStack(ex.getCause()); }
/** * Generates the HTML error page for the given Throwable * and writes it to the given writer. * @param writer * @param faces * @param e * @throws IOException */ public static void debugHtml(Writer writer, FacesContext faces, Throwable e) throws IOException { debugHtml(writer, faces, e, faces.getViewRoot()); }