• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: Angular JS + WO
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Angular JS + WO


  • Subject: Re: Angular JS + WO
  • From: Frank Stock <email@hidden>
  • Date: Mon, 23 Jun 2014 22:23:49 +0200

Michael,

I think I know now where my problem is.
I am using Webstorm for the Ember application. My WOApp is the ERRestRouteExample. So I use:
Films.ApplicationAdapter = DS.RESTAdapter.extend({

    namespace: 'ra',
    host: 'http://x.x.x.x/App/WebObjects/Rest.woa'  // Rest.wo is ERRestRoutExample
});


Frank
Op 23 jun. 2014, om 21:35 heeft Michael Kondratov <email@hidden> het volgende geschreven:

Frank,

in Properties file:
#ERRest
ERXRest.writeTypeKey=false
ERXRest.defaultFormat=ember
er.rest.timestampFormat=yyyy-MM-dd’T'HH:mm:ssZ

in Ember Application:

App.ApplicationAdapter = DS.RESTAdapter.extend({
namespace: applicationURL + 'ra'
});


DS.RESTAdapter = DS.RESTAdapter.extend({
    buildURL: function(record, suffix) {
      return this._super(record,suffix) + '.ember?wosid=' + sessionID;
    },

    

findHasMany: function(store, record, relationship, details) {
return this._super(store, record, '/' + applicationURL + 'ra' + relationship + '.ember?wosid=' + sessionID, details);
},

findBelongsTo: function(owner, link, relationship, resolver) {
this._super(owner, link, '/' + applicationURL + 'ra' + relationship + '.ember?wosid=' + sessionID, resolver);
}
});

We are passing session id to REST. You may not need to do that.


One more thing: In create filers you will need to map relationships:
filter.include(Bidder.COUNTRY_ID);
filter.addMap(new ERXKey<Long>("country"), Bidder.COUNTRY_ID);




Michael Kondratov
Aspire Auctions, Inc.
216-231-5515

On Jun 23, 2014, at 3:08 PM, Frank Stock <email@hidden> wrote:

Hello Michael,


Thank you for the information. I did update my files and I am able to get data from the Movies application into my Ember app. But the moment I want to update/create I always get the following error:
No 'Access-Control-Allow-Origin' header is present on the requested resource.
Can you tell me how I can handle that, or do you have a small ember-example. I am testing with Ember-data.

Thanks,
Frank Stock 
Belgium


Op 20 jun. 2014, om 16:54 heeft Michael Kondratov <email@hidden> het volgende geschreven:

I can send you modified files or you may checkout our fork on github  mkondratov/wonder . I really need to send the changes to the official branch. Tried few month ago with no success.

Michael Kondratov
Aspire Auctions, Inc.
216-231-5515
Do not post admin requests to the list. They will be ignored. Webobjects-dev mailing list (email@hidden) Help/Unsubscribe/Update your Subscription: This email sent to email@hidden
References: 
 >Antw.: Angular JS + WO (From: Frank Stock <email@hidden>)
 >Re: Angular JS + WO (From: Michael Kondratov <email@hidden>)
 >Re: Angular JS + WO (From: Michael Kondratov <email@hidden>)

  • Prev by Date: Re: Can't see the tabs in D2W app
  • Next by Date: Re: Can't see the tabs in D2W app
  • Previous by thread: Re: Angular JS + WO
  • Next by thread: Obscure bug involving AjaxFlexibleFileUpload
  • Index(es):
    • Date
    • Thread