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

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

public class WebStudioComponentRenderer
extends ComponentRenderer

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 components 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
applicationContext, logger, processor
 
Constructor Summary
WebStudioComponentRenderer()
           
 
Method Summary
 String getComponentTitle(RequestContext context, Component c)
           
 String getComponentTypeTitle(RequestContext context, Component c)
           
protected  WebStudioService getWebStudioService()
          Gets the web studio service.
 void postProcess(RenderContext context)
          Post-processing of components
 void setRegistry(DeclarativeRegistry registry)
          Sets the registry.
 void setWebStudioService(WebStudioService webStudioService)
          Sets the web studio service.
 
Methods inherited from class org.springframework.extensions.surf.render.bean.ComponentRenderer
body, header
 
Methods inherited from class org.springframework.extensions.surf.render.AbstractRenderer
all, footer, getApplicationContext, getProcessor, getRenderService, getServiceRegistry, init, onApplicationEvent, print, print, render, setApplicationContext, setProcessor
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

WebStudioComponentRenderer

public WebStudioComponentRenderer()
Method Detail

setWebStudioService

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

Parameters:
webStudioService - the new web studio service

setRegistry

public void setRegistry(DeclarativeRegistry registry)
Sets the registry.

Parameters:
registry - the new registry

getWebStudioService

protected WebStudioService getWebStudioService()
Gets the web studio service.

Returns:
the web studio service

postProcess

public void postProcess(RenderContext context)
                 throws IOException
Description copied from class: ComponentRenderer
Post-processing of components

Overrides:
postProcess in class ComponentRenderer
Throws:
IOException

getComponentTitle

public String getComponentTitle(RequestContext context,
                                Component c)

getComponentTypeTitle

public String getComponentTypeTitle(RequestContext context,
                                    Component c)


Copyright © 2009 SpringSource, Inc. All Rights Reserved.