Flowing the Magnolia Issue http://jira.magnolia-cms.com/browse/MGNLUI-2974 
Seems to me like this ticket should remain open as the FileTransformer fails in 
the following call.  Am I missing any configuration or is there a reason why my 
field won't work?

[code]
    /**
     * Defines the root item used to retrieve and create child items.
     */
    protected JcrNodeAdapter getRootItem() {
        return (JcrNodeAdapter) relatedFormItem;
    }
[/code]

The AbstractCustomMultiField.createLocalField method is creating a NullItem 
although the transformer is expecting a JcrNodeAdapter intance.


Here is the bootstrap xml I'm using on my form:

[code]
<sv:node sv:name="resource_2">
                <sv:property sv:name="jcr:primaryType" sv:type="Name">
                  <sv:value>mgnl:contentNode</sv:value>
                </sv:property>
                <sv:property sv:name="jcr:mixinTypes" sv:type="Name" 
sv:multiple="true">
                  <sv:value>mix:lockable</sv:value>
                </sv:property>
                <sv:property sv:name="jcr:uuid" sv:type="String">
                  <sv:value>2b863fc6-fb50-4675-b665-d4d8d3552e55</sv:value>
                </sv:property>
                <sv:property sv:name="class" sv:type="String">
                  
<sv:value>info.magnolia.ui.form.field.definition.SwitchableFieldDefinition</sv:value>
                </sv:property>
                <sv:property sv:name="transformerClass" sv:type="String">
                  
<sv:value>info.magnolia.ui.form.field.transformer.composite.SwitchableTransformer</sv:value>
                </sv:property>
                <sv:property sv:name="label" sv:type="String">
                  <sv:value>Document Resource</sv:value>
                </sv:property>
                <sv:property sv:name="mgnl:created" sv:type="Date">
                  <sv:value>2014-10-31T12:28:00.826+03:00</sv:value>
                </sv:property>
                <sv:property sv:name="mgnl:createdBy" sv:type="String">
                  <sv:value>superuser</sv:value>
                </sv:property>
                <sv:property sv:name="mgnl:lastActivated" sv:type="Date">
                  <sv:value>2014-10-31T12:28:00.857+03:00</sv:value>
                </sv:property>
                <sv:property sv:name="mgnl:lastActivatedBy" sv:type="String">
                  <sv:value>superuser</sv:value>
                </sv:property>
                <sv:property sv:name="mgnl:lastModified" sv:type="Date">
                  <sv:value>2014-10-31T12:28:00.826+03:00</sv:value>
                </sv:property>
                <sv:property sv:name="mgnl:lastModifiedBy" sv:type="String">
                  <sv:value>superuser</sv:value>
                </sv:property>
                <sv:property sv:name="required" sv:type="String">
                  <sv:value>true</sv:value>
                </sv:property>
                <sv:node sv:name="options">
                  <sv:property sv:name="jcr:primaryType" sv:type="Name">
                    <sv:value>mgnl:contentNode</sv:value>
                  </sv:property>
                  <sv:property sv:name="jcr:mixinTypes" sv:type="Name" 
sv:multiple="true">
                    <sv:value>mix:lockable</sv:value>
                  </sv:property>
                  <sv:property sv:name="jcr:uuid" sv:type="String">
                    <sv:value>1a583267-792e-4390-bea2-444c81811fa2</sv:value>
                  </sv:property>
                  <sv:property sv:name="mgnl:created" sv:type="Date">
                    <sv:value>2014-10-31T12:28:00.826+03:00</sv:value>
                  </sv:property>
                  <sv:property sv:name="mgnl:createdBy" sv:type="String">
                    <sv:value>superuser</sv:value>
                  </sv:property>
                  <sv:property sv:name="mgnl:lastActivated" sv:type="Date">
                    <sv:value>2014-10-31T12:28:00.857+03:00</sv:value>
                  </sv:property>
                  <sv:property sv:name="mgnl:lastActivatedBy" sv:type="String">
                    <sv:value>superuser</sv:value>
                  </sv:property>
                  <sv:property sv:name="mgnl:lastModified" sv:type="Date">
                    <sv:value>2014-10-31T12:28:00.826+03:00</sv:value>
                  </sv:property>
                  <sv:property sv:name="mgnl:lastModifiedBy" sv:type="String">
                    <sv:value>superuser</sv:value>
                  </sv:property>
                  <sv:node sv:name="upload">
                    <sv:property sv:name="jcr:primaryType" sv:type="Name">
                      <sv:value>mgnl:contentNode</sv:value>
                    </sv:property>
                    <sv:property sv:name="jcr:mixinTypes" sv:type="Name" 
