Java Doc for VelocityToolboxView.java in  » J2EE » spring-framework-2.0.6 » org » springframework » web » servlet » view » velocity » Java Source Code / Java DocumentationJava Source Code and Java Documentation

Java Source Code / Java Documentation
1. 6.0 JDK Core
2. 6.0 JDK Modules
3. 6.0 JDK Modules com.sun
4. 6.0 JDK Modules com.sun.java
5. 6.0 JDK Modules sun
6. 6.0 JDK Platform
7. Ajax
8. Apache Harmony Java SE
9. Aspect oriented
10. Authentication Authorization
11. Blogger System
12. Build
13. Byte Code
14. Cache
15. Chart
16. Chat
17. Code Analyzer
18. Collaboration
19. Content Management System
20. Database Client
21. Database DBMS
22. Database JDBC Connection Pool
23. Database ORM
24. Development
25. EJB Server geronimo
26. EJB Server GlassFish
27. EJB Server JBoss 4.2.1
28. EJB Server resin 3.1.5
29. ERP CRM Financial
30. ESB
31. Forum
32. GIS
33. Graphic Library
34. Groupware
35. HTML Parser
36. IDE
37. IDE Eclipse
38. IDE Netbeans
39. Installer
40. Internationalization Localization
41. Inversion of Control
42. Issue Tracking
43. J2EE
44. JBoss
45. JMS
46. JMX
47. Library
48. Mail Clients
49. Net
50. Parser
51. PDF
52. Portal
53. Profiler
54. Project Management
55. Report
56. RSS RDF
57. Rule Engine
58. Science
59. Scripting
60. Search Engine
61. Security
62. Sevlet Container
63. Source Control
64. Swing Library
65. Template Engine
66. Test Coverage
67. Testing
68. UML
69. Web Crawler
70. Web Framework
71. Web Mail
72. Web Server
73. Web Services
74. Web Services apache cxf 2.0.1
75. Web Services AXIS2
76. Wiki Engine
77. Workflow Engines
78. XML
79. XML UI
Java
Java Tutorial
Java Open Source
Jar File Download
Java Articles
Java Products
Java by API
Photoshop Tutorials
Maya Tutorials
Flash Tutorials
3ds-Max Tutorials
Illustrator Tutorials
GIMP Tutorials
C# / C Sharp
C# / CSharp Tutorial
C# / CSharp Open Source
ASP.Net
ASP.NET Tutorial
JavaScript DHTML
JavaScript Tutorial
JavaScript Reference
HTML / CSS
HTML CSS Reference
C / ANSI-C
C Tutorial
C++
C++ Tutorial
Ruby
PHP
Python
Python Tutorial
Python Open Source
SQL Server / T-SQL
SQL Server / T-SQL Tutorial
Oracle PL / SQL
Oracle PL/SQL Tutorial
PostgreSQL
SQL / MySQL
MySQL Tutorial
VB.Net
VB.Net Tutorial
Flash / Flex / ActionScript
VBA / Excel / Access / Word
XML
XML Tutorial
Microsoft Office PowerPoint 2007 Tutorial
Microsoft Office Excel 2007 Tutorial
Microsoft Office Word 2007 Tutorial
Java Source Code / Java Documentation » J2EE » spring framework 2.0.6 » org.springframework.web.servlet.view.velocity 
Source Cross Reference  Class Diagram Java Document (Java Doc) 


org.springframework.web.servlet.view.velocity.VelocityView
   org.springframework.web.servlet.view.velocity.VelocityToolboxView

All known Subclasses:   org.springframework.web.servlet.view.velocity.VelocityLayoutView,
VelocityToolboxView
public class VelocityToolboxView extends VelocityView (Code)
VelocityView subclass which adds support for Velocity Tools toolboxes and Velocity Tools ViewTool callbacks / Velocity Tools 1.3 init methods.

Specify a "toolboxConfigLocation", for example "/WEB-INF/toolbox.xml", to automatically load a Velocity Tools toolbox definition file and expose all defined tools in the specified scopes. If no config location is specified, no toolbox will be loaded and exposed.

This view will always create a special Velocity context, namely an instance of the ChainedContext class which is part of the view package of Velocity tools. This allows to use tools from the view package of Velocity Tools, like LinkTool, which need to be initialized with a special context that implements the ViewContext interface (i.e. a ChainedContext).

This view also checks tools that are specified as "toolAttributes": If they implement the ViewTool interface, they will get initialized with the Velocity context. This allows tools from the view package of Velocity Tools, such as LinkTool, to be defined as VelocityToolboxView.setToolAttributes "toolAttributes" on a VelocityToolboxView, instead of in a separate toolbox XML file.

This is a separate class mainly to avoid a required dependency on the view package of Velocity Tools in VelocityView itself. As of Spring 2.0, this class requires Velocity Tools 1.2 or higher.
author:
   Juergen Hoeller
since:
   1.1.3
