1. #1
    Ext User ilker's Avatar
    Join Date
    Sep 2008
    Posts
    115
    Vote Rating
    0
    ilker is on a distinguished road

      0  

    Question Dot notation with Ext.form fields' name config option

    Dot notation with Ext.form fields' name config option


    Hi, everyone...i want to use dot notation with values of name config options of form components because of struts BeanUtils.populate method...When the form is submitted it populates my actionform...

    i have used this notation at pure html:
    Code:
    .......
    <input type='hidden' name='employeeType.id' value="1"/>
    .......
    however when i use the same notation with ext.form's fields , the form submission fails due to null value...
    (A piece from my sample code):
    Code:
    this.add({ 
                xtype:'combo',
                name : 'employeeType.id',
                id : 'employeeType.id',
                 fieldLabel : 'Employee Type',
                valueField:'id',
                displayField : 'type',
                mode : 'local',
                store: new Ext.data.Store({ 
                    proxy : new Ext.data.HttpProxy({ 
                            url : 'GetEmployeeTypesAction.do'
                            }),
                    baseParams: { 
                             respObjName: 'empType',
                             javaFields: new Array(('id'),('type')),
                             extFields:     new Array(('id'),('type'))
                            },
                    reader: new Ext.data.JsonReader({ 
                            root: 'empType'
                            }, Ext.data.Record.create([{name: 'id'},{name: 'type'}])),
                    autoLoad : true
                })
            });
    what do i have to do? or what am i doing wrong?
    Thx for your replies in advance

  2. #2
    Sencha - Community Support Team Condor's Avatar
    Join Date
    Mar 2007
    Location
    The Netherlands
    Posts
    24,251
    Vote Rating
    73
    Condor is a splendid one to behold Condor is a splendid one to behold Condor is a splendid one to behold Condor is a splendid one to behold Condor is a splendid one to behold Condor is a splendid one to behold Condor is a splendid one to behold Condor is a splendid one to behold

      0  

    Default


    I assume you want 'hiddenName' instead of 'name'?

  3. #3
    Ext User ilker's Avatar
    Join Date
    Sep 2008
    Posts
    115
    Vote Rating
    0
    ilker is on a distinguished road

      0  

    Question


    Thx for your excellent reply Condor...Besides causing submission failure for combo component, it fails form-submission for other components... for instance, take 'hidden' component:

    Code:
    this.add({ 
                    xtype : 'hidden',
                    name : 'mails[0].eMail',
                    value : mailsStore.getAt(i).get('email')
                });
    Thx for your replies in advance...
    P.S. dot-notation works perfect with poor HTML DOM Elements, likewise Array-Notation does...

Thread Participants: 1

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