dwr30.dtd: Elements - Entities - Source | Intro - Index
FRAMES / NO FRAMES

dwr30.dtd

This is the DTD for DWR v3.x



<dwr> Root element

Top level configuration element.

<dwr>'s children
NameCardinality
allowOne or none
initOne or none
signaturesOne or none
Element's model:

((init?), (allow?), (signatures?))


<init> Child of dwr

A list of all the classes to configure as part of dwr at startup time.

<init>'s children
NameCardinality
converterAny number
creatorAny number
Element's model:

((creator | converter)*)


<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
NameValuesDefault
class
idMatch 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
NameValuesDefault
class
idMatch 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.

<allow>'s children
NameCardinality
convertAny number
createAny number
filterAny number
Element's model:

((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.

<create>'s children
NameCardinality
authAny number
excludeAny number
filterAny number
includeAny number
paramAny number
<create>'s attributes
NameValuesDefault
creator
javascript
scopeapplication, session, script, request, page
Element's model:

((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


@scope Attribute of create

The scope of the created variable. The default is page.

Possible values: application, session, script, request, page


<filter> Child of allow, create

A filter is a way to insert processing tasks at various points during the processing of an Ajax call. See org.directwebremoting.AjaxFilter

<filter>'s children
NameCardinality
paramAny number
<filter>'s attributes
NameValuesDefault
class
Element's model:

((param)*)


@class Attribute of filter

The class name to use to filter requests

Required


<param> Child of filter, convert, create

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
NameValuesDefault
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
NameValuesDefault
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
NameValuesDefault
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
NameValuesDefault
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.

<convert>'s children
NameCardinality
paramAny number
<convert>'s attributes
NameValuesDefault
converter
javascript
match
Element's model:

((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