1. #1
    Ext JS Premium Member
    Join Date
    Mar 2007
    Location
    Virginia, USA
    Posts
    490
    Vote Rating
    -1
    vtswingkid is on a distinguished road

      0  

    Thumbs up [2.x] Ext.ux.Multiselect/ItemSelector

    [2.x] Ext.ux.Multiselect/ItemSelector


    LIVE DEMO:
    http://members.cox.net/vtswingkid/ex...tiselect2.html

    Multiselect:

    Itemselector:


    I've ported this to 2.x.

    There are probably a couple bugs to work out. Have a try at it.

    When tjstuart is happy with it, he can add it to the extensions page...

    To use this extension in 2.x be sure to include:
    multiselect2.css
    multiselect2.js
    ddview2.js (thanks animal - i put a couple changes in)

    good luck!
    Attached Files

  2. #2
    Sencha User
    Join Date
    Apr 2007
    Location
    Ottawa, Canada
    Posts
    174
    Vote Rating
    1
    ffzhuang will become famous soon enough

      0  

    Default Thanks for nice work - some issue in 2.0

    Thanks for nice work - some issue in 2.0


    Hi, vtswingkid:

    First thanks for your nice work. It is an important part.

    In firebug, I got the following error when I run your demo in Ext2.0-rc1

    Code:
    p.body.first().getWidth is not a function
    onRender(Object dom=div#x-form-el-ext-comp-1003.x-form-element, null)Multiselect2.js (line 347)
    Component("x-form-el-ext-comp-1003", undefined)ext-all.js (line 58)
    getAnchorViewSize(Object initialConfig=Object xtype=itemselector, null, Object dom=form#ext-gen31.x-form id=ext-gen31)ext-all.js (line 71)
    ContainerLayout(Object initialConfig=Object labelWidth=75 width=600, Object dom=form#ext-gen31.x-form id=ext-gen31)ext-all.js (line 65)
    ContainerLayout(Object initialConfig=Object labelWidth=75 width=600, Object dom=form#ext-gen31.x-form id=ext-gen31)ext-all.js (line 65)
    getAnchorViewSize(Object initialConfig=Object labelWidth=75 width=600, Object dom=form#ext-gen31.x-form id=ext-gen31)ext-all.js (line 68)
    ContainerLayout()ext-all.js (line 65)
    initComponent()ext-all.js (line 64)
    initComponent()ext-all.js (line 64)
    (no name)()demo.html (line 67)
    Observable()ext-all.js (line 12)
    EventManager()ext-all.js (line 13)
    
    [IMG]chrome://firebug/content/blank.gif[/IMG]		this.el.setWidth(p.body.first().getWidth());
    Any idea for this issue,

    Thanks

    Fenqiang Zhuang

  3. #3
    Ext JS Premium Member
    Join Date
    Mar 2007
    Location
    Virginia, USA
    Posts
    490
    Vote Rating
    -1
    vtswingkid is on a distinguished road

      0  

    Default


    I am having no luck replicating your error. Make sure the paths to the ext-2.0-rc1 toolset are correct in the multiselect2.html file. Is anyone, else having this problem?

    I see a problem with the multiselect example in IE7. The toolbox and the data window are slid to the left a few pixels. Works fine in both item select boxes. Must be a style issue, and ideas for a fix?

  4. #4
    Ext User
    Join Date
    Nov 2007
    Posts
    29
    Vote Rating
    0
    Fede is on a distinguished road

      0  

    Exclamation Problem with DataStore

    Problem with DataStore


    Really good extension!

    I have a problem. Firebug returns me that message:

    this.data has no properties
    [Break on this error] return this.data.getRange(start, end);
    ext-all-debug.js (line 10650)
    Code:
    	var dsLocalizaciones = new Ext.data.Store({
    		url: '/generic/list',
    		reader: new Ext.data.JsonReader({
    			id: 'id_p',
    			root: 'results',
    			totalProperty: 'total'
    		}, [
    			{name: 'id_p', mapping: 'id_p'},
    			{name: 'nombre', mapping: 'nombre'}
    		])
    	});
    	dsLocalizaciones.load();
    		
    
    	var formItemSelector = new Ext.form.FormPanel({ 
    		labelWidth: 75,
    		width:600,
    		items:[{
    			xtype:"itemselector",
    			name:"itemselector",
    			dataFields: ['id_p', 'nombre'],
    			//fromData:[[123,"One Hundred And Twenty Three"],
    			//	["1", "One"], ["2", "Two"], ["3", "Three"], ["4", "Four"], ["5", "Five"],
    			//	["6", "Six"], ["7", "Seven"], ["8", "Eight"], ["9", "Nine"]],
    			//toData:[["10", "Ten"]],
    			store: dsLocalizaciones,
    			msWidth:200,
    			msHeight:200,
    			valueField:"id_p",
    			displayField:"nombre",
    			//imagePath:"/public/javascript/ux/multiselect/",
    			//switchToFrom:true,
    			toLegend:"Selected",
    			fromLegend:"Available",
    			toTBar:[{
    				text:"Clear",
    				handler:function(){
    					var i=formItemSelector.getForm().findField("itemselector");
    					i.reset.call(i);
    				}
    			}]
    		}],
    		buttons:[{
    			text:"Get Value",
    			handler: function(){
    				alert(formItemSelector.getForm().getValues(true));
    			}
    		},{	
    			text:"Mark Invalid",
    			handler: function(){
    				formItemSelector.getForm().findField("itemselector").markInvalid("Invalid");
    			}
    		}]
    	});
    	formItemSelector.render("form-ct-itemselector");
    and my Json return is:
    Code:
    {"results":[{"id_p":"3","nombre":"asdf"},{"id_p":"1","nombre":"Federico"},{"id_p":"2","nombre":"jose luis"},
    {"id_p":"6","nombre":"migueld"},{"id_p":"5","nombre":"nacho"},{"id_p":"4","nombre":"tuetye"}],
    "total":6}
    I try all posibilities I think. I have others DataStorse and works perfectly.

    Thanks a lot,
    Fede

  5. #5
    Ext JS Premium Member
    Join Date
    Mar 2007
    Location
    Virginia, USA
    Posts
    490
    Vote Rating
    -1
    vtswingkid is on a distinguished road

      0  

    Default


    two things...
    1) toStore: dsLocalizaciones
    2) either create a fromStore: new Ext.SimpleStore.... or provide fromData:[]
    good luck

  6. #6
    Ext User
    Join Date
    Oct 2007
    Posts
    4
    Vote Rating
    0
    loveyeah is on a distinguished road

      0  

    Question


    Quote Originally Posted by ffzhuang View Post
    Hi, vtswingkid:

    First thanks for your nice work. It is an important part.

    In firebug, I got the following error when I run your demo in Ext2.0-rc1

    Code:
    p.body.first().getWidth is not a function
    onRender(Object dom=div#x-form-el-ext-comp-1003.x-form-element, null)Multiselect2.js (line 347)
    Component("x-form-el-ext-comp-1003", undefined)ext-all.js (line 58)
    getAnchorViewSize(Object initialConfig=Object xtype=itemselector, null, Object dom=form#ext-gen31.x-form id=ext-gen31)ext-all.js (line 71)
    ContainerLayout(Object initialConfig=Object labelWidth=75 width=600, Object dom=form#ext-gen31.x-form id=ext-gen31)ext-all.js (line 65)
    ContainerLayout(Object initialConfig=Object labelWidth=75 width=600, Object dom=form#ext-gen31.x-form id=ext-gen31)ext-all.js (line 65)
    getAnchorViewSize(Object initialConfig=Object labelWidth=75 width=600, Object dom=form#ext-gen31.x-form id=ext-gen31)ext-all.js (line 68)
    ContainerLayout()ext-all.js (line 65)
    initComponent()ext-all.js (line 64)
    initComponent()ext-all.js (line 64)
    (no name)()demo.html (line 67)
    Observable()ext-all.js (line 12)
    EventManager()ext-all.js (line 13)
    
    [IMG]chrome://firebug/content/blank.gif[/IMG]		this.el.setWidth(p.body.first().getWidth());
    Any idea for this issue,

    Thanks

    Fenqiang Zhuang
    I also got this error:p.body.first().getWidth is not a function
    please help!!!

  7. #7
    Ext User
    Join Date
    Nov 2007
    Posts
    29
    Vote Rating
    0
    Fede is on a distinguished road

      0  

    Talking SOLVED!!!

    SOLVED!!!


    After try a bit more! It worked perfectly!

    The error was that I only put one DataStore for "toStore" and nothing for "fromStore". You have to put 2 DataStores or 2 Inline data, but never combine it.

    My code:
    Code:
    var dsLocalizaciones = new Ext.data.Store({
    	url: '/generic/list',
    	reader: new Ext.data.JsonReader({
    		id: 'id_p',
    		root: 'results',
    		totalProperty: 'total'
    	}, [
    		{name: 'id_p', mapping: 'id_p'},
    		{name: 'nombre', mapping: 'nombre'}
    	])
    });
    dsLocalizaciones.load();
    		
    var store = new Ext.data.SimpleStore({
            fields: [
    		{name: 'id_p', mapping: 'id_p'},
    		{name: 'nombre', mapping: 'nombre'}
            ]
    });
    	
    var formItemSelector = new Ext.form.FormPanel({ 
    	labelWidth: 75,
    	width:600,
    	items:[{
    		fieldLabel:"Itemselector",
    		xtype:"itemselector",
    		name:"itemselector",
    		fromStore: dsLocalizaciones,
    		toStore: store,
    		msWidth:200,
    		msHeight:200,
    		valueField:"id_p",
    		displayField:"nombre",
    		toLegend:"Seleccionados",
    		fromLegend:"Disponibles",
    		toTBar:[{
    			text:"Clear",
    			handler:function(){
    				var i=formItemSelector.getForm().findField("itemselector");
    				i.reset.call(i);
    			}
    		}]
    	}],
    	buttons:[{
    		text:"Get Value",
    		handler: function(){
    			alert(formItemSelector.getForm().getValues(true));
    		}
    	},{	
    		text:"Mark Invalid",
    		handler: function(){
    				formItemSelector.getForm().findField("itemselector").markInvalid("Invalid");
    		}
    	}]
    });
    formItemSelector.render("form-ct-itemselector");
    In my case I put it in a Form. Declaring a var with type new Ext.ux.ItemSelector, And included into items of the Form.


    Greetings,
    Fede

  8. #8
    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 vtswingkid View Post
    I've ported this to 2.x.
    There are probably a couple bugs to work out. Have a try at it.
    When tjstuart is happy with it, he can add it to the extensions page...
    Good stuff! I'll have a look as soon as I get a chance. Do you envisage many problems? I'm happy to update the extensions page and host the port if you like.

    I'll probably do the following with versions:-

    Ext 1.x - keep extension at 2.2 and any bug fixes use 2.2.x
    Ext 2.x - use 2.3 and above accordingly

  9. #9
    Ext User
    Join Date
    Oct 2007
    Posts
    4
    Vote Rating
    0
    ChrisM is on a distinguished road

      0  

    Default Problem selecting in IE

    Problem selecting in IE


    Great extension - looks and (almost) works really well.

    I've been seeing some slight funnies on Internet Explorer (6). These can be seen in the examples page that vtswingkid posted. When I click in the multiselect boxes, none of the first few items show selected (in the multiselect example I have to click down to 4 before anything selects.

    However if I scroll the box down, the items appear selected when I click on them. If I then click on the ones higher up the list they appear selected, until I scroll back up to the top, and try to click on the top item.

    Has anyone else seen this, or got any ideas what might be going on? It's doing my head in!

  10. #10
    Sencha User galdaka's Avatar
    Join Date
    Mar 2007
    Location
    Spain
    Posts
    1,166
    Vote Rating
    -1
    galdaka is an unknown quantity at this point

      0  

    Default


    Libe example please!

    Thanks in advance,

film izle

hd film izle

film sitesi

takipci kazanma sitesi

takipci kazanma sitesi

güzel olan herşey

takipci alma sitesi

komik eğlenceli videolar