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

Using Multifield in AEM Projects Workflow

herbertkb
Level 2
Level 2

Hi community,

I have a requirement where I need to use a multifield in the workflow.

My wizard.xml looks like this:


<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="cq:Page">
  <jcr:content jcr:primaryType="nt:unstructured"
   sling:resourceType="granite/ui/components/coral/foundation/fixedcolumns"
   margin="{Boolean}true">
  <items jcr:primaryType="nt:unstructured">
  <column1 jcr:primaryType="nt:unstructured"
   sling:resourceType="granite/ui/components/coral/foundation/container">
  <items jcr:primaryType="nt:unstructured">
  <details jcr:primaryType="nt:unstructured"
   sling:resourceType="cq/gui/components/projects/admin/card/workflowmodeldetailscard"
   workflowModelPath="${param.modelId}"/>
  </items>
  </column1>
  <column2 jcr:primaryType="nt:unstructured"
   sling:resourceType="granite/ui/components/coral/foundation/container">
  <items jcr:primaryType="nt:unstructured">
  <title jcr:primaryType="nt:unstructured" value="Import"
   sling:resourceType="granite/ui/components/coral/foundation/form/textfield"
   fieldLabel="Title" name="./workflowTitle" required="{Boolean}true"/>
  <description jcr:primaryType="nt:unstructured"
   sling:resourceType="granite/ui/components/coral/foundation/form/textarea"
   fieldLabel="Description" name="./startComment" rows="6"/>


  <pageTitle jcr:primaryType="nt:unstructured"
   sling:resourceType="granite/ui/components/coral/foundation/form/textfield"
   fieldLabel="title" name="./pageTitle" required="{Boolean}true"
   value="Test"/>
  <blueprintTitle jcr:primaryType="nt:unstructured"
   sling:resourceType="granite/ui/components/foundation/form/pathbrowser"
   fieldLabel="Blueprint"
   fieldDescription="Blueprint Description"
   required="{Boolean}true" name="./masterPath" rootPath="/content"
   value="/content/customer/blueprint"/>

  <dataItems
   jcr:primaryType="nt:unstructured"
   sling:resourceType="granite/ui/components/coral/foundation/form/multifield"
   fieldLabel="data fields"
   composite="{Boolean}true"
   class="multifield-full-width">
  <field
   jcr:primaryType="nt:unstructured"
   sling:resourceType="granite/ui/components/coral/foundation/container">
  <items jcr:primaryType="nt:unstructured">
  <dataField1
   jcr:primaryType="nt:unstructured"
   sling:resourceType="granite/ui/components/coral/foundation/form/numberfield"
   fieldLabel="dataField1Label"
   name="./dataField1"
   value="12345"/>
  <dataField2
   jcr:primaryType="nt:unstructured"
   sling:resourceType="granite/ui/components/coral/foundation/form/numberfield"
   fieldLabel="dataField2Label"
   name="./dataField2"
   value="987"/>
  </items>
  </field>
  </dataItems>

  </items>
  </column2>
  </items>
  </jcr:content>
</jcr:root>

And it's either only saving the first field into the Workflow-Metadata or throwing an IllegalArgumentException: InvalidName dataItems@Delete or dataItems/item0/dataField1 if composite="{Boolean}" is added or not added.

Thanks in advance for any help,

Herbert

1 Reply
AK1603
Level 1
Level 1
Did you get any solution for this?