Expand my Community achievements bar.

SOLVED

component question

Avatar

Level 3

The developer is presented with a component "Component A" which inherits from a component "Component B".
The dialog of Component A on path ../cq:dialog/../../items looks like:
+ align
- jcr:primaryType="nt:unstructured"
- sling:resourceType="granite/ui/components/coral/foundation/form/select"
- fieldLabel="Align Text"
- name="./align"
The dialog of Component B on path ../cq:dialog/../../items looks like:
+ title
- jcr:primaryType="nt:unstructured"
- sling:resourceType="granite/ui/components/coral/foundation/form/textarea"
- fieldLabel="Title"
- name="./title"
+ description

- jcr:primaryType="nt:unstructured"
- sling:resourceType="granite/ui/components/coral/foundation/form/textarea"
- fieldLabel="Description"
- name="./description"
The requirement for the dialog is that the *Align Text* field is shown after the *Title* field. What should the developer do without changing Component B?
A. Move the align node from Component A to Component B and order them according the requirements.
B. Move all the nodes under the item node from Component B to Component A and order them according the requirements.
C. Extend Component B with the functionality of Component A
D. Add the property sling:orderBefore="description" to the align node.

 

Which one option is correct?

1 Accepted Solution

Avatar

Correct answer by
Employee Advisor

Option D.
FYI 
Syntax: sling:orderBefore=<#NODENAME#> (here nodeName = description)

Thanks,

Milind

View solution in original post

4 Replies

Avatar

Correct answer by
Employee Advisor

Option D.
FYI 
Syntax: sling:orderBefore=<#NODENAME#> (here nodeName = description)

Thanks,

Milind