-
1. Re: ErraiBus with native JS
crinaldi Oct 21, 2013 8:12 AM (in response to csa)Thanks Christian ...
I'll look Errai-js project and will evaluate to incorporate it into our project.
Greetings.
-
2. Re: ErraiBus with native JS
crinaldi Oct 21, 2013 8:17 AM (in response to csa)Christian:
I take this thread to ask:
1) If possible have JS clients in different domains, working against a single ErraiBus.
Client 1 xyz1.com
Client 2 xyz2.com
Server xyz.com
2) It is possible to use ErraiBus from Phonegap (apache cordova) the same way as in Web?
Thanks!!!
-
3. Re: Re: ErraiBus with native JS
csa Oct 21, 2013 11:20 AM (in response to crinaldi)Hi,
Yes, both are possible.
1) You can set up CORS. Errai provides a simple servlet filter that you can install as a starting point:http://en.wikipedia.org/wiki/Cross-origin_resource_sharinghttps://github.com/errai/errai/blob/master/errai-bus/src/main/java/org/jboss/errai/bus/server/servlet/CorsFilter.java
2) The key is to configure an absolute URL to your server-side bus (see Errai Cordova (Mobile Support)). Check out our tutorial project. It uses ErraiBus and has been set up to work on mobile devices: https://github.com/errai/errai-tutorial
Cheers,
Christian