title: Multifield component in AEM - values are not saved
body: <p>I'm trying to do <strong>multifield</strong> component here. When I enter values in fields, they are present on page and everything works fine. When I reopen component to edit existing data, it's empty like there were no values entered (they still appear on site) at all.
  Here is code from my dialog.xml:</p>
  
  <pre><code>    &lt;?xml version="1.0" encoding="UTF-8"?&gt;
  &lt;jcr:root xmlns:sling="http://sling.apache.org/jcr/sling/1.0" xmlns:cq="http://www.day.com/jcr/cq/1.0" xmlns:jcr="http://www.jcp.org/jcr/1.0" xmlns:nt="http://www.jcp.org/jcr/nt/1.0"
            jcr:primaryType="nt:unstructured"
            jcr:title="Multifield TouchUI Component"
            sling:resourceType="cq/gui/components/authoring/dialog"
            helpPath="en/cq/current/wcm/default_components.html#Text"&gt;
      &lt;content
          jcr:primaryType="nt:unstructured"
          sling:resourceType="granite/ui/components/foundation/container"&gt;
          &lt;layout
              jcr:primaryType="nt:unstructured"
              sling:resourceType="granite/ui/components/foundation/layouts/fixedcolumns"/&gt;
          &lt;items jcr:primaryType="nt:unstructured"&gt;
              &lt;column
                  jcr:primaryType="nt:unstructured"
                  sling:resourceType="granite/ui/components/foundation/container"&gt;
                  &lt;items jcr:primaryType="nt:unstructured"&gt;
                      &lt;fieldset
                          jcr:primaryType="nt:unstructured"
                          jcr:title="Footer"
                          sling:resourceType="granite/ui/components/foundation/form/fieldset"&gt;
                          &lt;layout
                              jcr:primaryType="nt:unstructured"
                              sling:resourceType="granite/ui/components/foundation/layouts/fixedcolumns"/&gt;
                          &lt;items jcr:primaryType="nt:unstructured"&gt;
                              &lt;column
                                  jcr:primaryType="nt:unstructured"
                                  sling:resourceType="granite/ui/components/foundation/container"&gt;
                                  &lt;items jcr:primaryType="nt:unstructured"&gt;
                                      &lt;dashboard
                                          jcr:primaryType="nt:unstructured"
                                          sling:resourceType="granite/ui/components/foundation/form/textfield"
                                          fieldDescription="Enter Headline"
                                          fieldLabel="Headline"
                                          name="./headline"/&gt;
                                      &lt;groups
                                          jcr:primaryType="nt:unstructured"
                                          sling:resourceType="granite/ui/components/foundation/form/multifield"
                                          class="full-width"
                                          fieldDescription="Click '+' to add a new page"
                                          fieldLabel="Groups"&gt;
                                          &lt;field
                                              jcr:primaryType="nt:unstructured"
                                              sling:resourceType="granite/ui/components/foundation/form/fieldset"
                                              eaem-nested=""
                                              name="./groups"&gt;
                                              &lt;layout
                                                  jcr:primaryType="nt:unstructured"
                                                  sling:resourceType="granite/ui/components/foundation/layouts/fixedcolumns"
                                                  method="absolute"/&gt;
                                              &lt;items jcr:primaryType="nt:unstructured"&gt;
                                                  &lt;column
                                                      jcr:primaryType="nt:unstructured"
                                                      sling:resourceType="granite/ui/components/foundation/container"&gt;
                                                      &lt;items jcr:primaryType="nt:unstructured"&gt;
                                                          &lt;country
                                                              jcr:primaryType="nt:unstructured"
                                                              sling:resourceType="granite/ui/components/foundation/form/textfield"
                                                              fieldDescription="Enter headline of this group"
                                                              fieldLabel="Headline"
                                                              name="./headline"/&gt;
                                                          &lt;states
                                                              jcr:primaryType="nt:unstructured"
                                                              sling:resourceType="granite/ui/components/foundation/form/multifield"
                                                              class="full-width"
                                                              fieldDescription="Click '+' to add a new page"
                                                              fieldLabel="Sites"&gt;
                                                              &lt;field
                                                                  jcr:primaryType="nt:unstructured"
                                                                  sling:resourceType="granite/ui/components/foundation/form/fieldset"
                                                                  name="./sites"&gt;
                                                                  &lt;layout
                                                                      jcr:primaryType="nt:unstructured"
                                                                      sling:resourceType="granite/ui/components/foundation/layouts/fixedcolumns"
                                                                      method="absolute"/&gt;
                                                                  &lt;items jcr:primaryType="nt:unstructured"&gt;
                                                                      &lt;column
                                                                          jcr:primaryType="nt:unstructured"
                                                                          sling:resourceType="granite/ui/components/foundation/container"&gt;
                                                                          &lt;items jcr:primaryType="nt:unstructured"&gt;
                                                                              &lt;state
                                                                                  jcr:primaryType="nt:unstructured"
                                                                                  sling:resourceType="granite/ui/components/foundation/form/textfield"
                                                                                  fieldDescription="Enter name of specific site"
                                                                                  fieldLabel="Site Name"
                                                                                  name="./site"/&gt;
                                                                              &lt;path
                                                                                  jcr:primaryType="nt:unstructured"
                                                                                  sling:resourceType="granite/ui/components/foundation/form/pathbrowser"
                                                                                  fieldDescription="Select Path"
                                                                                  fieldLabel="Path"
                                                                                  name="./path"
                                                                                  rootPath="/content"/&gt;
                                                                          &lt;/items&gt;
                                                                      &lt;/column&gt;
                                                                  &lt;/items&gt;
                                                              &lt;/field&gt;
                                                          &lt;/states&gt;
                                                      &lt;/items&gt;
                                                  &lt;/column&gt;
                                              &lt;/items&gt;
                                          &lt;/field&gt;
                                      &lt;/groups&gt;
                                  &lt;/items&gt;
                              &lt;/column&gt;
                          &lt;/items&gt;
                      &lt;/fieldset&gt;
                  &lt;/items&gt;
              &lt;/column&gt;
          &lt;/items&gt;
      &lt;/content&gt;
  &lt;/jcr:root&gt;
  </code></pre>
  
  <p>I know that there are some solutions using <em>widgets, xtype and ext.js</em> (ClassicUI), but I want to do it with <strong>granite/coral</strong> (TouchUI). As I researched the problem is that I should save values from every field as <strong>child nodes</strong>, but I do not understand how because examples are (as I noticed) same as code provided above.</p>
  
  <p>If there is no help with this example, I would also be grateful if someone share their solution of <strong>multifield</strong> component that actually saves content author's input.</p>
  
  <p>Also, if someone think that there is no such option in <strong>TouchUI</strong>, feel free to leave comment although that makes no sense.</p>