I've done a project that integrated Struts and DWR.
I did not use the Struts creator, and don't really see a need to do so. The only thing the Struts creator does is give you access to your ActionForm bean. If something is in my ActionForm bean, I've already accessed it when I first displayed the page. When I make an AJAX call, I generally want things that are
not in my ActionForm bean.
As Uma suggests, I just use the "new" creator and provide a class that has a method I want to call.
Here's an example:
Then in your
JSP:
<script src='dwr/interface/WidgetDAO.js'></script>
<script src='dwr/engine.js'></script>
<script src='dwr/util.js'></script>
<script>
function doIt() {
WidgetDAO.getWidgets(....);
...
)
</script>
Note: There is no actual physical file dwr/interface/WidgetDAO.js. this is a virtual reference that is resolved at run-time, just as myAction.do is resolved at runtime. So, don't panic if you can't find this file. It will be there at run-time.
[ July 04, 2006: Message edited by: Merrill Higginson ]