To use this class in your javascript you will need the following script includes:
<script type='text/javascript' src='/dwr/interface/DWRHelper.js'></script> <script type='text/javascript' src='/dwr/engine.js'></script>
In addition there is an optional utility script:
<script type='text/javascript' src='/dwr/util.js'></script>
Replies from DWR are shown with a yellow background if they are simple or in an alert box otherwise.
The inputs are evaluated as Javascript so strings must be quoted before execution.
There are 44 declared methods:
dwr.xml does not have an allow entry that enables conversion of this type to Javascript. The most common cause of this problem is that XXX is a java bean and bean marshalling has not been enabled. Bean marshalling is disabled by default for security reasons.
To enable marshalling for a given bean add the following line to the allow section of your dwr.xml file:
<convert converter="bean" match="XXX"/>
It is also possible to enable marshalling for an entire package or hierachy of packages using the following:
<convert converter="bean" match="package.name.*"/>
Javascript does not support overloaded methods, so the javascript file generated from this class will contain two methods the second of which will replace the first. This is probably not what you wanted.
It is best to avoid overloaded methods when using DWR.
Java 5 presents an interesting challenge for finding overloaded methods and an issue to be aware of when using generics. From Java 5 on, co-variant return types are allowed, but the Class.getMethods() function will return 2 methods, if you are making use of this feature, which can lead to false positives when detecting overloaded methods.
It will be obvious to you if you really do have overloaded methods, but it is worth being aware of this small limitation in DWR 1.1 with Java 5. Calling the method will work just fine, but this page may incorrectly report an overloaded method.