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-96It 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@...