Nested multifield for components | Community
Skip to main content
Love_Sharma
New Participant
December 7, 2015
Solved

Nested multifield for components

  • December 7, 2015
  • 5 replies
  • 4244 views

Hi All,

I am using custom xtype making 3 textfield as multifield. Data saved under content node is 

{"groupId" : "1", "groupName" : "Manager", "groupInformation" : "Managers"}

Now, under one textfield I want another multifield for two text field so output should be 

{"groupId" : "1", "groupName" : "Manager", "groupInformation" : {"roleType" : "Managers", "rolechange" : "associate"} }

I am returning data in above format from my extjs file and want to achieve result in return function in extjs only.

Thanks

This post is no longer active and is closed to new replies. Need help? Start a new post to ask your question.
Best answer by smacdonald2008

You get values that an author enters into a nested multifield using JSP code. 

This is all explained in this article: 

Creating Adobe Experience Manager Components that use Nested Multifields

Hope this helps 

5 replies

Love_Sharma
New Participant
December 8, 2015

Hi smacdonald2008,

I already tried this link but not working for me.

In above code I am referring to external extjs and trying to set values in my current extjs like

setValue: function(value) {

        var link = JSON.parse(value);
        this.groupId.setValue(link.groupId);
        this.groupName.setValue(link.groupName);
        this.displayName.setValue(link.displayName);
        this.workerTypeID.setValue(link.workerTypeID);        /// Values are coming undefined
        this.workerTypeName.setValue(link.workerTypeName);    
 /// Values are coming undefined
        this.hiddenField.setValue(value);
    },

I am looking for a way to reterive these values and set like the structure mention above in my previous post.

 

Thanks

smacdonald2008
smacdonald2008Accepted solution
New Participant
December 7, 2015

You get values that an author enters into a nested multifield using JSP code. 

This is all explained in this article: 

Creating Adobe Experience Manager Components that use Nested Multifields

Hope this helps 

Love_Sharma
New Participant
December 7, 2015

Hi,

I am able to create nested multifeld in dialog

by adding something like

//define the inner multifield
        this.userData = new CQ.form.MultiField({
            fieldLabel: "User Data",
            fieldDescription: "Click '+' to add your Skills",
            width: 400,
            fieldConfig: {
                  "xtype": "customtextPathField",
                  allowBlank: false,
            },

              listeners: {
                  change: {
                        scope: this,
                        fn: this.updateHidden
                    }
                }
            });
            this.add(this.userData);

 

But how to get and set values of "user Data in extjs" ?

kautuk_sahni
Employee
December 7, 2015
edubey
New Participant
December 7, 2015

Hi, 

Can you elaborate want to achieve result in return function in extjs only.

Thanks