Gelmiş geçmiş en büyük porno sitemiz olan 2pe de her zaman en kaliteli pornoları sunmayı hedefledik. Diğer video sitemiz olan vuam da ise hd porno ağırlıklı çalışmalara başladık.

  1. #281
    Ext JS Premium Member
    Join Date
    May 2007
    Posts
    698
    Vote Rating
    3
    danh2000 is on a distinguished road

      0  

    Default


    Quote Originally Posted by boonkerz View Post
    Ups Sorry i use the 3.x Version but i think is the same with ontrigger or?
    There is only one version of the code for both Ext 2.* and Ext 3.* - the same approach will work with either version of the library.

  2. #282
    Ext User
    Join Date
    Feb 2009
    Location
    Calgary, Canada
    Posts
    28
    Vote Rating
    0
    travisbell is on a distinguished road

      0  

    Default


    Quote Originally Posted by badgerd View Post
    I was wondering if anyone has an event override for additem?

    I am trying to load default values that is dynamically called via Ajax and populate the Combo using a copy of the setValue function - I have called this setDefaultValue.

    Code:
    /**
         * Sets the default values of the SuperBoxSelect component.
         * @methodOf Ext.ux.form.SuperBoxSelect
         * @name setDefaultValue
         * @param {String|Array} value An array of item values, or a String value containing a delimited list of item values. (The list should be delimited with the {@link #Ext.ux.form.SuperBoxSelect-valueDelimiter) 
         */
        setDefaultValue : function(value){
            if(!this.rendered){
                this.preRenderValue = value;
                return;
            }
            
            var values = Ext.isArray(value) ? value : value.split(this.valueDelimiter);
            this.removeAllItems().resetStore();
            
            //reset remoteLookup because setDefaultValue should overwrite everything
            //inc pending data
            this.remoteLookup = [];
            
            Ext.each(values,function(val){
                var record = this.findRecord(this.valueField, val);
                if(record){
                    this.addRecord(record);
                }else if(this.mode === 'remote'){
    				this.remoteLookup.push(val);            	
                }
            },this);
            
            if(this.mode === 'remote'){
          		var q = this.remoteLookup.join(this.queryValuesDelimiter); 
          		this.doQuery(q,false, true); //3rd param to specify a values query
            }
            
        },
    Code:
    gridSteps.getSelectionModel().on('rowselect', function(grid, rowIndex, e) {
    	
    		var selectionModel = gridSteps.getSelectionModel();
    		var record = selectionModel.getSelected();
    		
    		var WorkflowStepId = record.data['workflowstepid'];
    		
    		// Get List of Employee Ids when Workflow Step is selected.
    		Ext.Ajax.request({
    			url: '#application.webserver#/#application.root#/components/Workflow.cfc?method=GetWorkflowStepList&intWorkflowStepId='+WorkflowStepId,
    			success: function(response,options) {
    				
    				getField1Combo.setDefaultValue(response.responseText);
    				
    			}
    		});
    		
    	});
    I do not wish to have the additem function called when this is occuring, I only wish for additem to work when users are adding new values.

    Where abouts in the main code (SuperBoxSelect.js) can I override and "suspend" the additem function?

    Apologies if this has been raised before, but I am at a total loss at the moment and getting tight for time in getting this project completed.
    I am needing to do this as well.

    What's the best way to use a remote store, but have some default values populate without the additem function being called?

    I can *for now* just restrict the added values to be unique but that's a hack. I can't seem to figure out a way to not have the additem function get called when using a remote store...
    Travis Bell

  3. #283
    Ext JS Premium Member
    Join Date
    May 2007
    Posts
    698
    Vote Rating
    3
    danh2000 is on a distinguished road

      0  

    Default


    Quote Originally Posted by travisbell View Post
    I am needing to do this as well.

    What's the best way to use a remote store, but have some default values populate without the additem function being called?

    I can *for now* just restrict the added values to be unique but that's a hack. I can't seem to figure out a way to not have the additem function get called when using a remote store...
    Do you mean you don't want the additem event to trigger the handler?

    The simplest way would be to suspend events, use setValueEx to set the default values, then resume events.

    The more complicated but complete way would be to create a new setDefaultValue method, and trace everything through to the addRecord method (where the additem event is fired) overriding these methods to pass an additional param (all the way to addRecord) that indicates that you wish to supress this event from firing.

    You can then do something like:

    PHP Code:
    if(!supressEvent){
        
    this.fireEvent('additem'thisvalrecord);


  4. #284
    Sencha User
    Join Date
    Dec 2008
    Location
    Lodz, Poland
    Posts
    173
    Vote Rating
    3
    grzegorz.borkowski is on a distinguished road

      0  

    Default Bug with setting initial value

    Bug with setting initial value


    We've some observed behavior that looks like a bug in the component. If you define initial value on the SuperBoxSelect initial config, and shortly after this (before it's get rendered) you set value to different one, the initial value overrides the one set later.
    In the component source there is a code which seems to be written to prevent such case (using preRenderValue) but it looks like broken - it doesn't work well. I attach the testcase - the expected result is to see Item2 and Item4 to be displayed, but instead it diesplay Item1 (from initial config).
    We've identified possible solution to this problem, which requires modification to onRender method in SupeBoxSelect source, and adding afterRender method:


    Code:
    onRender:function(ct, position) {
            Ext.ux.form.SuperBoxSelect.superclass.onRender.call(this, ct, position);
            ....
            this.setupFormInterception();
    
            // move this code to overriden afterRender method:
            //if(this.preRenderValue){
            //    this.setValue(this.preRenderValue);
            //    this.preRenderValue = null;
            //}
        },
    
        afterRender: function() {
            Ext.ux.form.SuperBoxSelect.superclass.afterRender.call(this);
            if(this.preRenderValue){
                this.setValue(this.preRenderValue);
                this.preRenderValue = null;
            }
        }
    Attached Files

  5. #285
    Ext JS Premium Member
    Join Date
    May 2007
    Posts
    698
    Vote Rating
    3
    danh2000 is on a distinguished road

      0  

    Default


    @grzegorz.borkowski

    Thanks for the report, that's a scenario I hadn't considered. I will fix this in the next version.

    Regards,

    Dan

  6. #286
    Sencha User
    Join Date
    Nov 2008
    Posts
    159
    Vote Rating
    0
    dizor is on a distinguished road

      0  

    Default


    I have problems with submit form and getForm().load.

    When i load data info form with this JSON:

    Code:
    {"success":true,"data":{"customers_regon":"16,9"}}
    1) everything working ok with hiddenName: "customers_regon"
    2) but i must use hiddenName: "customers_regon[]" (because submit more then one value) and with this doesn't load any values.

    Before i found this plugin i use Ext.ux.form.LovCombo and this works with hiddenName: "customers_regon" because this submit in POST not :

    customers_regon[]: 1 or customers_regon: 1
    customers_regon[]: 2 or customers_regon: 2

    but simply: customers_regon: 1,2

    Can anybody help me with this?

    Code:
    },{
    	xtype:'superboxselect',
    	allowBlank: false,
    	msgTarget: 'side',
    	renderFieldBtns: true,
    	fieldLabel: 'Countries',
    	resizable: true,
    	store: new Ext.data.JsonStore({
    		url: "/html/get_pages",
    		root: "data",
    		id: "id",
    		totalProperty: "total",
    		fields: [{name:"customers_regon", mapping:"id"}, {name:"label"}],
    		autoLoad: true
    	}),
    	mode: 'local',
    	displayField: 'label',
    	valueField: 'customers_regon',
    
            //hiddenName: "customers_regon[]",
            hiddenName: "customers_regon",
    
    	anchor: '95%',
    	classField: 'cls',
    	styleField: 'style',
    	extraItemCls: 'x-flag',
    	extraItemStyle: 'border-width:2px'
    }]

  7. #287
    Ext JS Premium Member
    Join Date
    May 2007
    Posts
    698
    Vote Rating
    3
    danh2000 is on a distinguished road

      0  

    Default


    @dizor,

    I'm currently travelling and viewing this on my phone, so I can't see your code properly, however, it appears that you haven't given the component a name - can you please try with using the name config.

    Thanks,

    Dan

  8. #288
    Sencha User
    Join Date
    Nov 2008
    Posts
    159
    Vote Rating
    0
    dizor is on a distinguished road

      0  

    Default


    The problem occurred because i have error in JSON - i use:

    Code:
    {"success":true,"data":{"customers_regon":"16,9"}}
    instead:

    Code:
    {"success":true,"data":{"customers_regon[]":"16,9"}}
    @danh2000: thx for reply and great plugin!

  9. #289
    Sencha User
    Join Date
    Jan 2010
    Posts
    13
    Vote Rating
    0
    ozum is on a distinguished road

      0  

    Default Post when disabled

    Post when disabled


    Thx, great plugin. Nice and detailed control. One small issue to consider and I'll be very appreciated if it is addressed, because it prevents me to use in my project.

    Control posts its values even it's set as disabled. For consistency with other Ext JS controls and according to HTML standards when a control is disabled, it shouldn't post its value when the form is submitted.

    Best regards,

  10. #290
    Sencha User
    Join Date
    Jan 2010
    Posts
    13
    Vote Rating
    0
    ozum is on a distinguished road

      0  

    Question Post when disabled

    Post when disabled


    Below is a suggestion to prevent sending values when disabled. (Changes are in red)

    CAVEAT: This only works when disabled via initial config. I'm not experienced in Ext JS. I think someone will come with a more elegant solution.

    Code:
    addItemBox : function(itemVal,itemDisplay,itemCaption, itemClass, itemStyle) {
            var parseStyle = function(s){
                var ret = '';
                if(typeof s == 'function'){
                    ret = s.call();
                }else if(typeof s == 'object'){
                    for(var p in s){
                        ret+= p +':'+s[p]+';';
                    }
                }else if(typeof s == 'string'){
                    ret = s + ';';
                }
                return ret;
            };
            var itemKey = Ext.id(null,'sbx-item');
            var box = new Ext.ux.form.SuperBoxSelectItem({
                owner: this,
                disabled: this.disabled,
                renderTo: this.wrapEl,
                cls: this.extraItemCls + ' ' + itemClass,
                style: parseStyle(this.extraItemStyle) + ' ' + itemStyle,
                caption: itemCaption,
                display: itemDisplay,
                value:  itemVal,
                key: itemKey,
                listeners: {
                    'remove': function(item){
                        if(this.fireEvent('beforeremoveitem',this,item.value) === false){
                            return;
                        }
                        this.items.removeKey(item.key);
                        if(this.removeValuesFromStore){
                            if(this.usedRecords.containsKey(item.value)){
                                this.store.add(this.usedRecords.get(item.value));
                                this.usedRecords.removeKey(item.value);
                                this.sortStore();
                                if(this.view){
                                    this.view.render();
                                }
                            }
                        }
                        if(!this.preventMultipleRemoveEvents){
                            this.fireEvent.defer(250,this,['removeitem',this,item.value, this.findInStore(item.value)]);
                        }
                    },
                    destroy: function(){
                        this.collapse();
                        this.autoSize().manageClearBtn().validateValue();
                    },
                    scope: this
                }
            });
            box.render();
    
            if (! this.disabled) {
                box.hidden = this.el.insertSibling({
                    tag:'input', 
                    type:'hidden', 
                    value: itemVal,
                    name: (this.hiddenName || this.name)
                },'before');
            }
            else {
                box.hidden = this.el.insertSibling({
                    tag:'input', 
                    type:'hidden', 
                    value: itemVal,
                    name: (this.hiddenName || this.name),
                    disabled:'disabled'
                },'before');        
            }

Thread Participants: 119

  1. galdaka (9 Posts)
  2. aconran (1 Post)
  3. stever (4 Posts)
  4. dj (1 Post)
  5. mystix (18 Posts)
  6. MarkB (3 Posts)
  7. DrZog (1 Post)
  8. JorisA (2 Posts)
  9. jheid (3 Posts)
  10. Joe (1 Post)
  11. mschering (1 Post)
  12. gigel (1 Post)
  13. akannu (1 Post)
  14. phillipL (1 Post)
  15. badgerd (1 Post)
  16. cmendez21 (1 Post)
  17. mjlecomte (1 Post)
  18. grgur (1 Post)
  19. xantus (1 Post)
  20. garraS (3 Posts)
  21. vahid4134 (2 Posts)
  22. Lloyd K (2 Posts)
  23. boonkerz (3 Posts)
  24. crxtech (3 Posts)
  25. mishanian (7 Posts)
  26. fpw23 (1 Post)
  27. sanjshah (6 Posts)
  28. Zolcsi (1 Post)
  29. SharePat (1 Post)
  30. mjhaston (1 Post)
  31. radtad (16 Posts)
  32. Joyfulbob (2 Posts)
  33. kveeiv (1 Post)
  34. armandoxxx (2 Posts)
  35. imran (1 Post)
  36. Eric24 (1 Post)
  37. drunknmunky (1 Post)
  38. raphac (1 Post)
  39. charleshimmer (1 Post)
  40. frankthetank (4 Posts)
  41. qooleot (3 Posts)
  42. gianpaulo (1 Post)
  43. dennispg (9 Posts)
  44. dasnk (1 Post)
  45. grahamda (1 Post)
  46. sdavids (1 Post)
  47. jasonb885 (1 Post)
  48. wemerson.januario (1 Post)
  49. dizor (3 Posts)
  50. Stju (5 Posts)
  51. extjs_new (1 Post)
  52. senacle (1 Post)
  53. elderotaku (2 Posts)
  54. Dumas (1 Post)
  55. grzegorz.borkowski (13 Posts)
  56. bueth (1 Post)
  57. nonyus (2 Posts)
  58. travisbell (2 Posts)
  59. Jangla (2 Posts)
  60. woooop (2 Posts)
  61. MH61 (2 Posts)
  62. TDub (1 Post)
  63. antoniode (5 Posts)
  64. xiongzhijian51 (1 Post)
  65. l0ga4 (1 Post)
  66. nohurge (2 Posts)
  67. MarkBOneSmart (1 Post)
  68. The Transporter (2 Posts)
  69. swarnendude (1 Post)
  70. arconen (2 Posts)
  71. mratzloff (9 Posts)
  72. Tom23 (1 Post)
  73. nadim (15 Posts)
  74. hongtj (2 Posts)
  75. max.hauser (2 Posts)
  76. dcw (1 Post)
  77. pilotsnipes (2 Posts)
  78. matthewcrist (2 Posts)
  79. fargs (1 Post)
  80. dvuja2 (2 Posts)
  81. sudhirhv (1 Post)
  82. lanhun (2 Posts)
  83. galoch (1 Post)
  84. frrogoy (1 Post)
  85. tboswell (1 Post)
  86. ozum (5 Posts)
  87. scusyxx (1 Post)
  88. hoca (1 Post)
  89. jayasreepc (1 Post)
  90. Jensen (1 Post)
  91. icarey (5 Posts)
  92. mohan_b (1 Post)
  93. skbach_pointyhat (1 Post)
  94. timbonicus (3 Posts)
  95. rachid.abdessamad (1 Post)
  96. ajitmogra (1 Post)
  97. Korbin (1 Post)
  98. istetska (3 Posts)
  99. ian.young (1 Post)
  100. muncher (2 Posts)
  101. sebterzi (2 Posts)
  102. forestclown (1 Post)
  103. Akey (1 Post)
  104. pret (1 Post)
  105. OpnSrce (1 Post)
  106. sriramkumarp (1 Post)
  107. extjs-dev (4 Posts)
  108. mvoss (1 Post)
  109. thomaskee007 (1 Post)
  110. rajshinny (1 Post)
  111. masood (1 Post)
  112. sebholl (1 Post)
  113. forestkwan (1 Post)
  114. deepthi_r (1 Post)
  115. panshr (1 Post)
  116. brian.moeskau (1 Post)
  117. ldashevskiy (1 Post)
  118. lbilde (1 Post)
  119. aoyii (1 Post)

Tags for this Thread