sv:multiple="true">
                      <sv:value>mix:lockable</sv:value>
                    </sv:property>
                    <sv:property sv:name="jcr:uuid" sv:type="String">
                      <sv:value>fc874e9b-b7ca-494a-b2de-12ffc74ad588</sv:value>
                    </sv:property>
                    <sv:property sv:name="mgnl:created" sv:type="Date">
                      <sv:value>2014-10-31T12:28:00.826+03:00</sv:value>
                    </sv:property>
                    <sv:property sv:name="mgnl:createdBy" sv:type="String">
                      <sv:value>superuser</sv:value>
                    </sv:property>
                    <sv:property sv:name="mgnl:lastActivated" sv:type="Date">
                      <sv:value>2014-10-31T12:28:00.857+03:00</sv:value>
                    </sv:property>
                    <sv:property sv:name="mgnl:lastActivatedBy" 
sv:type="String">
                      <sv:value>superuser</sv:value>
                    </sv:property>
                    <sv:property sv:name="mgnl:lastModified" sv:type="Date">
                      <sv:value>2014-10-31T12:28:00.826+03:00</sv:value>
                    </sv:property>
                    <sv:property sv:name="mgnl:lastModifiedBy" sv:type="String">
                      <sv:value>superuser</sv:value>
                    </sv:property>
                    <sv:property sv:name="label" sv:type="String">
                      <sv:value>Upload Resource</sv:value>
                    </sv:property>
                    <sv:property sv:name="selected" sv:type="Boolean">
                      <sv:value>true</sv:value>
                    </sv:property>
                    <sv:property sv:name="value" sv:type="String">
                      <sv:value>upload_resource</sv:value>
                    </sv:property>
                  </sv:node>
                  <sv:node sv:name="url_reference">
                    <sv:property sv:name="jcr:primaryType" sv:type="Name">
                      <sv:value>mgnl:contentNode</sv:value>
                    </sv:property>
                    <sv:property sv:name="jcr:mixinTypes" sv:type="Name" 
sv:multiple="true">
                      <sv:value>mix:lockable</sv:value>
                    </sv:property>
                    <sv:property sv:name="jcr:uuid" sv:type="String">
                      <sv:value>1bff4e94-d214-4caa-93b1-ae8a9a27dd97</sv:value>
                    </sv:property>
                    <sv:property sv:name="mgnl:created" sv:type="Date">
                      <sv:value>2014-10-31T12:28:00.826+03:00</sv:value>
                    </sv:property>
                    <sv:property sv:name="mgnl:createdBy" sv:type="String">
                      <sv:value>superuser</sv:value>
                    </sv:property>
                    <sv:property sv:name="mgnl:lastActivated" sv:type="Date">
                      <sv:value>2014-10-31T12:28:00.857+03:00</sv:value>
                    </sv:property>
                    <sv:property sv:name="mgnl:lastActivatedBy" 
