Coder Social home page Coder Social logo

Comments (4)

ghempton avatar ghempton commented on June 7, 2024

Is there any chance you could create a jsfiddle?

from ember-layout.

wyaeld avatar wyaeld commented on June 7, 2024

Not sure how to do a jsfiddle that requires ember-data and a restful
backend to work. I can possibly put up a public clone of the affected
codebase so you can see the part that causes the problem.

On Tue, Feb 21, 2012 at 6:37 AM, Gordon L. Hempton <
[email protected]

wrote:

Is there any chance you could create a jsfiddle?


Reply to this email directly or view it on GitHub:
#1 (comment)

from ember-layout.

wyaeld avatar wyaeld commented on June 7, 2024

Apologies Gordon, the problem isn't actually caused by your Ember.Layout, its purely Ember.Data itself.

The sequence is

App = Ember.Application.create
  ready: ->
    @_super
    App.peopleController.findAll()

App.routeManager = Ember.RouteManager.create
  show: Ember.LayoutState.create
    path: 'people/:id'
    viewClass: App.PersonShowView
    enter: (stateManager, transition) ->
      @_super(stateManager, transition)
      App.personController.loadPerson(stateManager.params.id)

App.personController = Ember.Object.create

  loadPerson: (id) ->
    person = App.Store.find(App.Person, id)

With Ember.Data plugged in, the Application has already loaded the Person objects in the ready() callback. The find returns the client side store object and fires an ajax request. The Person is already loaded when the ajax success callback arrives (since the person was already loaded before the find() was called) and the 'saved' state does not handle the setData event triggered by the Ajax load.

from ember-layout.

ghempton avatar ghempton commented on June 7, 2024

No worries. Thanks for looking into this.

from ember-layout.

Related Issues (3)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.