Results 1 to 3 of 3

Thread: Problem with add component

  1. #1
    Sencha User
    Join Date
    Aug 2011

    Default Problem with add component

    I'm using ExtJs 6.2 GPL version.

    I have a container (A) with a button to add items inside. These are instances of the same class ('siteobj'). When I add a site obj to A (a.add(siteobj)), siteobj is displayed in the containers and in a.items. Here "add" works.

    Siteobj has also an add button to add objecs of class paramsobj inside of it. Here I have a problem: each time I add a new paramsobj into a siteobj (siteobj.add(paramsobj)), the paramsobj is displayed inside siteobj but siteobj.items has only the last added paramsobj.

    A, siteobj and paramsobj have xtype panel
    paramsobj contains a fieldset with combo boxes

    I use "add" to add an item into a container because I was told in a previous post that this is the best way to add an item to a container (container.items.items = ... doesn't always work).

    Thank you in advance for your help


  2. #2
    Sencha User
    Join Date
    Sep 2007
    Phoenix AZ


    Are the combo boxes in the Items array of the fieldset?

    I just looked at the add method in the Container class. Looks like it is adding to the items array. I would put some debugging info in that method and see what is going on. Don't be afraid to dig into the ExtJS code.

    Not sure about 6.2.... but in 6.7 in the app.json edit the framework load so it loads individual files. You can edit the ext.js files directly and add console.log outputs and see what is going on.

    in app.json:

    * Settings specific to modern toolkit builds.
    "modern": {
    "js": [
    // Remove this entry to individually load sources from the framework.
    // {
    // "path": "${framework.dir}/build/ext-modern-all-debug.js"
    // }


  3. #3
    Sencha User
    Join Date
    Aug 2011



    the problem was that the objects paramsobj had the same itemId. Removing the itemId the add function works. I had used the itemId to navigate from the child objects of a paramsobj to paramsobj, but I found another solution.


Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts