Subclassing and

2 posts, 0 answers
  1. Jack
    Jack avatar
    100 posts
    Member since:
    Jan 2007

    Posted 04 Feb 2015 Link to this post

    I would like to create a specific hierarchy of Manufacturers, Cars and Parts.

    To achieve this, I would like to subclass as follows:

    var Manufacturer ={
    var Car ={
    var Part ={

    I would then like to subclass, to represent such a hierarchy.

    Question 1: How can I achieve that?

    Data comes from a RESTful JSON service located at:
    http://<ip address>/api/v1/manufacturers (GET, POST)
    http://<ip address>/api/v1/manufacturers/<mid> (GET, PUT, DELETE)
    http://<ip address>/api/v1/manufacturers/<mid>/cars (GET, POST)
    http://<ip address>/api/v1/manufacturers/<mid>/cars/<cid> (GET, PUT, DELETE)
    http://<ip address>/api/v1/manufacturers/<mid>/cars/<cid>/parts (GET, POST)
    http://<ip address>/api/v1/manufacturers/<mid>/cars/<cid>/parts/<pid> (GET, PUT, DELETE)

    Then I would like to instantiate my subclassed hierarchy to use this JSON service. 

    Question 2:  How can I achieve that?

  2. Alex Gyoshev
    Alex Gyoshev avatar
    2497 posts

    Posted 06 Feb 2015 Link to this post

    Hello Jacques,

    I'm afraid that this approach is not supported in a clean way. You can achieve it with the code shown in this Dojo snippet, but mixing the transport and models is unavoidable.

    Alex Gyoshev
    Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
Back to Top