Expand my Community achievements bar.

Learn about Edge Delivery Services in upcoming GEM session

Multifield Values not sent correctly as params in an ajax call during dialog post

Avatar

Level 2

Hi I have a custom dialog defined by the below configuration. 

var dialogConfig = CQ.Util.applyDefaults({
                                                 title: CQ.I18n.getMessage("Create Tag"),
                                                 formUrl: CQ.tagging.TagAdmin.TAG_COMMAND_URL,
                                                 params: {
                                                     cmd: "createTag",
                                                     tagBasePath:this.tagsBasePath
                                                 },
                                                 okText: CQ.I18n.getMessage("Create"),
                                                 items: {
                                                     xtype: "panel",
                                                     items: [
                                                         {
                                                             name: "jcr:title",
                                                             fieldLabel: CQ.I18n.getMessage("Title"),
                                                             allowBlank: false
                                                         },
                                                         {
                                                             name: "tag",
                                                             fieldLabel: CQ.I18n.getMessage("Name"),
                                                             vtype: "itemname",
                                                             allowBlank: false
                                                         },
                                                         {


                                                             name:"bundle",
                                                             fieldLabel: CQ.I18n.getMessage("Select Pages to be bundled"),
                                                             xtype: "multifield",
                                                             fieldConfig: {
                                                                 xtype: "pathfield"
                                                             }
                                                        },
                                                        {
                                                             name: "jcr:description",
                                                             fieldLabel: CQ.I18n.getMessage("Description"),
                                                             xtype: "textarea"
                                                         }
                                                     ]
                                                 }
                                             }, CQ.tagging.TagAdmin.baseDialogConfig);

I am trying to customize the tagging dialog to introduce a new pathfield and call a servlet upon submit. However, my ajax call request source is not proper as shown below. The multifield values are getting passed as separate strings rather than an array of strings. How do I fix this so that I send a single array of strings as a request parameter?

    1. cmd:
      createTag
    2. tagBasePath:
      /etc/bundles
    3. _charset_:
      utf-8
    4. :status:
      browser
    5. jcr:title:
      Test Tag
    6. tag:
      Test
    7. bundle:
      /content/catalogs
    8. bundle:
      /content/geometrixx-outdoors-mobile
    9. bundle@Delete:
       
    10. jcr:description:
      Desc

 

Thanks,

Ravi

0 Replies