【发布时间】:2017-02-27 20:08:21
【问题描述】:
我尝试配置dialog with a Multivalue field containing a composite field。
但是,我收到以下错误:
在 info.magnolia.ui.form.field.MultiField$1 中调用方法 buttonClick 失败。
【问题讨论】:
标签: configuration dialog magnolia
我尝试配置dialog with a Multivalue field containing a composite field。
但是,我收到以下错误:
在 info.magnolia.ui.form.field.MultiField$1 中调用方法 buttonClick 失败。
【问题讨论】:
标签: configuration dialog magnolia
正如a similar question on Magnolia Forum 中指出的,问题出在配置树中。
我在对话框树的错误级别上有 2 个配置节点。
它很深,所以必须注意配置错误。
<?xml version="1.0" encoding="UTF-8"?>
<sv:node sv:name="tabEvents" xmlns:sv="http://www.jcp.org/jcr/sv/1.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<sv:property sv:name="jcr:primaryType" sv:type="Name">
<sv:value>mgnl:contentNode</sv:value>
</sv:property>
<sv:property sv:name="jcr:uuid" sv:type="String">
<sv:value>90ad1aeb-ea0c-448b-b323-c727d6a47fc9</sv:value>
</sv:property>
<sv:property sv:name="jcr:createdBy" sv:type="String">
<sv:value>admin</sv:value>
</sv:property>
<sv:property sv:name="label" sv:type="String">
<sv:value>Events</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>2016-10-18T16:15:34.890+02: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>2016-10-18T16:15:34.891+02: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>2016-10-18T16:16:13.118+02: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="fields">
<sv:property sv:name="jcr:primaryType" sv:type="Name">
<sv:value>mgnl:contentNode</sv:value>
</sv:property>
<sv:property sv:name="jcr:uuid" sv:type="String">
<sv:value>c28bd951-0455-4fa8-a373-0d837c21e6c7</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>2016-10-18T16:15:34.890+02: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>2016-10-18T16:15:34.892+02: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>2016-10-18T16:15:43.016+02: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="events">
<sv:property sv:name="jcr:primaryType" sv:type="Name">
<sv:value>mgnl:contentNode</sv:value>
</sv:property>
<sv:property sv:name="jcr:uuid" sv:type="String">
<sv:value>e778e569-0def-4416-8db3-c827c01229bf</sv:value>
</sv:property>
<sv:property sv:name="class" sv:type="String">
<sv:value>info.magnolia.ui.form.field.definition.MultiValueFieldDefinition</sv:value>
</sv:property>
<sv:property sv:name="jcr:createdBy" sv:type="String">
<sv:value>admin</sv:value>
</sv:property>
<sv:property sv:name="label" sv:type="String">
<sv:value>Events</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>2016-10-18T16:15:34.890+02: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>2016-10-18T16:15:34.892+02: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>2016-10-18T16:16:30.044+02: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="transformerClass" sv:type="String">
<sv:value>info.magnolia.ui.form.field.transformer.multi.MultiValueSubChildrenNodePropertiesTransformer</sv:value>
</sv:property>
<sv:node sv:name="field">
<sv:property sv:name="jcr:primaryType" sv:type="Name">
<sv:value>mgnl:contentNode</sv:value>
</sv:property>
<sv:property sv:name="jcr:uuid" sv:type="String">
<sv:value>696d2cb1-58a4-4851-a167-253b8a47ca72</sv:value>
</sv:property>
<sv:property sv:name="class" sv:type="String">
<sv:value>info.magnolia.ui.form.field.definition.CompositeFieldDefinition</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>2016-10-18T16:15:34.890+02: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>2016-10-18T16:15:34.892+02: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>2016-10-18T16:15:56.610+02: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="transformerClass" sv:type="String">
<sv:value>info.magnolia.ui.form.field.transformer.composite.NoOpCompositeTransformer</sv:value>
</sv:property>
<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:uuid" sv:type="String">
<sv:value>283d22e5-add7-4183-a11d-d93976cd15e0</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>2016-10-18T16:15:34.890+02: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>2016-10-18T16:15:34.892+02: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>2016-10-18T16:15:56.610+02: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="eventName">
<sv:property sv:name="jcr:primaryType" sv:type="Name">
<sv:value>mgnl:contentNode</sv:value>
</sv:property>
<sv:property sv:name="jcr:uuid" sv:type="String">
<sv:value>122bcb52-6d85-4fcc-b8e3-ea7ab531f8f5</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="jcr:createdBy" sv:type="String">
<sv:value>admin</sv:value>
</sv:property>
<sv:property sv:name="label" sv:type="String">
<sv:value>Name</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>2016-10-18T16:15:34.890+02: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>2016-10-18T16:15:34.894+02: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>2016-10-18T16:17:32.365+02:00</sv:value>
</sv:property>
<sv:property sv:name="mgnl:lastModifiedBy" sv:type="String">
<sv:value>superuser</sv:value>
</sv:property>
</sv:node>
<sv:node sv:name="eventArtists">
<sv:property sv:name="jcr:primaryType" sv:type="Name">
<sv:value>mgnl:contentNode</sv:value>
</sv:property>
<sv:property sv:name="jcr:uuid" sv:type="String">
<sv:value>ca110ecb-1f72-4c8f-8d22-e83046bd9d14</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="jcr:createdBy" sv:type="String">
<sv:value>admin</sv:value>
</sv:property>
<sv:property sv:name="label" sv:type="String">
<sv:value>Artists (i.e. Prince, The Fugees)</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>2016-10-18T16:15:34.890+02: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>2016-10-18T16:15:34.896+02: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>2016-10-18T16:18:21.871+02:00</sv:value>
</sv:property>
<sv:property sv:name="mgnl:lastModifiedBy" sv:type="String">
<sv:value>superuser</sv:value>
</sv:property>
</sv:node>
</sv:node>
</sv:node>
</sv:node>
</sv:node>
</sv:node>
[#if content.events?has_content]
[#list cmsfn.children(content.events) as eventItem]
${eventItem.eventName!}: ${eventItem.eventArtists!}.<br/>
[/#list]
[/#if]
wiki.magnolia-cms.com/display/DEV/Multi+Value+Field
documentation.magnolia-cms.com/display/DOCS/Multivalue+field
【讨论】: