Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>You need to decide:</p> <p>ONE: load and save a model in the editor window independently.</p> <p>sample code: <a href="http://jsfiddle.net/el_chief/rUaV3/4/" rel="nofollow">http://jsfiddle.net/el_chief/rUaV3/4/</a></p> <p>(above ajax saving is fake, so you won't see update on the grid).</p> <p>TWO: pass in the model from the caller, and save the model in the caller. </p> <p>sample code: <a href="http://jsfiddle.net/el_chief/5jjBS/4/" rel="nofollow">http://jsfiddle.net/el_chief/5jjBS/4/</a></p> <p>ONE is a bit slower, but everything is independent and you can test them independently too.-</p> <p>Also, if you pass in the model from the caller and the user makes changes and then closes the child window, those changes MAY appear in the caller (depending how you do your view/model syncing).</p> <p>Also, oftentimes, you will want to only grab a few fields to display on grids, but show all the fields on an item-view form. In which case, you need option ONE.</p> <p>Either way, you should pass in a callback function to the child window, that it calls when it is "done". This way you can get back any data needed from the child window, and close it if need be.</p> <p>You don't need a singular store for the window either. You should put your proxies on your models (the store uses its models proxy and you can always override it)</p> <p>One key aspect to saving is that you need to return some data, usually a full record like:</p> <pre><code>{ success:true, contacts:[ { id:1, name:'neil mcguigan updated record' } ] } </code></pre>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. VO
      singulars
      1. This table or related slice is empty.
    2. VO
      singulars
      1. This table or related slice is empty.
    3. VO
      singulars
      1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload