1. #11
    Ext User
    Join Date
    Apr 2008
    Posts
    3
    Vote Rating
    0
    robert7 is on a distinguished road

      0  

    Default


    Hello Arnold!
    your extension is really great! It is almost exactly what I was searching for (and could not easily figure out how to do it). So you helped me very much.

    I have a few suggestions for future development:

    1, extract() works for standalone checkboxes and radio buttons, but only gets values true/false. Example: I have 3 radios named "fldA" and the third one is checked: extract() will return: {fldA:[false,false,true]}. Config option "inputValue" of the radios is not taken into account. (Compared to Ext.form.BasicForm.getValues(), which will for 3 radios return one string value specified by "inputValue" of the checked radio field.)

    2, radios wrapped in Ext.form.RadioGroup are not be included in extract(). Same for CheckBoxGroup. Although I don't need "dynamic" checkboxes/radios it would be nice if extract/populate could support them.

    3, horizontal alignment of the plus/minus icons doesn't work for TriggerField (requires just include of 'trigger' xtype in alignIcon())

    4, populate() now requires that even the fields with blank values to be specified in the first parameter (or unlisted fields are not reset to blank values). It may be better if the loop in populate would be over all fields found in specified namespace. Example: form contais 4 fields in namespace XY, incoming parameter for populate specifies only 2 of them, populate should setup 2 listed fields and clear the 2 remaining fields.

    5, it would be more intuitive for the user, if the plus icon were present always on the last clone of the specified field.
    Example: master field is created with "+" icon. After the 1 clone is created, the icon for the first field changes to "-",
    a "+" icon moves to the clone. That means always the last field (master or the last clone has "+") and all previous have "-" icons. But I understand, that it would be more difficult to code.

  2. #12
    Ext User
    Join Date
    Jul 2007
    Posts
    46
    Vote Rating
    0
    arnold is on a distinguished road

      0  

    Default


    Thanks for your extensive and indepth feedback!
    Your absolutely right on the radio buttons and checkboxes. I will look into this
    and include it in the next release. About remark 5. That's doable.

    Just let me know when you have already implemented some of these features.
    When your interested I will merge our implementations and make this a joined effort.

  3. #13
    Sencha User
    Join Date
    Aug 2007
    Posts
    52
    Vote Rating
    0
    jamie.nicholson is on a distinguished road

      0  

    Default FieldSet modified to be similar to gmail Contacts

    FieldSet modified to be similar to gmail Contacts


    Great plugin, didn't quite do what I wanted so I've changed it somewhat.
    Perhaps my changes can be integrated to compliment what you've done with the fieldsets rather than replace it. But I replaced it for now as it was easier to get my head around how it all worked.

    My changes have altered the way the fieldset cloning works, in short the fieldset + tool doesn't clone a fieldset. Instead it clones a row of column, form, fields within a fieldset. Very similar behavior to gmail 'Contacts' edit form.

    Changes have been made to field.js to allow multiple columns within a fieldset

    fieldsets are still configured as dynamic, however they have layout:'column'

    Code:
             dynamic : true,
             maxOccurs:5,
             xtype : 'fieldset',
             layout:'column',
    	 nameSpace:'person',
             autoHeight:true,
    	 width: 600,
    	 listeners : { 'maxoccurs' : {fn: function(fieldset) {
    	       Ext.example.msg('maxoccurs', 'Implement behaviour of maxoccurs');
    	 }}},
    Because you can't define a form element in a column you need to have a nested form with you're desired columnWidth, each form should contain only one field, notice dynamic is no configured
    Code:
    	 items :[{
    				layout:'form',
    				columnWidth:.5,
    				defaultType: 'textfield',
    				items:[{
    					fieldLabel: 'First Name',
    					name: 'first',
    					//dynamic:true,
    				}]
    			},{
    				layout:'form',
    				columnWidth:.5,
    				defaultType: 'textfield',
    				items:[{
    					fieldLabel: 'Last Name',
    					name: 'last',
    				}]
    			}]
    That aside I'll e-mail the other changes to arnold in the Ext.form.FormPanel and Ext.form.FieldSet.
    More updates to come possibly, need to discuss with arnold.

    26-Jun-2009 - updated FormPanel extract so fieldset extract returns array(rows) of objects(fields)
    Attached Images
    Attached Files
    Last edited by jamie.nicholson; 25 Jun 2009 at 1:15 PM. Reason: Updated dynform.zip

  4. #14
    Ext User
    Join Date
    Apr 2008
    Posts
    3
    Vote Rating
    0
    robert7 is on a distinguished road

      0  

    Default


    Hey Jamie!
    Looks great! I also didn't like the dynamic fieldsets, because the duplicated frame taken too much space.
    I implemented diffent aproach to this - trigger field which duplicates as single field and clicking on the trigger open pop/up window which then can be used to edit one "fields set repetition".
    This is handy if the fieldset contains many fields.
    It could be really nice if we can some way merga all the changes!
    Robert

  5. #15
    Ext User
    Join Date
    Apr 2008
    Posts
    3
    Vote Rating
    0
    robert7 is on a distinguished road

      0  

    Default


    Demo of the dynamic trigger fields - another approach to dynamic fieldsets
    Attached Files

  6. #16
    Sencha User
    Join Date
    Aug 2007
    Posts
    52
    Vote Rating
    0
    jamie.nicholson is on a distinguished road

      0  

    Default Tried a bound grid?

    Tried a bound grid?


    You're right I agree, cloning a whole form would be nasty.

    However wouldn't it be better to display that information in a grid and at least have a form popup to edit the info? My preference for 'maintenance' would be to display the summary in a grid and then bind the other information to a form and just have it on an entirely seperate tab, which takes up most of the screen.

    http://extjs.com/deploy/dev/examples...form-grid.html

    My rationale is if you put everything on one page for 'maintenance' it will get to cluttered and confusing for a new user. However if you seperate it out in a new tab it be easier to understand.

    On the display front you could use a portal to summarise the viz information in a protlet->grid or make multiple portlets each containing the relevant viz information.

    That's just my five cents.... don't take it too seriously

  7. #17
    Ext User
    Join Date
    Jul 2009
    Posts
    1
    Vote Rating
    0
    mc2mac is on a distinguished road

      0  

    Default


    This is exactly what I was looking for!
    Thank you

  8. #18
    Ext User
    Join Date
    Feb 2009
    Posts
    3
    Vote Rating
    0
    k_lib is on a distinguished road

      0  

    Default rendering JSON objects into a proxy url

    rendering JSON objects into a proxy url


    Hey all,

    I just used this. It works great but taking the values was such a pain for me. I wanted to give a tip if you were taking the values of this and trying to loop through them to put in a url. It might also help if you were trying to do anything with the values. The main point is that 1 JSON is a string obj and 2 items(clones) are a array.

    I had a form with 2 fields in a fieldset named 'parameters' and 'userInput' using the nameSpace property and 'paras' and 'daInputField' for the names property. this is what i had to do to get the values of those fields...

    Code:
    var panel = Ext.getCmp('panel');
    
    var fparams = panel.extract('Parameters','field');
    var fuserInput = panel.extract('userInput','field');
    
    var t_url = "";
    var sep= "";
    
    //This is what took me forever to figure out because 1 JSON object is a string and 2+ JSON objects are a array!!!!
    
    if(typeof(fparams.Paras) == 'string'){
           //i'm a string
           t_url = fparams.Paras + "=" + fuserInput.daInputField;
    }else{
           //i'm a array
           for(var i=0; i<fparams.Paras.length; i++){
               t_url += sep+ fparams.Paras[i] + "=" + fuserInput.daInputField[i];
               sep = "&";
            }
    }
    
    
    //this is for my project but maybe you do something like this...
    var z_url = proxy.url;
    proxy.url += t_url;
    ds.load();
    proxy.url = z_url;
    t_url = "";
    Again I might have just not known that since this is my first time using JSON but maybe someone else has had the same problem...

    cheers,
    k_lib

  9. #19
    Ext User
    Join Date
    Jul 2009
    Location
    Honolulu, Hawaii
    Posts
    12
    Vote Rating
    0
    sonnyg95 is on a distinguished road

      0  

    Default Removing clones on form reset

    Removing clones on form reset


    Thank you for a great extension!

    There's a few changes I would like to do for it to apply to what I am doing. First was just removing clone labels and that wasn't too bad (just add hideLabel : true to cloneConfig). Another change I would like to do is to delete all clones on a form reset. I've tried adding a removeClones function for Ext.form.formpanel but my limited experience (about a month) in extjs (and javascript) isn't helping me at all. I would greatly appreciate it if somoene could take a look at what I have below and point me to the right direction.

    What I added into Ext.form.FormPanel is removeClones and findFieldsets.

    removeClones that will find fieldsets and then remove them.
    Code:
        
    removeClones : function(ns, xtype) {
    
                var fieldsets = this.findFieldsets();
                
                //iterate through fieldsets and remove clones
                for (var col = fieldsets.length; col > 0; col++) {
                    if (fieldsets[col].isClone()) {
                        fieldsets[col].remove();
                    }
                }
        },
    findFieldsets that should return an array of all fieldsets. I think this is where I am going wrong as this isn't actually returning an array of all fieldset components.
    Code:
     
    findFieldsets : function () {
            return this.findBy(function(cmp) {
                return cmp.isXType('fieldset');
            });
        },
    //rest of code
    Finally, in Jamie.nicholson's Ext.form.Fieldset, I added a check for clones and the actual removal of the fieldset.
    Code:
            isClone : function() {
                if (this.clone) {
                    return true;
                }else {
                    return false;
                }
            },
            remove :     function() {
                if (this.dynamic) {
                    if (this.clone) {
                        var panel = fieldset.ownerCt;
                        panel.remove(fieldset,true);
                        panel.doLayout();
                    }
                }
            },

  10. #20
    Ext JS Premium Member
    Join Date
    Jan 2009
    Posts
    19
    Vote Rating
    0
    tcp is on a distinguished road

      0  

    Default


    I can't explain why but the code no longer seems to work with Ext 3.1 ( FF and Safari ) as there will be a JS error when removing a field. A quick fix seems to be to perform the remove on the panel first, then remove the item. Below is the modified code for Ext.form.Field.js .

    Code:
    listeners : { 'onIcon' : {fn: function(field) {
    	var item = Ext.get(field.el.findParent('.x-form-item'));
    	panel.remove(field);
    	item.remove();
    	panel.doLayout();                                                                                                                        
    }}
    The fieldset shares this problem and a similar solution seems to make it go bye-bye.

    Can anyone else confirm this, or offer a better solution?

Turkiyenin en sevilen filmlerinin yer aldigi xnxx internet sitemiz olan ve porn sex tarzi bir site olan mobil porno izle sitemiz gercekten dillere destan bir durumda herkesin sevdigi bir site olarak tarihe gececege benziyor. Sitenin en belirgin ozelliklerinden birisi de Turkiyede gercekten kaliteli ve muntazam, duzenli porno izle siteleri olmamasidir. Bu yuzden iste. Ayrica en net goruntu kalitesine sahip adresinde yayinlanmaktadir. Mesela diğer sitelerimizden bahsedecek olursak, en iyi hd porno video arşivine sahip bir siteyiz. "The Best anal porn videos and slut anus, big asses movies set..."