Java Doc for DwrController.java in  » Ajax » dwr » org » directwebremoting » spring » 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 » Ajax » dwr » org.directwebremoting.spring 
Source Cross Reference  Class Diagram Java Document (Java Doc) 


org.directwebremoting.spring.DwrController

DwrController
public class DwrController extends AbstractController implements BeanNameAware,InitializingBean,BeanFactoryAware(Code)
A Spring Controller that handles DWR requests.
Using this controller allows you to configure DWR entirely in Spring. You do not have to create a separate dwr.xml configuration file when using this controller.

The following configuration provides a basic example of how too define this controller as a bean in your application context.

 <bean id="dwrController" class="org.directwebremoting.spring.DwrController">
 <property name="configurators">
 <list>
 <ref bean="dwrConfiguration"/>
 </list>
 </property>
 <property name="debug" value="true"/>
 </bean>
 <bean id="dwrConfiguration" class="org.directwebremoting.spring.SpringConfigurator">
 <property name="creators">
 <map>
 <entry key="beanName">
 <bean class="org.directwebremoting.spring.CreatorConfig">
 <property name="creator">
 <bean class="org.directwebremoting.spring.BeanCreator">
 <property name="bean" ref="BeanName"/>
 </bean>
 </property>
 </bean>
 </entry>
 </map>
 </property>
 </bean>
 <-- the bean you want to remote using DWR -->
 <bean id="beanName" class="BeanName"/>
 
In the near future we want to provide a DWR namespace for Spring, which should allow you to something like the following:
 <dwr:configuration>
 <debug/>
 </dwr:configuration>
 <-- the bean you want to remote using DWR -->
 <bean id="beanName" class="BeanName">
 <dwr:remote javascript="beanName"/>
 </bean>
 
Which should be equivalent to the previous example. Please note that this is still work in progress and is therefore subject to change.


author:
   Joe Walker [joe at getahead dot ltd dot uk]
author:
   Bram Smeets


Field Summary
protected  WebContextBuilderwebContextBuilder
    


Method Summary
public  voidafterPropertiesSet()
     Is called by the Spring container after all properties have been set.
protected  ModelAndViewhandleRequestInternal(HttpServletRequest request, HttpServletResponse response)
     Handles all request to this controller.
public  voidsetBeanFactory(BeanFactory beanFactory)
     Is called by the Spring container to set the bean factory.
public  voidsetBeanName(String name)
     Is called by the Spring container to set the name of this bean.
public  voidsetConfigParams(Map<String, String> configParams)
     Additional parameters such as pollAndCometEnabled.
public  voidsetConfigurators(List<Configurator> configurators)
     Sets the configurators to apply to this controller.
public  voidsetDebug(boolean debug)
     Sets whether DWR should be in debug mode (default is false).
public  voidsetIncludeDefaultConfig(boolean includeDefaultConfig)
     Sets whether the default DWR configuration should be included (default is true).

Field Detail
webContextBuilder
protected WebContextBuilder webContextBuilder(Code)
The builder for the WebContext that keeps http objects local to a thread
See Also:   org.directwebremoting.WebContext





Method Detail
afterPropertiesSet
public void afterPropertiesSet() throws Exception(Code)
Is called by the Spring container after all properties have been set.
This method actually makes sure the container is correctly initialized and all configurators are processed.
throws:
  Exception - in case setting up fails
See Also:   org.springframework.beans.factory.InitializingBean.afterPropertiesSet



handleRequestInternal
protected ModelAndView handleRequestInternal(HttpServletRequest request, HttpServletResponse response) throws Exception(Code)
Handles all request to this controller.
It delegates to the UrlProcessor and also takes case of setting and unsetting of the current WebContext.
Parameters:
  request - the request to handle
Parameters:
  response - the response to handle
throws:
  Exception - in case handling of the request fails unexpectedly
See Also:   org.directwebremoting.WebContext



setBeanFactory
public void setBeanFactory(BeanFactory beanFactory) throws BeansException(Code)
Is called by the Spring container to set the bean factory.
This bean factory is then used to obtain the global DWR configuration from. This global configuration is optional as DWR will provide defaults where possible.
See Also:   org.springframework.beans.factory.BeanFactoryAware.setBeanFactory(org.springframework.beans.factory.BeanFactory)



setBeanName
public void setBeanName(String name)(Code)
Is called by the Spring container to set the name of this bean.
Parameters:
  name - the name of this bean in the Spring container
See Also:   BeanNameAware.setBeanName(String)



setConfigParams
public void setConfigParams(Map<String, String> configParams)(Code)
Additional parameters such as pollAndCometEnabled. For a full list see: http://getahead.org/dwr/server/servlet
Parameters:
  configParams - the configParams to set



setConfigurators
public void setConfigurators(List<Configurator> configurators)(Code)
Sets the configurators to apply to this controller.
The configurators are used to set up DWR correctly.
Parameters:
  configurators - the configurators to apply to this controller



setDebug
public void setDebug(boolean debug)(Code)
Sets whether DWR should be in debug mode (default is false).
This allows access to the debug pages provided by DWR under /[WEBAPP]/dwr/. NOTE: make sure to not set this property to true in a production environment.
Parameters:
  debug - the indication of whether to start DWR in debug mode



setIncludeDefaultConfig
public void setIncludeDefaultConfig(boolean includeDefaultConfig)(Code)
Sets whether the default DWR configuration should be included (default is true).
This default configuration contains all build-in creators and converters. You normally want this default configuration to be included.
Parameters:
  includeDefaultConfig - the indication of whether to include the default configuration



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