Tuesday, 18 March 2014

Extjs 4 : Sending updated models to server along with associations (has many)

Model- Association is one of the beautiful features of extjs4. Sencha documentation has plenty of examples on 'how to read association' but it doesn't have official documentation on 'how to update model along with its association' which is also a required feature most of the times.


Copy following code snippet in a javascript file and include it in your JSP/html page after extjs framework file inclusion.

<script type="text/javascript" src="extjs4/ext-all-dev.js"></script>
<script type="text/javascript" src="ext-model-assoc-override.js"></script>


Source : sencha forum topic.
Detailed example : http://stackoverflow.com/questions/9871440/extjs-store-hasmany-belongsto-and-update-process-howto


Note: Following code only works for has many associations. We need to extend this for has one, in case if we want it for has one associations.

1 comment:

  1. The problem of big data record handling can be easily solve by just visiting this activewizards.com, which provides you the talented and professional data scientist to you for doing this work. They are professionally trained data handler and they can easily handle the big data in very short time.

    ReplyDelete