dwr20.dtd: Elements - Entities - Source | Intro - Index
FRAMES / NO FRAMES
This is the DTD for DWR v2.x
| <dwr> | Root element |
Top level conviguration element.
Element's model:
<dwr>'s children Name Cardinality allow One or none init One or none signatures One or none
((init?), (allow?), (signatures?))
| <init> | Child of dwr |
A list of all the classes to configure as part of dwr at startup time.
Element's model:
<init>'s children Name Cardinality converter Any number creator Any number
| <creator/> | Child of init |
Define a new method of creating objects for use by Javascript. We don't just allow access to any object and some may need special code to get a reference to them.
<creator>'s attributes Name Values Default class id Match the ID rules.
This element is always empty.
| @id | Attribute of creator |
The unique name by which create elements refer to us.
Possible values: Match the ID rules. - Required
| @class | Attribute of creator |
The fully qualified name of a class that implements Creator.
Required
| <converter/> | Child of init |
Define a new way of converting between javascript objects and java objects. Many classes can have default conversion mechanisms but some require more custom conversion
<converter>'s attributes Name Values Default class id Match the ID rules.
This element is always empty.
| @id | Attribute of converter |
The unique name by which convert elements refer to us.
Possible values: Match the ID rules. - Required
| @class | Attribute of converter |
The fully qualified name of a class that implements Converter.
Required
| <allow> | Child of dwr |
Security: we must define which classes we are allowed to access because a free-for-all will be very dangerous.
Element's model:
<allow>'s children Name Cardinality convert Any number create Any number filter Any number
((create | convert | filter)*)
| <create> | Child of allow |
Allow the creation of a class, and give it a name in javascript land. A reference to a creator is required as are some parameters specific to each creator that define the objects it allows creation of. It would be nice to make the creator and IDREF rather than a CDATA, since it refers to an element defined elsewhere, however we allow multiple dwr.xml files and we might refer to one in another file.
Element's model:
<create>'s children Name Cardinality auth Any number exclude Any number filter Any number include Any number param Any number
<create>'s attributes Name Values Default creator javascript scope application, session, script, request, page
((param | include | exclude | auth | filter)*)
| @creator | Attribute of create |
The id of the creator to use
Required
| @javascript | Attribute of create |
The name of the object to export to the browser
Required
| @scope | Attribute of create |
The scope of the created variable. The default is page.
Possible values: application, session, script, request, page
| <filter> | Child of create, allow |
A filter is a way to insert procesing tasks at various points during the processing of an Ajax call. See org.directwebremoting.AjaxFilter
Element's model:
<filter>'s children Name Cardinality param Any number
<filter>'s attributes Name Values Default class
((param)*)
| @class | Attribute of filter |
The class name to use to filter requests
Required
| <param> | Child of create, convert, filter |
Some elements (currently only create although there is no hard reason why convert elements should not be the same) need customization in ways that we can't predict now, and this seems like the only way to do it.
<param>'s attributes Name Values Default name value
| @name | Attribute of param |
The name of the parameter to this creator
Required
| @value | Attribute of param |
The value to set to the names parameter
| <include/> | Child of create |
A creator can allow and disallow access to the methods of the class that it contains. A Creator should specify EITHER a list of include elements (which implies that the default policy is denial) OR a list of exclude elements (which implies that the default policy is to allow access)
<include>'s attributes Name Values Default method
This element is always empty.
| @method | Attribute of include |
The method to include
| <exclude/> | Child of create |
See the include element
<exclude>'s attributes Name Values Default method
This element is always empty.
| @method | Attribute of exclude |
The method to exclude
| <auth/> | Child of create |
The auth element allows you to specify that the user of a given method must be authenticated using J2EE security and authorized under a certain role.
<auth>'s attributes Name Values Default method role
This element is always empty.
| @method | Attribute of auth |
The method to add role requirements to
Required
| @role | Attribute of auth |
The role required to execute the given method
Required
| <convert> | Child of allow |
Allow conversion of a class between Java and Javascript. A convert element uses a previously defined converter and gives a class match pattern (which can end with *) to define the classes it allows conversion of It would be nice to make the converter and IDREF rather than a CDATA, since it refers to an element defined elsewhere, however we allow multiple dwr.xml files and we might refer to one in another file.
Element's model:
<convert>'s children Name Cardinality param Any number
<convert>'s attributes Name Values Default converter javascript match
((param)*)
| @converter | Attribute of convert |
The id of the converter to use
Required
| @match | Attribute of convert |
A class name to match for conversion
Required
| @javascript | Attribute of convert |
The optional classname for the parameter
| <signatures> | Child of dwr |
If we are marshalling to collections, we need to be able to specify extra type information to converters that are unable to tell from reflection what to do. This element contains some Java method definitions