|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.springframework.extensions.surf.render.RenderUtil
public final class RenderUtil
Static utility methods utilized during the rendering process. These are grouped here for convenience by developers who wish to build custom renderer implementations.
| Constructor Summary | |
|---|---|
RenderUtil()
|
|
| Method Summary | |
|---|---|
static String |
generateComponentId(String scopeId,
String regionId,
String sourceId)
Generates the deterministic component id from its key properties |
static Object |
getComponentBindingSourceObject(RequestContext context,
Component component)
Returns the object to which this component is bound This is the same as calling component.getSourceObject() |
static RenderContext |
getContext(javax.servlet.http.HttpServletRequest request)
Attempts to retrieve the render context instance bound to the given http servlet request |
static String |
getSourceId(RequestContext context,
String scopeId)
Return the "source" ID for the given scope ID for the supplied context. |
static void |
object(RequestContext context,
javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response,
String objectId,
String formatId)
/** Renders the fully formed URL string for a link to a given content object |
static void |
page(RequestContext context,
javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response,
String pageId,
String formatId,
String objectId)
Renders the fully formed URL string for a link to a given page |
static void |
pageType(RequestContext context,
javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response,
String pageTypeId,
String formatId,
String objectId)
Renders the fully formed URL string for a link to a given page type |
static String |
renderLinkImport(javax.servlet.http.HttpServletRequest request,
String href)
Renders an HTML stylesheet tag. |
static String |
renderLinkImport(javax.servlet.http.HttpServletRequest request,
String href,
String id,
boolean includeQueryString)
Renders an HTML stylesheet tag and optionally appends the incoming query string to the URL. |
static String |
renderLinkImport(RequestContext context,
String href)
Renders an HTML stylesheet tag. |
static String |
renderLinkImport(RequestContext context,
String href,
String id)
Renders an HTML stylesheet tag. |
static String |
renderScriptImport(javax.servlet.http.HttpServletRequest request,
String src)
Renders an HTML tag to the output stream |
static String |
renderScriptImport(javax.servlet.http.HttpServletRequest request,
String src,
boolean includeQueryString)
Renders an HTML tag to the output stream and optionally appends the incoming query string. |
static String |
renderScriptImport(RequestContext context,
String src)
Renders an HTML tag to the output stream |
static String |
validHtmlId(String id)
Helper to ensure only valid and acceptable characters are output as HTML element IDs. |
static RenderContext |
wrapRenderContext(RenderContext renderContext)
Provides a wrapper around a given render context so that render engines can commit output to a buffer. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public RenderUtil()
| Method Detail |
|---|
public static void page(RequestContext context,
javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response,
String pageId,
String formatId,
String objectId)
context - request - response - objectId - formatId -
public static void object(RequestContext context,
javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response,
String objectId,
String formatId)
context - request - response - objectId - formatId -
public static void pageType(RequestContext context,
javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response,
String pageTypeId,
String formatId,
String objectId)
context - request - response - objectId - formatId -
public static String renderScriptImport(RequestContext context,
String src)
context - src -
public static String renderScriptImport(javax.servlet.http.HttpServletRequest request,
String src)
request - src -
public static String renderScriptImport(javax.servlet.http.HttpServletRequest request,
String src,
boolean includeQueryString)
request - src - includeQueryString -
public static String renderLinkImport(RequestContext context,
String href)
context - href -
public static String renderLinkImport(RequestContext context,
String href,
String id)
context - href - id -
public static String renderLinkImport(javax.servlet.http.HttpServletRequest request,
String href)
request - href -
public static String renderLinkImport(javax.servlet.http.HttpServletRequest request,
String href,
String id,
boolean includeQueryString)
request - href - id - includeQueryString -
public static String validHtmlId(String id)
id - the id
public static RenderContext getContext(javax.servlet.http.HttpServletRequest request)
request -
public static RenderContext wrapRenderContext(RenderContext renderContext)
renderContext -
public static String getSourceId(RequestContext context,
String scopeId)
context - Current RequestContextscopeId - WebFrameworkConstants
public static Object getComponentBindingSourceObject(RequestContext context,
Component component)
context - component -
public static String generateComponentId(String scopeId,
String regionId,
String sourceId)
scopeId - regionId - sourceId -
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||