Re: Struts2 with AngularJS

2014-11-21 Thread Peter Björkman
I'm in the exact same situation, but I'm having problems getting the Json interceptor to work - my config can't find the interceptor. Result type json works fine, so I thought it should be available. Could you give an example of your config so that I can check if I'm missing something obvious?

Re: Struts2 with AngularJS

2014-11-21 Thread foo bar
package name=... extends=struts-default namespace=/ strict-method-invocation=true result-types result-type name=json class=org.apache.struts2.json.JSONResult/ /result-types interceptors ... interceptor name=json class=org.apache.struts2.json.JSONInterceptor/ interceptor-stack name=...

Re: Struts2 with AngularJS

2014-11-20 Thread Lukasz Lenart
2014-11-19 11:20 GMT+01:00 foo bar linut...@gmail.com: Hi, Thanks for the prompt reply, I'll have a look at the Struts2 AngularJS archetype But I meant AngularJS interceptor ( https://docs.angularjs.org/api/ng/service/$http) which is still client side, AngularJS interceptor is meant to

Re: Struts2 with AngularJS

2014-11-20 Thread foo bar
Hi Lukasz, Yes indeed, JSON plugin is all I need, thanks ! In case anyone else experiencing the same issue, this is what I did In AngularJS CustomerService.save({customer:$scope.newCustomer}); You could also do $http.post('customer/add', {customer:$scope.newCustomer}).success().error();

Re: Struts2 with AngularJS

2014-11-19 Thread Lukasz Lenart
2014-11-19 9:51 GMT+01:00 foo bar linut...@gmail.com: Hi guys, I'm currently looking into ease of development of using AngularJS with Struts2. I'm wondering what is the best practice in general ie. AngularJS with $resource or $http, Struts2 with what plugin ? Is the REST + convention plugin

Re: Struts2 with AngularJS

2014-11-19 Thread foo bar
Hi, Thanks for the prompt reply, I'll have a look at the Struts2 AngularJS archetype But I meant AngularJS interceptor ( https://docs.angularjs.org/api/ng/service/$http) which is still client side, AngularJS interceptor is meant to intercept {name:abc,address:abc} and change it to

RE: Struts2 with AngularJS

2014-11-19 Thread Martin Gainty
Date: Wed, 19 Nov 2014 17:20:00 +0700 Subject: Re: Struts2 with AngularJS From: linut...@gmail.com To: user@struts.apache.org Hi, Thanks for the prompt reply, I'll have a look at the Struts2 AngularJS archetype But I meant AngularJS interceptor ( https://docs.angularjs.org/api

RE: Struts2 with AngularJS

2014-11-19 Thread Martin Gainty
Date: Wed, 19 Nov 2014 17:20:00 +0700 Subject: Re: Struts2 with AngularJS From: linut...@gmail.com To: user@struts.apache.org Hi, Thanks for the prompt reply, I'll have a look at the Struts2 AngularJS archetype But I meant AngularJS interceptor ( https://docs.angularjs.org/api