Results 1 to 2 of 2

Thread: Inclusion Validator with a list from an external store

  1. #1
    Sencha User
    Join Date
    May 2016
    Posts
    4
    Vote Rating
    0
      0  

    Default Inclusion Validator with a list from an external store

    When using model validations, is there a way to add a list to an inclusion validator that is in some external store like this?

    Code:
    validators: {
    test: {type: 'inclusion', list: Ext.StoreMgr.lookup('TestStore')}
    }
    where my Test Store looks like:
    Code:
    Ext.define('Ext.data.TestStore', {
        extend: 'Ext.data.Store',
        alias: 'store.TestStore',
        storeId: 'TestStore',
        fields: ['id', 'name'],
        data: [
            { id: 0, name: 'Test1' },
            { id: 1, name: 'Test2' },
            { id: 2, name: 'Test3' },
            { id: 3, name: 'Test4' }
        ]
    });

    All the examples I'm finding in the docs

    Code:
    {type: 'inclusion', list: ['Male', 'Female']}
    It seems like any way I do this, the inclusion logic is trying to this.getList() and that is returning a null value.

    Thanks for any help!

  2. #2
    Sencha User
    Join Date
    May 2016
    Posts
    4
    Vote Rating
    0
      0  

    Default

    This post did not submit for over a day, and I assumed that I accidentally did not submit. Thus I accidentally made a duplicate issue in https://www.sencha.com/forum/showthr...external-store.

    This issue can be removed.

Similar Threads

  1. Replies: 1
    Last Post: 16 May 2018, 7:26 AM
  2. A small problem to feed my list with store in external class
    By Ocelyn in forum Sencha Touch 2.x: Q&A
    Replies: 1
    Last Post: 7 May 2012, 5:07 AM
  3. Replies: 1
    Last Post: 6 Dec 2011, 6:58 AM
  4. Example of an external store call for Ext.List
    By lbuijsma in forum Sencha Touch 1.x: Discussion
    Replies: 2
    Last Post: 4 Oct 2010, 3:42 PM

Tags for this Thread

Posting Permissions

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