sv:type="String">
                      <sv:value>superuser</sv:value>
                    </sv:property>
                    <sv:property sv:name="mgnl:lastModified" sv:type="Date">
                      <sv:value>2014-10-31T12:28:00.826+03:00</sv:value>
                    </sv:property>
                    <sv:property sv:name="mgnl:lastModifiedBy" sv:type="String">
                      <sv:value>superuser</sv:value>
                    </sv:property>
                    <sv:property sv:name="label" sv:type="String">
                      <sv:value>External URL</sv:value>
                    </sv:property>
                    <sv:property sv:name="selected" sv:type="Boolean">
                      <sv:value>true</sv:value>
                    </sv:property>
                    <sv:property sv:name="value" sv:type="String">
                      <sv:value>url_resource</sv:value>
                    </sv:property>
                  </sv:node>
                </sv:node>
                <sv:node sv:name="fields">
                  <sv:property sv:name="jcr:primaryType" sv:type="Name">
                    <sv:value>mgnl:contentNode</sv:value>
                  </sv:property>
                  <sv:property sv:name="jcr:mixinTypes" sv:type="Name" 
sv:multiple="true">
                    <sv:value>mix:lockable</sv:value>
                  </sv:property>
                  <sv:property sv:name="jcr:uuid" sv:type="String">
                    <sv:value>e8af5609-5965-4509-a0e9-cf24279205d2</sv:value>
                  </sv:property>
                  <sv:property sv:name="mgnl:created" sv:type="Date">
                    <sv:value>2014-10-31T12:28:00.826+03:00</sv:value>
                  </sv:property>
                  <sv:property sv:name="mgnl:createdBy" sv:type="String">
                    <sv:value>superuser</sv:value>
                  </sv:property>
                  <sv:property sv:name="mgnl:lastActivated" sv:type="Date">
                    <sv:value>2014-10-31T12:28:00.857+03:00</sv:value>
                  </sv:property>
                  <sv:property sv:name="mgnl:lastActivatedBy" sv:type="String">
                    <sv:value>superuser</sv:value>
                  </sv:property>
                  <sv:property sv:name="mgnl:lastModified" sv:type="Date">
                    <sv:value>2014-10-31T12:28:00.826+03:00</sv:value>
                  </sv:property>
                  <sv:property sv:name="mgnl:lastModifiedBy" sv:type="String">
                    <sv:value>superuser</sv:value>
                  </sv:property>
                  
                  
                  <sv:node sv:name="upload_resource">
                    <sv:property sv:name="jcr:primaryType" sv:type="Name">
                      <sv:value>mgnl:contentNode</sv:value>
                    </sv:property>
                    <sv:property sv:name="jcr:mixinTypes" sv:type="Name" 
sv:multiple="true">
                      <sv:value>mix:lockable</sv:value>
                    </sv:property>
                    <sv:property sv:name="name" sv:type="String">
                      <sv:value>upload_resource</sv:value>
                    </sv:property>
                    <sv:property sv:name="jcr:uuid" sv:type="String">
                      <sv:value>351b2160-fd12-428a-bf09-82e443dc4dbe</sv:value>
                    </sv:property>
                    <sv:property sv:name="binaryNodeName" sv:type="String">
                      <sv:value>jcr:content</sv:value>
                    </sv:property>
                    <sv:property sv:name="allowedMimeTypePattern" 
sv:type="String">
                      <sv:value>application.*(pdf|doc)</sv:value>
                    </sv:property>
                    <sv:property sv:name="class" sv:type="String">
                      
<sv:value>info.magnolia.ui.form.field.definition.BasicUploadFieldDefinition</sv:value>
                    </sv:property>
                    <sv:property sv:name="editFileFormat" sv:type="String">
                      <sv:value>false</sv:value>
                    </sv:property>
                    <sv:property sv:name="editFileName" sv:type="String">
                      <sv:value>true</sv:value>
                    </sv:property>
                    <sv:property sv:name="jcr:createdBy" sv:type="String">
                      <sv:value>admin</sv:value>
                    </sv:property>
                    <sv:property sv:name="mgnl:activationStatus" 
sv:type="Boolean">
                      <sv:value>false</sv:value>
                    </sv:property>
                    <sv:property sv:name="mgnl:created" sv:type="Date">
                      <sv:value>2014-10-31T12:28:00.826+03:00</sv:value>
                    </sv:property>
                    <sv:property sv:name="mgnl:createdBy" sv:type="String">
                      <sv:value>superuser</sv:value>
                    </sv:property>
                    <sv:property sv:name="mgnl:lastActivated" sv:type="Date">
                      <sv:value>2014-10-31T12:28:00.857+03:00</sv:value>
                    </sv:property>
                    <sv:property sv:name="mgnl:lastActivatedBy" 
