Re: Webwork and DWR

"Alexandru Popescu" <[email protected]> Fri, 29 Dec 2006 11:21:18 +0200
Newsgroups gmane.comp.java.open-symphony.webwork
Message-ID <[email protected]>
On 12/29/06, James David <[email protected]> wrote:
> Hi Stefan -
>
> Looks like you are able to make this work with DWR 2.0 version. I downloaded the DWR and tried to follow the steps to integrate and running into a road block here.
>
> My jsp page code looks like this
>
> [code]
> <%@ page contentType="text/html" %>
> <%@ taglib prefix="ww" uri="/webwork" %>
>
> <html>
> <head>
> <title>My Page</title>
> <link rel='stylesheet' type='text/css' href='./stylesheet/stylesheet.css'/>
> <ww:head/>
> </head>
>
> <script src='dwr/engine.js'></script>
> <script src='dwr/util.js'></script>
> <script src='dwr/interface/DWRAction.js'></script>
> <script src='DWRActionUtil.js'></script>
>
> <script language="JavaScript" type="text/javascript">
>
>         function doValidate() {
>                 DWRActionUtil.execute({
>                                                 namespace:'default',
>                                                 action:'AddLink',
>                                                 method:'validateData',
>                                                 executeResult:'false'
>                                                 },'myform',done);
>         }
>
>         function done(data){
>                 alert('came here');
>     }
> </script>
>
> [/code]
>
> When i tried to submit the ajax action - i get a javascript error. The error is on line 83 in the DWRActionUtil.js...the line reads
>
> [code]
>  if (mustCall) {
>     [b]DWRAction.execute(actionObj, params, callbackObj);[/b]
>   }
> [/code]
>
> It complains there is no such property or method. If I look at the DWRAction.js file there is no such method "execute".
>
> The dwr.xml file does have the execute method permission
>
> [code]
> <create creator="none" javascript="DWRAction">
>                   <param name="class" value="org.directwebremoting.webwork.DWRAction"/>
>                   <include method="execute"/>
>                 </create>
> [/code]
>
> I'm wondering if this is a bug.
>
> If you have a working code - could you share the snippet. Trying to figure out where I'm wrong.

James, this is a wide guess for the moment, but last time I have
checked the code the internals of DWR were not exposed for remote
invocations and some sort of trick was needed to do so (DWRAction
lives inside DWR packages to which the access is denied by default).

./alex
--
.w( the_mindstorm )p.

> ---------------------------------------------------------------------
> Posted via Jive Forums
> http://forums.opensymphony.com/thread.jspa?threadID=45567&messageID=110964#110964
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [email protected]
> For additional commands, e-mail: [email protected]
>
>