1. #21
    Sencha User tjstuart's Avatar
    Join Date
    May 2007
    Location
    Sydney, Australia
    Posts
    310
    Vote Rating
    0
    tjstuart is on a distinguished road

      0  

    Default


    Quote Originally Posted by gitey View Post
    Hey
    Can someone please help me? Am not able to load data in my itemSelector. Am able to get my itemSelector but there is no data. I used the same code posted in the example. But still not able to do it.
    regards
    gitey
    Please post your complete example.

  2. #22
    Ext User
    Join Date
    Jun 2007
    Posts
    10
    Vote Rating
    0
    gitey is on a distinguished road

      0  

    Default


    Heres my code. Am using Ext 2.0 and i have tried the latest release of itemSelector as well as your v2.0.
    Code:
    var testData = [
    ['australia','1'],
    ['india','2'],
    ['china','3']
    ]
    var test = new Ext.data.Store({
        proxy:new Ext.data.MemoryProxy(testData),
        reader: new Ext.data.ArrayReader({}, [
        {name:'country', mapping:'country'},
        {name:'id', mapping:'id'}
        ])
    });  
    test.load();
    /************************************ItemSelector**********************************/
    var itemSelector = new Ext.ux.ItemSelector({
        
        name              : 'Country List',
        fieldLabel        : 'Countries',
        
       //store           :  test,
        
        
    				 
    		 dataFields        :  ['id', 'country'],
    		 
    		 fromData          :  [['1', 'India'], ['2', 'Australia'], ['3', 'China'], ['4', 'Japan'], ['5', 'Brazil']],
    		 toData            :  [['6', 'USA']],
    		 
    		 msWidth           : 100,
    		 msHeight          : 200,
    		 
    		 valueField        : 'id',
    		 displayField      : 'country'
        
           
    });

  3. #23
    Sencha User tjstuart's Avatar
    Join Date
    May 2007
    Location
    Sydney, Australia
    Posts
    310
    Vote Rating
    0
    tjstuart is on a distinguished road

      0  

    Default


    gitey,

    Ext.ux.Multiselect/ItemSelector does not support Ext2.0. You will have to use Ext1.1.

  4. #24
    Ext User
    Join Date
    Jun 2007
    Posts
    10
    Vote Rating
    0
    gitey is on a distinguished road

      0  

    Default


    awww
    anyways...thanks for the fast reply. i really liked the item selector and wanted to use in my application. Now due to deadlines of the project i need to search for an alternative
    thanks for the reply
    gitey

  5. #25
    Sencha - Community Support Team VinylFox's Avatar
    Join Date
    Mar 2007
    Location
    Baltimore, MD
    Posts
    1,501
    Vote Rating
    8
    VinylFox will become famous soon enough VinylFox will become famous soon enough

      0  

    Default


    Quote Originally Posted by tjstuart View Post
    // - Queries to the store in setValue now match whole value correctly (rather than
    tjstuart - its working as expected now, nice turnaround. Thanks for your hard work on this great extension.

  6. #26
    Ext User
    Join Date
    Aug 2007
    Posts
    10
    Vote Rating
    0
    mikich is on a distinguished road

      0  

    Default


    Quote Originally Posted by tjstuart View Post
    Ummm not entirely sure what you mean. Perhaps you mean a ComboBox where you are only allowed to select a single item from a list?
    tjstuart, actually you right, the ComboBox behavior answer for my needs 100%, exept one thing - the look, I like the open style (size="?") property in HTML select, exaclly as you used in Ext.ux.Multiselect.
    Can I use this style ComboBox ?

    PHP Code:
    <select name="x" id="x" size="5">
                <
    option value="1" SELECTED>first</option>
                <
    option value="2">second</option>
                <
    option value="3">.</option>
                <
    option value="4">..</option>
                <
    option value="5">...</option>
    </
    select
    The Ext.ux.Multiselect - is working perfect!

  7. #27
    Sencha User tjstuart's Avatar
    Join Date
    May 2007
    Location
    Sydney, Australia
    Posts
    310
    Vote Rating
    0
    tjstuart is on a distinguished road

      0  

    Default


    mikich,

    You could make Multiselect allow only single item selection by setting maxLength to 1 in the config options.

    Cheers

  8. #28
    Ext User
    Join Date
    Mar 2007
    Posts
    40
    Vote Rating
    0
    FuryVII is on a distinguished road

      0  

    Default


    Great extension. I am having problem (user error) though. I am setting minLength to 1 and I expect the field to be marked invalid on form submit. Is this something I must implement myself, or do I just have it set up wrong?

  9. #29
    Sencha User tjstuart's Avatar
    Join Date
    May 2007
    Location
    Sydney, Australia
    Posts
    310
    Vote Rating
    0
    tjstuart is on a distinguished road

      0  

    Default


    Quote Originally Posted by FuryVII View Post
    Great extension. I am having problem (user error) though. I am setting minLength to 1 and I expect the field to be marked invalid on form submit. Is this something I must implement myself, or do I just have it set up wrong?
    On submit of your form you need to call the 'validate' method on the 'multiselect' widget.

  10. #30
    Sencha Premium Member andrei.neculau's Avatar
    Join Date
    Jul 2007
    Location
    Sweden
    Posts
    197
    Vote Rating
    0
    andrei.neculau is on a distinguished road

      0  

    Default


    Quote Originally Posted by FuryVII View Post
    Great extension. I am having problem (user error) though. I am setting minLength to 1 and I expect the field to be marked invalid on form submit. Is this something I must implement myself, or do I just have it set up wrong?
    Actually you would do
    Code:
    if (myForm.isValid()){myForm.submit(...);}