How to add multiple rootPath in Coral 3 Pathfield ? It currently allows only one rootPath. I need 2 or 3 different rootPath to be shown for selection.
Look at the docs here - https://techrevel.blog/2017/05/26/coral-3-granite-ui-components/
This data type only supports a string, not multiple strings.
Yes, it only supports a String ie. only one rootPath. But is there any way I can override this and allow multiple rootPaths to be used with pathField component ?
Views
Replies
Total Likes
You will need to overlay/extend this component...
- Overlay /libs/granite/ui/components/coral/foundation/picker/picker.jsp to accept multifield.
- Overlay /libs/granite/ui/components/coral/foundation/picker/picker.jsp to check for multiple root paths instead of single, in method "getCrumbs".
Views
Replies
Total Likes
Views
Replies
Total Likes
FYI, Not a good idea from 6.4 onward because picker is marked as granite:FinalArea, so you can't overlay.
Though you can take a reference and create your own resourceType from OOTB pathfield in 6.4 e.g. /apps/granite/ui/components/coral/foundation/form/pathfieldmulti
Final (granite:FinalArea) - Defines a node as final. Nodes classified as final cannot be overlaid or inherited. Final nodes can be used directly via sling:resourceType. Subnodes under final node are considered internal by default
Or you can allow root of all the path and put dialog validation, if path is not choose from desired paths dialog wouldn't be submitted.
Views
Replies
Total Likes
Views
Likes
Replies
Views
Likes
Replies
Views
Likes
Replies
Views
Likes
Replies