Results 1 to 5 of 5

Thread: multiple widgets 1 datastore

  1. #1
    Ext User
    Join Date
    Aug 2010
    Posts
    48
    Vote Rating
    0
      0  

    Default multiple widgets 1 datastore

    Hi,

    I have a complex data type that I return from the server in json. In my form I want to have multiple widgets that use the same datastore/fetched data. Is there any example that shows how I can build a complex form that uses 1 dataset? For example, a form, with 2 tabs that each have a grid in it working on the same datastore.

    Patrick

  2. #2
    Ext User
    Join Date
    Aug 2010
    Posts
    48
    Vote Rating
    0
      0  

    Default

    To make it a little more explicit, this is the json datastructure I get back.

    For the ArticleFeatures, Loads and Prices I need seperate grids to alter them. For the main information as ArticleID, AlsternativeName I need A form.

    hope someone can help me out.
    Code:
    {
        "type": "rpc",
        "tid": 8,
        "action": "Article",
        "method": "GetDetails",
        "result": {
            "success": true,
            "data": {
                "ArticleID": 1784,
                "AlternativeName": "Sinningia Avanti gemengd",
                "FPLastPart": "11111",
                "ProductID": 99999,
                "CompanyKey": "XXXXXXXXXXXXXXXXXXXX",
                "AddToCatalog": false,
                "ProductAdditionalInfo": "Kleuren: rood - roze/wit - wit en paars",
                "AddedValue": false,
                "VisibleOnWebsite": true,
                "HasLabel": false,
                "HasWrap": true,
                "Meerkarrenaantal1": 5,
                "PrijskortingMeerkarrenaantal1": 0.0500,
                "Meerkarrentaantal2": 10,
                "PrijskortingMeerkarrenaantal2": 0.0000,
                "Prijstoeslag1Laag": 0.0500,
                "PrijstoeslagStapeldoos": 0.0200,
                "OriginalPlantenID": 6363,
                "Grower": {
                    "SalesmanID": "XXXXXXXXXXXXXXXXXXXXX",
                    "FPFirstPart": "100",
                    "Name": "XXXXXXXXXXXXX",
                    "SortName": "XXXXXXXXXXXXX",
                    "MainLocationKey": "XXXXXXXXXXXXXXXXX",
                    "PrimaryTelephoneNumber": "XXXXXXXXXXXXXX",
                    "SecondaryTelephoneNumber": "XXXXXXXXXXXXXXXXXX",
                    "FaxNumber": "XXXXXXXXXXXXXXX",
                    "EmailAddress": "XXXXXXXXXXXXXXXXX",
                    "LabelPricePot": 0.0500,
                    "LabelPriceWrap": 0.0300,
                    "LabelPricePrinted": 0.0100,
                    "BTWNumber": "XXXXXXXXXXXXXXXXXXX",
                    "Certifications": "AAAAA",
                    "FlorecomEnabled": false,
                    "TransporterName": "XXXXXXXXXXXXXX",
                    "TransporterTelephoneNumber": "-------------",
                    "OriginalKwekerID": 999,
                    "CompanyKey": "XXXXXXXXXXXXXXXXXXX",
                    "GrowerContacts": [],
                    "Articles": []
                },
                "ArticleFeatures": [{
                    "ArticleID": 1784,
                    "FeatureTypeID": "S01",
                    "FeatureValue": "012"
                },
                {
                    "ArticleID": 1784,
                    "FeatureTypeID": "S02",
                    "FeatureValue": "020"
                },
                {
                    "ArticleID": 1784,
                    "FeatureTypeID": "S36",
                    "FeatureValue": "030"
                },
                {
                    "ArticleID": 1784,
                    "FeatureTypeID": "S50",
                    "FeatureValue": "051"
                }],
                "ArticleLoads": [{
                    "ArticleLoadID": 1710,
                    "ArticleID": 1784,
                    "PackagingCode": 236,
                    "LayersPerContainer": 7,
                    "UnitsPerLayer": 6,
                    "PlantsPerUnit": 6,
                    "LoadCarrierID": 1
                },
                {
                    "ArticleLoadID": 2530,
                    "ArticleID": 1784,
                    "PackagingCode": 406,
                    "LayersPerContainer": 7,
                    "UnitsPerLayer": 5,
                    "PlantsPerUnit": 6,
                    "LoadCarrierID": 1
                },
                {
                    "ArticleLoadID": 4015,
                    "ArticleID": 1784,
                    "PackagingCode": 874,
                    "LayersPerContainer": 1,
                    "UnitsPerLayer": 2,
                    "PlantsPerUnit": 6,
                    "LoadCarrierID": 2
                }],
                "ArticlePrices": [{
                    "ArticleID": 1784,
                    "WeekNumber": 1,
                    "Available": false
                },
                {
                    "ArticleID": 1784,
                    "WeekNumber": 2,
                    "Available": false
                },
                {
                    "ArticleID": 1784,
                    "WeekNumber": 3,
                    "Available": false
                },
                {
                    "ArticleID": 1784,
                    "WeekNumber": 4,
                    "Available": false
                }
                <SNIP>]
            }
        }
    }

  3. #3
    Sencha Premium Member steffenk's Avatar
    Join Date
    Jul 2007
    Location
    Haan, Germany
    Posts
    2,676
    Vote Rating
    9
      0  

    Default

    you can do following:

    load 1 store with the data, then make something like
    Code:
    store2.loadData(store1.reader.jsonData);
    i often use such with different arrays in json where i feed several stores with result of one request.
    vg Steffen
    --------------------------------------
    Release Manager of TYPO3 4.5

  4. #4
    Ext User
    Join Date
    Aug 2010
    Posts
    48
    Vote Rating
    0
      0  

    Default

    Do I still have the CRUD formbinding functionality?

  5. #5
    Sencha Premium Member steffenk's Avatar
    Join Date
    Jul 2007
    Location
    Haan, Germany
    Posts
    2,676
    Vote Rating
    9
      0  

    Default

    of course not.
    vg Steffen
    --------------------------------------
    Release Manager of TYPO3 4.5

Similar Threads

  1. Replies: 10
    Last Post: 20 May 2009, 10:09 AM
  2. Blink problem with multiple widgets
    By nickydavid in forum Ext GWT: Help & Discussion (1.x)
    Replies: 4
    Last Post: 30 Apr 2009, 2:26 AM
  3. Multiple comboboxes one datastore?
    By malkishua in forum Ext 1.x: Help & Discussion
    Replies: 4
    Last Post: 10 May 2007, 2:47 PM
  4. Single DataStore multiple Comboboxes
    By blaubarschbube in forum Ext 1.x: Help & Discussion
    Replies: 0
    Last Post: 29 Apr 2007, 12:19 PM

Posting Permissions

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