See Also:   VelocityToolboxView.setToolboxConfigLocation
See Also:   VelocityToolboxView.initTool
See Also:   org.apache.velocity.tools.view.context.ViewContext
See Also:   org.apache.velocity.tools.view.context.ChainedContext
See Also:   org.apache.velocity.tools.view.tools.ViewTool
See Also:   org.apache.velocity.tools.view.tools.LinkTool





Method Summary
protected  ContextcreateVelocityContext(Map model, HttpServletRequest request, HttpServletResponse response)
     Overridden to create a ChainedContext, which is part of the view package of Velocity Tools, as special context.
protected  StringgetToolboxConfigLocation()
     Return the Velocity Toolbox config location, if any.
protected  voidinitTool(Object tool, Context velocityContext)
     Overridden to check for the ViewContext interface which is part of the view package of Velocity Tools.
public  voidsetToolboxConfigLocation(String toolboxConfigLocation)
     Set a Velocity Toolbox config location, for example "/WEB-INF/toolbox.xml", to automatically load a Velocity Tools toolbox definition file and expose all defined tools in the specified scopes.



Method Detail
createVelocityContext
protected Context createVelocityContext(Map model, HttpServletRequest request, HttpServletResponse response) throws Exception(Code)
Overridden to create a ChainedContext, which is part of the view package of Velocity Tools, as special context. ChainedContext is needed for initialization of ViewTool instances.
See Also:   VelocityToolboxView.initTool



getToolboxConfigLocation
protected String getToolboxConfigLocation()(Code)
Return the Velocity Toolbox config location, if any.



initTool
protected void initTool(Object tool, Context velocityContext) throws Exception(Code)
Overridden to check for the ViewContext interface which is part of the view package of Velocity Tools. This requires a special Velocity context, like ChainedContext as set up by VelocityToolboxView.createVelocityContext in this class.
See Also:   org.apache.velocity.tools.view.tools.ViewTool.init(Object)
See Also:   org.apache.velocity.tools.view.tools.LinkTool.init(Object)



setToolboxConfigLocation
public void setToolboxConfigLocation(String toolboxConfigLocation)(Code)
Set a Velocity Toolbox config location, for example "/WEB-INF/toolbox.xml", to automatically load a Velocity Tools toolbox definition file and expose all defined tools in the specified scopes. If no config location is specified, no toolbox will be loaded and exposed.

The specfied location string needs to refer to a ServletContext resource, as expected by ServletToolboxManager which is part of the view package of Velocity Tools.
See Also:   org.apache.velocity.tools.view.servlet.ServletToolboxManager.getInstance




Methods inherited from org.springframework.web.servlet.view.velocity.VelocityView
protected VelocityEngine autodetectVelocityEngine() throws BeansException(Code)(Java Doc)
protected void checkTemplate() throws ApplicationContextException(Code)(Java Doc)
protected Context createVelocityContext(Map model, HttpServletRequest request, HttpServletResponse response) throws Exception(Code)(Java Doc)
protected Context createVelocityContext(Map model) throws Exception(Code)(Java Doc)
protected void doRender(Context context, HttpServletResponse response) throws Exception(Code)(Java Doc)
protected void exposeHelpers(Map model, HttpServletRequest request) throws Exception(Code)(Java Doc)
protected void exposeHelpers(Context velocityContext, HttpServletRequest request, HttpServletResponse response) throws Exception(Code)(Java Doc)
protected void exposeHelpers(Context velocityContext, HttpServletRequest request) throws Exception(Code)(Java Doc)
protected void exposeToolAttributes(Context velocityContext, HttpServletRequest request) throws Exception(Code)(Java Doc)
protected String getEncoding()(Code)(Java Doc)
protected Template getTemplate() throws Exception(Code)(Java Doc)
protected Template getTemplate(String name) throws Exception(Code)(Java Doc)
protected VelocityEngine getVelocityEngine()(Code)(Java Doc)
protected void initApplicationContext() throws BeansException(Code)(Java Doc)
protected void initTool(Object tool, Context velocityContext) throws Exception(Code)(Java Doc)
protected boolean isCacheTemplate()(Code)(Java Doc)
protected void mergeTemplate(Template template, Context context, HttpServletResponse response) throws Exception(Code)(Java Doc)
protected void renderMergedTemplateModel(Map model, HttpServletRequest request, HttpServletResponse response) throws Exception(Code)(Java Doc)
public void setCacheTemplate(boolean cacheTemplate)(Code)(Java Doc)
public void setDateToolAttribute(String dateToolAttribute)(Code)(Java Doc)
public void setEncoding(String encoding)(Code)(Java Doc)
public void setNumberToolAttribute(String numberToolAttribute)(Code)(Java Doc)
public void setToolAttributes(Properties toolAttributes)(Code)(Java Doc)
public void setVelocityEngine(VelocityEngine velocityEngine)(Code)(Java Doc)
public void setVelocityFormatterAttribute(String velocityFormatterAttribute)(Code)(Java Doc)

www.java2java.com | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.