« Return to Thread: RE: signatures help

Re: signatures help

by tyju tiui :: Rate this Message:

Reply to Author | View in Thread

I also tried passing a hash object instead of an array and DWR is  passing the value in as a String instead of a Map.
Is it simply not possible to fill a remote object with other remote objects with version 2.0.3 of DWR?

----- Original Message ----
From: tyju tiui <jckdnk111@...>
To: users@...
Sent: Wednesday, April 23, 2008 1:19:46 PM
Subject: [dwr-user] signatures help

Hi,

I'm having trouble sending a remote array of strings to a DWR-exposed method which expects a Map.

js:
var params = { 'myArr':["a", "b", "c"] };

java:
public class ParamActions{
    public static boolean storeParams(Map params){
        if(params.get("myArr").getClass().getClass().equals(Class.forName("[Ljava.lang.String;"))){
            return true
        }else{
            return false;
        }
    }
}

When invoked by DWR, the java code always evaluates to false since the Object returned by params.get("myArr") is a String and not a String[].
I found the following bug report describing a similar problem: http://getahead.org/bugs/browse/DWR-96
It says the problem has been fixed in version 3M2 ... is this stable enough to use?

Also, I see some warning in the DWR log talking about "Missing type info for storeParams(1<0>). Assuming this is a map with String keys. Please add to <signatures> in dwr.xml".

I added the following to my dwr.xml but I'm still getting the errors:

...
</allow>
  <signatures>
    <![CDATA[
        import java.util.Map;
        import test.dwr.ParamActions;
        ParamActions.storeParams(Map<String,[Ljava.lang.String;>);
    ]]>
  </signatures>
</dwr>

I'm hoping if I can get the signatures section setup correctly then maybe my String[] will start magically working.

Thanks,

Ty



      ____________________________________________________________________________________
Be a better friend, newshound, and
know-it-all with Yahoo! Mobile.  Try it now.  http://mobile.yahoo.com/;_ylt=Ahu06i62sR8HDtDypao8Wcj9tAcJ

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@...
For additional commands, e-mail: users-help@...


      ____________________________________________________________________________________
Be a better friend, newshound, and
know-it-all with Yahoo! Mobile.  Try it now.  http://mobile.yahoo.com/;_ylt=Ahu06i62sR8HDtDypao8Wcj9tAcJ

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@...
For additional commands, e-mail: users-help@...

 « Return to Thread: RE: signatures help