Announcement

Collapse
No announcement yet.
X
  • Filter
  • Time
Clear All
new posts

    Access objects

    This code creates a tabset:
    Code:
    isc.TabSet.create({
        ID: "Consists",
        width: "100%",
        height: "100%",
        tabs: [{
            ID: "Train",
            title: "Train",
            pane: cntConsist
        },{
            ID: "Cars",
            title: "Cars"
         }]
    })
    Second tab has cntConsist as a pane. cntConsist is a VLayout. Then inside of it thru some additional layers I have a dynamic form and ListGrids. I am I am creating a copy of a tab "Train" and updateTab ing it into a tabset. But before I do that I want to change something for dataSources to prevent data pulling for new tab. How shoud I access these objects via a new tab?
    Here is code:
    Code:
    newTab = tabSet.getTabObject(1);
    newTab.ID = "consist2";
    newTab.title = "Consists#2";
    newTab2 = tabSet.addTab(newTab);
    // here probably I would want to modify dataSources dataURLs because I dont need data for brand new tab
    tabSet.updateTab(newTab2, Consists);
    Please help me with that. Adding new tab is a conerstone of my apps.

    Thanks

    #2
    This was discussed further offline.
    The basic requirement was to have a set of identical VLayouts with a number of members including DynamicForms and ListGrids that could show up in multiple tabs displaying different data (though the same set of fields).

    Suggested approach for this was to create a custom subclass of VLayout using the ClassFactory APIs, which as part of its initWidget method sets up its own members.

    Then new instances of this class can be created for each new tab that is created.

    Comment

    Working...
    X