org.springframework.extensions.surf.render.bean
Class WebStudioTemplateInstanceRenderer

java.lang.Object
  extended by org.springframework.extensions.surf.render.AbstractRenderer
      extended by org.springframework.extensions.surf.render.bean.TemplateInstanceRenderer
          extended by org.springframework.extensions.surf.render.bean.WebStudioTemplateInstanceRenderer
All Implemented Interfaces:
EventListener, org.springframework.context.ApplicationContextAware, org.springframework.context.ApplicationListener, Renderer

public class WebStudioTemplateInstanceRenderer
extends TemplateInstanceRenderer
implements org.springframework.context.ApplicationContextAware

Modifies the way that components are rendered when Surf is running in preview mode. This allows Web Studio to pull "pulled in" to any Surf Preview application. Primarily, this enables the regions to output additional Web Studio specific JavaScript to bind client-side DOM elements together.

Author:
muzquiano

Field Summary
 
Fields inherited from class org.springframework.extensions.surf.render.AbstractRenderer
logger, processor
 
Constructor Summary
WebStudioTemplateInstanceRenderer()
           
 
Method Summary
protected  WebStudioConfigElement getWebStudioConfiguration()
          Gets the web studio configuration.
protected  WebStudioService getWebStudioService()
          Gets the web studio service.
protected  void include(RenderContext context, String path, boolean doSubstitutions)
           
protected  String nullStringCheck(String str)
           
 void postHeaderProcess(RenderContext context)
           
protected  void printApplicationConfig(RenderContext context)
           
 void setApplicationContext(org.springframework.context.ApplicationContext applicationContext)
           
 void setWebStudioService(WebStudioService webStudioService)
          Sets the web studio service.
 
Methods inherited from class org.springframework.extensions.surf.render.bean.TemplateInstanceRenderer
body, header
 
Methods inherited from class org.springframework.extensions.surf.render.AbstractRenderer
all, footer, getApplicationContext, getProcessor, getRenderService, getServiceRegistry, init, onApplicationEvent, print, print, render, setProcessor
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

WebStudioTemplateInstanceRenderer

public WebStudioTemplateInstanceRenderer()
Method Detail

setApplicationContext

public void setApplicationContext(org.springframework.context.ApplicationContext applicationContext)
Specified by:
setApplicationContext in interface org.springframework.context.ApplicationContextAware
Overrides:
setApplicationContext in class AbstractRenderer

setWebStudioService

public void setWebStudioService(WebStudioService webStudioService)
Sets the web studio service.

Parameters:
webStudioService - the new web studio service

getWebStudioService

protected WebStudioService getWebStudioService()
Gets the web studio service.

Returns:
the web studio service

getWebStudioConfiguration

protected WebStudioConfigElement getWebStudioConfiguration()
Gets the web studio configuration.

Returns:
the web studio configuration

postHeaderProcess

public void postHeaderProcess(RenderContext context)
                       throws RendererExecutionException
Overrides:
postHeaderProcess in class TemplateInstanceRenderer
Throws:
RendererExecutionException

nullStringCheck

protected String nullStringCheck(String str)

include

protected void include(RenderContext context,
                       String path,
                       boolean doSubstitutions)
                throws RendererExecutionException
Throws:
RendererExecutionException

printApplicationConfig

protected void printApplicationConfig(RenderContext context)
                               throws org.json.JSONException,
                                      RendererExecutionException
Throws:
org.json.JSONException
RendererExecutionException


Copyright © 2009 SpringSource, Inc. All Rights Reserved.