Aem 如何在Colorfield中设置默认颜色
我有一个Aem 如何在Colorfield中设置默认颜色,aem,Aem,我有一个颜色字段作为背景色,我在项目中提供了一组不同的颜色,如下所示- <backgroundColor jcr:primaryType="nt:unstructured" sling:resourceType="granite/ui/components/coral/foundation/form/colorfield" showDefaultColors="{Boolean}false" text=&qu
颜色字段
作为背景色,我在项目中提供了一组不同的颜色,如下所示-
<backgroundColor jcr:primaryType="nt:unstructured" sling:resourceType="granite/ui/components/coral/foundation/form/colorfield"
showDefaultColors="{Boolean}false"
text="Background Color"
fieldLabel="Background Color"
name="./backgroundColor"
showProperties="{Boolean}false">
<items jcr:primaryType="nt:unstructured">
<white jcr:primaryType="nt:unstructured" value="#FFFFFF"/>
<black jcr:primaryType="nt:unstructured" value="#000000"/>
<hugo-blue jcr:primaryType="nt:unstructured" value="#D8F1FF"/>
<hugo-brown jcr:primaryType="nt:unstructured" value="#451A0C"/>
<hugo-cream jcr:primaryType="nt:unstructured" value="#F6F6EC"/>
<hugo-green jcr:primaryType="nt:unstructured" value="#AECDC7"/>
<hugo-gray jcr:primaryType="nt:unstructured" value="#3C3C3C"/>
</items>
</backgroundColor>
我想将雨果绿设置为默认颜色。我尝试了
defaultValue
,但它只适用于firSelect
。我怎样才能做到?我们可以在AEM 6.5的颜色字段组件中设置默认颜色吗?是的,我们可以通过添加值(字符串)来设置颜色字段的默认颜色。所提及的值将作为默认值
对话框属性字段:-
具有默认值的对话框颜色字段:-
参考:好的。。!!非常感谢你!!