Results 1 to 3 of 3

Thread: Dot notation with Ext.form fields' name config option

Hybrid View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Ext User ilker's Avatar
    Join Date
    Sep 2008
    Posts
    115
    Vote Rating
    0
      0  

    Question 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,246
    Vote Rating
    118
      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
      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...

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •