Your achievements

Level 1

0% to

Level 2

Tip /
Sign in

Sign in to Community

to gain points, level up, and earn exciting badges like the new
BedrockMission!

Learn more

View all

Sign in to view all badges

SOLVED

Nested multifield for components

Love_Sharma
Level 4
Level 4

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

1 Accepted Solution
smacdonald2008
Correct answer by
Level 10
Level 10

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 

View solution in original post

5 Replies
edubey
Level 10
Level 10

Hi, 

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

Thanks

Love_Sharma
Level 4
Level 4

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" ?

smacdonald2008
Correct answer by
Level 10
Level 10

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 

View solution in original post

Love_Sharma
Level 4
Level 4

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