org.springframework.extensions.surf.render
Class PresentationUtil

java.lang.Object
  extended by org.springframework.extensions.surf.render.PresentationUtil

public class PresentationUtil
extends Object

This class basically delegates through to the RenderUtil functions but provides for a 'pretty' user experience. Exceptions that trickle back are trapped and presented nicely to the end user. The exceptions are also logged so that administrators can track down the issues at hand.

Author:
muzquiano

Field Summary
static String CONTEXT_VALUE_ERROR_COMPONENT_ID
           
static String CONTEXT_VALUE_ERROR_PAGE_ID
           
static String CONTEXT_VALUE_ERROR_REGION_ID
           
static String CONTEXT_VALUE_ERROR_REGION_SCOPE_ID
           
static String CONTEXT_VALUE_ERROR_REGION_SOURCE_ID
           
static String CONTEXT_VALUE_ERROR_TEMPLATE_ID
           
static String CONTEXT_VALUE_ERROR_THROWABLE
           
 
Constructor Summary
PresentationUtil()
           
 
Method Summary
protected static void handleComponentRenderProblem(RenderContext context, Throwable t, String componentId)
           
protected static void handlePageRenderProblem(RenderContext context, Throwable t, String pageId)
           
protected static void handleRegionRenderProblem(RenderContext context, Throwable t, String templateId, String regionId, String regionScopeId)
           
protected static void handleTemplateRenderProblem(RenderContext context, Throwable t, String templateId)
           
static void renderChromelessComponent(RenderContext context, RenderFocus renderFocus, String componentId)
           
static void renderChromelessRegion(RenderContext context, RenderFocus renderFocus, String templateId, String regionId, String regionScopeId)
           
static void renderComponent(RenderContext context, RenderFocus renderFocus, String componentId)
           
static void renderComponent(RenderContext context, RenderFocus renderFocus, String componentId, String chromeId)
           
static void renderContent(RenderContext context)
          Renders the current content object using the BODY focus
static void renderContent(RenderContext context, RenderFocus renderFocus)
          Renders the current content object using its associated presentation template in the given focus.
static void renderJspPage(RenderContext context, String dispatchPath)
          Renders a JSP page
static void renderPage(RenderContext context)
          Renders the current page using the BODY focus
static void renderPage(RenderContext context, RenderFocus renderFocus)
          Renders the current page using the BODY focus
static void renderRegion(RenderContext context, RenderFocus renderFocus, String templateId, String regionId, String regionScopeId)
           
static void renderRegion(RenderContext context, RenderFocus renderFocus, String templateId, String regionId, String regionScopeId, String overrideChromeId)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

CONTEXT_VALUE_ERROR_COMPONENT_ID

public static final String CONTEXT_VALUE_ERROR_COMPONENT_ID
See Also:
Constant Field Values

CONTEXT_VALUE_ERROR_REGION_SOURCE_ID

public static final String CONTEXT_VALUE_ERROR_REGION_SOURCE_ID
See Also:
Constant Field Values

CONTEXT_VALUE_ERROR_REGION_SCOPE_ID

public static final String CONTEXT_VALUE_ERROR_REGION_SCOPE_ID
See Also:
Constant Field Values

CONTEXT_VALUE_ERROR_REGION_ID

public static final String CONTEXT_VALUE_ERROR_REGION_ID
See Also:
Constant Field Values

CONTEXT_VALUE_ERROR_TEMPLATE_ID

public static final String CONTEXT_VALUE_ERROR_TEMPLATE_ID
See Also:
Constant Field Values

CONTEXT_VALUE_ERROR_PAGE_ID

public static final String CONTEXT_VALUE_ERROR_PAGE_ID
See Also:
Constant Field Values

CONTEXT_VALUE_ERROR_THROWABLE

public static final String CONTEXT_VALUE_ERROR_THROWABLE
See Also:
Constant Field Values
Constructor Detail

PresentationUtil

public PresentationUtil()
Method Detail

renderJspPage

public static void renderJspPage(RenderContext context,
                                 String dispatchPath)
                          throws RequestDispatchException
Renders a JSP page

Parameters:
context -
dispatchPath -
Throws:
RequestDispatchException

renderPage

public static void renderPage(RenderContext context)
                       throws RequestDispatchException
Renders the current page using the BODY focus

Parameters:
context -
Throws:
RequestDispatchException

renderPage

public static void renderPage(RenderContext context,
                              RenderFocus renderFocus)
                       throws RequestDispatchException
Renders the current page using the BODY focus

Parameters:
context -
renderFocus -
Throws:
RequestDispatchException

renderChromelessRegion

public static void renderChromelessRegion(RenderContext context,
                                          RenderFocus renderFocus,
                                          String templateId,
                                          String regionId,
                                          String regionScopeId)
                                   throws RequestDispatchException
Throws:
RequestDispatchException

renderRegion

public static void renderRegion(RenderContext context,
                                RenderFocus renderFocus,
                                String templateId,
                                String regionId,
                                String regionScopeId)
                         throws RequestDispatchException
Throws:
RequestDispatchException

renderRegion

public static void renderRegion(RenderContext context,
                                RenderFocus renderFocus,
                                String templateId,
                                String regionId,
                                String regionScopeId,
                                String overrideChromeId)
                         throws RequestDispatchException
Throws:
RequestDispatchException

renderChromelessComponent

public static void renderChromelessComponent(RenderContext context,
                                             RenderFocus renderFocus,
                                             String componentId)
                                      throws RequestDispatchException
Throws:
RequestDispatchException

renderComponent

public static void renderComponent(RenderContext context,
                                   RenderFocus renderFocus,
                                   String componentId)
                            throws RequestDispatchException
Throws:
RequestDispatchException

renderComponent

public static void renderComponent(RenderContext context,
                                   RenderFocus renderFocus,
                                   String componentId,
                                   String chromeId)
                            throws RequestDispatchException
Throws:
RequestDispatchException

renderContent

public static void renderContent(RenderContext context)
                          throws RequestDispatchException
Renders the current content object using the BODY focus

Parameters:
context -
Throws:
RequestDispatchException

renderContent

public static void renderContent(RenderContext context,
                                 RenderFocus renderFocus)
                          throws RequestDispatchException
Renders the current content object using its associated presentation template in the given focus.

Parameters:
context -
renderFocus -
Throws:
RequestDispatchException

handlePageRenderProblem

protected static void handlePageRenderProblem(RenderContext context,
                                              Throwable t,
                                              String pageId)
                                       throws RequestDispatchException
Throws:
RequestDispatchException

handleTemplateRenderProblem

protected static void handleTemplateRenderProblem(RenderContext context,
                                                  Throwable t,
                                                  String templateId)
                                           throws RequestDispatchException
Throws:
RequestDispatchException

handleRegionRenderProblem

protected static void handleRegionRenderProblem(RenderContext context,
                                                Throwable t,
                                                String templateId,
                                                String regionId,
                                                String regionScopeId)
                                         throws RequestDispatchException
Throws:
RequestDispatchException

handleComponentRenderProblem

protected static void handleComponentRenderProblem(RenderContext context,
                                                   Throwable t,
                                                   String componentId)
                                            throws RequestDispatchException
Throws:
RequestDispatchException


Copyright © 2009 SpringSource, Inc. All Rights Reserved.