sv:type="String">
                      <sv:value>superuser</sv:value>
                    </sv:property>
                    <sv:property sv:name="mgnl:lastModified" sv:type="Date">
                      <sv:value>2014-10-31T12:33:16.050+03:00</sv:value>
                    </sv:property>
                    <sv:property sv:name="mgnl:lastModifiedBy" sv:type="String">
                      <sv:value>superuser</sv:value>
                    </sv:property>
                    <sv:property sv:name="preview" sv:type="String">
                      <sv:value>true</sv:value>
                    </sv:property>
                    <sv:property sv:name="description" sv:type="String">
                      <sv:value>Select an PDF file to import</sv:value>
                    </sv:property>
                  </sv:node>
                  
                  
                  
                  <sv:node sv:name="url_resource">
                    <sv:property sv:name="jcr:primaryType" sv:type="Name">
                      <sv:value>mgnl:contentNode</sv:value>
                    </sv:property>
                    <sv:property sv:name="jcr:mixinTypes" sv:type="Name" 
sv:multiple="true">
                      <sv:value>mix:lockable</sv:value>
                    </sv:property>
                    <sv:property sv:name="jcr:uuid" sv:type="String">
                      <sv:value>7fbb70a1-17db-4b51-837d-f7d1e6f3b9e7</sv:value>
                    </sv:property>
                    <sv:property sv:name="class" sv:type="String">
                      
<sv:value>info.magnolia.ui.form.field.definition.TextFieldDefinition</sv:value>
                    </sv:property>
                    <sv:property sv:name="label" sv:type="String">
                      <sv:value>External URL</sv:value>
                    </sv:property>
                    <sv:property sv:name="jcr:createdBy" sv:type="String">
                      <sv:value>admin</sv:value>
                    </sv:property>
                    <sv:property sv:name="maxLength" sv:type="String">
                      <sv:value>100</sv:value>
                    </sv:property>
                    <sv:property sv:name="mgnl:activationStatus" 
sv:type="Boolean">
                      <sv:value>false</sv:value>
                    </sv:property>
                    <sv:property sv:name="mgnl:created" sv:type="Date">
                      <sv:value>2014-10-31T12:28:00.826+03:00</sv:value>
                    </sv:property>
                    <sv:property sv:name="mgnl:createdBy" sv:type="String">
                      <sv:value>superuser</sv:value>
                    </sv:property>
                    <sv:property sv:name="mgnl:lastActivated" sv:type="Date">
                      <sv:value>2014-10-31T12:28:00.861+03:00</sv:value>
                    </sv:property>
                    <sv:property sv:name="mgnl:lastActivatedBy" 
sv:type="String">
                      <sv:value>superuser</sv:value>
                    </sv:property>
                    <sv:property sv:name="mgnl:lastModified" sv:type="Date">
                      <sv:value>2014-10-31T12:45:12.364+03:00</sv:value>
                    </sv:property>
                    <sv:property sv:name="mgnl:lastModifiedBy" sv:type="String">
                      <sv:value>superuser</sv:value>
                    </sv:property>
                    <sv:property sv:name="name" sv:type="String">
                      <sv:value>url_resource</sv:value>
                    </sv:property>
                    <sv:property sv:name="required" sv:type="String">
                      <sv:value>true</sv:value>
                    </sv:property>
                  </sv:node>
                </sv:node>
              </sv:node>
[/code]

-- 
Context is everything: 
http://forum.magnolia-cms.com/forum/thread.html?threadId=8ddce47f-a9f6-4380-bf8c-bc204df2c3d1


----------------------------------------------------------------
For list details, see http://www.magnolia-cms.com/community/mailing-lists.html
Alternatively, use our forums: http://forum.magnolia-cms.com/
To unsubscribe, E-mail to: <[email protected]>
----------------------------------------------------------------

Reply via email to