我正在迁移经典ui对话框以触摸ui对话框,迁移了父组件对话框,我观察到AEM也显示了子组件中的父对话框选项卡和属性。在现有的经典ui对话框中,它不继承父属性,而在触摸ui中则继承父属性。
通过防止对话框继承,我们如何在touch ui中实现相同的经典ui行为。
如果有人有关于这个问题的信息,请分享详细信息。
发布于 2015-09-17 16:06:34
可以使用sling:hideChildren
属性隐藏继承的选项卡和属性。例如,假设您希望隐藏继承的permissions
和cloudservices
选项卡,并自定义basic
和advanced
选项卡:
...
<items jcr:primaryType="nt:unstructured">
<tabs
...>
<layout
.../>
<items
jcr:primaryType="nt:unstructured"
sling:hideChildren="[permissions,cloudservices]">
<basic
.../>
<advanced
.../>
</items>
</tabs>
</items>
...
发布于 2015-09-17 16:39:32
与AEM文档合并的Sling资源可以找到这里。特别是查看资源合并属性的文档,以及如何操作不同的属性。
资源合并提供了以下属性:
sling:hideProperties (String或String[])指定要隐藏的属性或属性列表。通配符*隐藏所有。
sling:hideResource (布尔值)指示是否应该完全隐藏资源,包括其子资源。
sling:hideChildren (String或String[])包含要隐藏的子节点或子节点列表。将维护节点的属性。通配符*隐藏所有。
sling:orderBefore (String)包含当前节点应位于其前面的同级节点的名称。
这些属性影响覆盖/覆盖(通常在/libs中)如何使用相应/原始资源/属性(来自/apps)。
发布于 2017-07-14 07:21:39
添加
sling:hideChildren性质
到子组件的对话框。
可以将此属性添加到需要隐藏的特定字段集/选项卡/字段的直系亲属中。
语法:
属性名称:吊索:隐藏儿童
属性类型:字符串或String[]
属性值:直接子级的名称,*隐藏它们
示例:
若要隐藏以下对话框的“属性”选项卡下的所有字段,请执行以下操作:
<content
jcr:primaryType="nt:unstructured"
sling:resourceType="granite/ui/components/coral/foundation/container">
<items jcr:primaryType="nt:unstructured">
<fixedcolums
jcr:primaryType="nt:unstructured"
sling:resourceType="granite/ui/components/coral/foundation/fixedcolumns">
<items jcr:primaryType="nt:unstructured">
<properties
jcr:primaryType="nt:unstructured"
sling:resourceType="granite/ui/components/coral/foundation/container">
<items jcr:primaryType="nt:unstructured">
<startLevel
jcr:primaryType="nt:unstructured"
sling:resourceType="granite/ui/components/coral/foundation/form/numberfield"
../>
<showHidden
jcr:primaryType="nt:unstructured"
sling:resourceType="granite/ui/components/coral/foundation/form/checkbox"
../>
</items>
</properties>
</items>
</fixedcolums>
</items>
</content>
将sling:hideChildren属性添加到其直接父节点,即项(参见下面)
<content
jcr:primaryType="nt:unstructured"
sling:resourceType="granite/ui/components/coral/foundation/container">
<items jcr:primaryType="nt:unstructured">
<fixedcolums
jcr:primaryType="nt:unstructured"
sling:resourceType="granite/ui/components/coral/foundation/fixedcolumns">
<items jcr:primaryType="nt:unstructured"
sling:hideChildren="*">
<properties
jcr:primaryType="nt:unstructured"
sling:resourceType="granite/ui/components/coral/foundation/container">
<items jcr:primaryType="nt:unstructured">
<startLevel
jcr:primaryType="nt:unstructured"
sling:resourceType="granite/ui/components/coral/foundation/form/numberfield"
../>
<showHidden
jcr:primaryType="nt:unstructured"
sling:resourceType="granite/ui/components/coral/foundation/form/checkbox"
../>
</items>
</properties>
</items>
</fixedcolums>
</items>
</content>
若要仅隐藏startLevel字段,请将sling:hideChildren属性添加到其直接父节点(请参见下面)
<content
jcr:primaryType="nt:unstructured"
sling:resourceType="granite/ui/components/coral/foundation/container">
<items jcr:primaryType="nt:unstructured">
<fixedcolums
jcr:primaryType="nt:unstructured"
sling:resourceType="granite/ui/components/coral/foundation/fixedcolumns">
<items jcr:primaryType="nt:unstructured">
<properties
jcr:primaryType="nt:unstructured"
sling:resourceType="granite/ui/components/coral/foundation/container">
<items jcr:primaryType="nt:unstructured"
sling:hideChildren="startLevel">
<startLevel
jcr:primaryType="nt:unstructured"
sling:resourceType="granite/ui/components/coral/foundation/form/numberfield"
../>
<showHidden
jcr:primaryType="nt:unstructured"
sling:resourceType="granite/ui/components/coral/foundation/form/checkbox"
../>
</items>
</properties>
</items>
</fixedcolums>
</items>
</content>
https://stackoverflow.com/questions/32622443
复制相似问题