You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by boraldo <bo...@hotbox.ru> on 2009/04/02 11:52:59 UTC
How to make json plugin see SMD methods ?
I use Struts 2 with json-plugin 0.33
I have the following in my js:
dojo.require("dojo.rpc.*");
var service = new dojo.rpc.JsonService("${url}");
var defered = service.go();
defered.addCallback(callback);
go is method in my action that corresponds to ${url} and annotated as
@SMDMethod.
But this leads to js error:
service.go is not a function
What should I do ?
--
View this message in context: http://www.nabble.com/How-to-make-json-plugin-see-SMD-methods---tp22844426p22844426.html
Sent from the Struts - User mailing list archive at Nabble.com.
Re: How to make json plugin see SMD methods ?
Posted by Rafael Taboada <ka...@gmail.com>.
What did you put in your xml config?
JSONPlugin 0.32 works with struts2.0.x
JSONPlugin 0.33 works with struts2.1.x
--
Rafael Taboada
Software Engineer
Cell : +511-992741026
"No creo en el destino pues no me gusta tener la idea de controlar mi vida"
Re: How to make json plugin see SMD methods ?
Posted by Musachy Barroso <mu...@gmail.com>.
use firebug to see if dojo is making a request to "url" to retrieve
the method signature.
musachy
On Thu, Apr 2, 2009 at 5:52 AM, boraldo <bo...@hotbox.ru> wrote:
>
> I use Struts 2 with json-plugin 0.33
>
> I have the following in my js:
>
> dojo.require("dojo.rpc.*");
> var service = new dojo.rpc.JsonService("${url}");
> var defered = service.go();
> defered.addCallback(callback);
>
>
> go is method in my action that corresponds to ${url} and annotated as
> @SMDMethod.
>
> But this leads to js error:
>
> service.go is not a function
>
>
> What should I do ?
> --
> View this message in context: http://www.nabble.com/How-to-make-json-plugin-see-SMD-methods---tp22844426p22844426.html
> Sent from the Struts - User mailing list archive at Nabble.com.
>
--
"Hey you! Would you help me to carry the stone?" Pink Floyd
---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org