-
-
Save besimhu/9c536436da8072dcab2d047410672852 to your computer and use it in GitHub Desktop.
AEM: Dialog field examples (text, multifield, checkbox, ...); documentation: https://docs.adobe.com/docs/en/aem/6-1/ref/granite-ui/api/jcr_root/libs/granite/ui/components/foundation/form/index.html
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<columnLast | |
jcr:primaryType="nt:unstructured" | |
sling:resourceType="granite/ui/components/foundation/form/checkbox" | |
text="Last column in grid?" | |
value="true" | |
name="./columnLast"/> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<hideMismatches | |
jcr:primaryType="nt:unstructured" | |
sling:resourceType="granite/ui/components/coral/foundation/form/checkbox" | |
text="Hide Mismatches" | |
fieldDescription="Check this box to hide dropdown options if they don't match with the user's input" | |
name="./hideMismatches" | |
value="{Boolean}true" | |
uncheckedValue="{Boolean}false"/> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<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> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<fileupload | |
jcr:primaryType="nt:unstructured" | |
jcr:title="Files" | |
sling:resourceType="granite/ui/components/foundation/form/fieldset"> | |
<items jcr:primaryType="nt:unstructured"> | |
<file | |
jcr:primaryType="nt:unstructured" | |
sling:resourceType="granite/ui/components/coral/foundation/form/fileupload" | |
autoStart="{Boolean}true" | |
cq-msm-lockable="/file" | |
fieldLabel="Upload files" | |
mimeTypes="[image/png,image/jpeg,application/pdf]" | |
multiple="{Boolean}false" | |
name="./file" | |
sizeLimit="100000000" | |
text="Upload file" | |
uploadUrl="/content/dam/someurl" | |
uploadUrlBuilder=""/> | |
</items> | |
</fileupload> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<headlines | |
jcr:primaryType="nt:unstructured" | |
sling:resourceType="granite/ui/components/foundation/form/multifield" | |
fieldDescription="Click 'Add field' to add new content dropdown." | |
fieldLabel="Headlines"> | |
<field | |
jcr:primaryType="nt:unstructured" | |
sling:resourceType="granite/ui/components/foundation/form/textfield" | |
required="true" | |
name="./headlines"/> | |
</headlines> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!-- | |
Usage: | |
<sly data-sly-list="${resource.children}"> | |
<sly data-sly-list="${item.children}"> | |
${item.linkText} | |
${item.linkUrl} | |
</sly> | |
</sly> | |
--> | |
<!-- | |
How to define min/max item limit: http://experience-aem.blogspot.com/2018/01/aem-6310-touch-ui-add-min-max-limit-to-coral-3-multifield.html | |
--> | |
<nav | |
sling:resourceType="granite/ui/components/coral/foundation/form/multifield" | |
fieldDescription="Click '+' to add a new link" | |
fieldLabel="Links" | |
jcr:primaryType="nt:unstructured" | |
composite="{Boolean}true"> | |
<field sling:resourceType="granite/ui/components/coral/foundation/container" | |
jcr:primaryType="nt:unstructured" name="./items"> | |
<items jcr:primaryType="nt:unstructured"> | |
<linkText | |
sling:resourceType="granite/ui/components/coral/foundation/form/textfield" | |
fieldLabel="Link Text" | |
jcr:primaryType="nt:unstructured" | |
name="./linkText" /> | |
<linkurl | |
sling:resourceType="granite/ui/components/coral/foundation/form/pathfield" | |
fieldLabel="Link Url" | |
jcr:primaryType="nt:unstructured" | |
name="./linkUrl" /> | |
</items> | |
</field> | |
</nav> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<footernavitems jcr:primaryType="nt:unstructured" | |
sling:resourceType="granite/ui/components/foundation/form/multifield" | |
class="full-width" | |
fieldDescription="Click '+' to add a new link" | |
fieldLabel="Links"> | |
<field jcr:primaryType="nt:unstructured" | |
sling:resourceType="granite/ui/components/foundation/form/fieldset" | |
acs-commons-nested="NODE_STORE" | |
name="./footernavitems"> | |
<layout jcr:primaryType="nt:unstructured" | |
sling:resourceType="granite/ui/components/foundation/layouts/fixedcolumns" | |
method="absolute"/> | |
<items jcr:primaryType="nt:unstructured"> | |
<column jcr:primaryType="nt:unstructured" | |
sling:resourceType="granite/ui/components/foundation/container"> | |
<items jcr:primaryType="nt:unstructured"> | |
<text jcr:primaryType="nt:unstructured" | |
sling:resourceType="granite/ui/components/foundation/form/textfield" | |
fieldLabel="Text" | |
name="./text"/> | |
<link jcr:primaryType="nt:unstructured" | |
sling:resourceType="granite/ui/components/foundation/form/pathbrowser" | |
fieldLabel="Link" | |
name="./link" | |
rootPath="/content/tesla-configurator"/> | |
<hideOnMobile | |
jcr:primaryType="nt:unstructured" | |
sling:resourceType="granite/ui/components/foundation/form/checkbox" | |
text="Hide on mobile?" | |
value="true" | |
name="./hideOnMobile"/> | |
</items> | |
</column> | |
</items> | |
</field> | |
</footernavitems> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<columnWidth | |
jcr:primaryType="nt:unstructured" | |
sling:resourceType="granite/ui/components/foundation/form/numberfield" | |
fieldLabel="Field width in grid" | |
defaultValue="4" | |
min="1" | |
max="12" | |
step="1" | |
name="./columnWidth"/> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<columnWidth | |
jcr:primaryType="nt:unstructured" | |
sling:resourceType="granite/ui/components/coral/foundation/form/numberfield" | |
fieldLabel="Field width in grid" | |
defaultValue="4" | |
min="1" | |
max="12" | |
step="1" | |
name="./columnWidth"/> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<buttonPath | |
jcr:primaryType="nt:unstructured" | |
sling:resourceType="granite/ui/components/foundation/form/pathbrowser" | |
rootPath="/content/" | |
emptyText="Path to target page" | |
fieldLabel="Button Link" | |
name="./buttonPath"/> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<buttonPath | |
jcr:primaryType="nt:unstructured" | |
sling:resourceType="granite/ui/components/coral/foundation/form/pathbrowser" | |
rootPath="/content/" | |
emptyText="Path to target page" | |
fieldLabel="Button Link" | |
name="./buttonPath"/> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
http://stackoverflow.com/questions/34309445/aem-6-1-enable-rich-text-editor-rte-plugins-on-touch-ui | |
------- | |
<longDescriptionText | |
jcr:primaryType="nt:unstructured" | |
sling:resourceType="cq/gui/components/authoring/dialog/richtext" | |
fieldDescription="Sets the description that appears on the profiled person's page." | |
fieldLabel="Long Description*" | |
required="true" | |
useFixedInlineToolbar="{Boolean}true" | |
name="./longDescriptionText"> | |
<rtePlugins jcr:primaryType="nt:unstructured"> | |
<format | |
jcr:primaryType="nt:unstructured" | |
features="[bold,italic]"/> | |
<justify | |
jcr:primaryType="nt:unstructured" | |
features="[]"/> | |
<lists | |
jcr:primaryType="nt:unstructured" | |
features="[]"/> | |
</rtePlugins> | |
</longDescriptionText> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<linkColor | |
jcr:primaryType="nt:unstructured" | |
sling:resourceType="granite/ui/components/foundation/form/select" | |
fieldLabel="Link Color" | |
name="./linkColor"> | |
<items jcr:primaryType="nt:unstructured"> | |
<primary jcr:primaryType="nt:unstructured" | |
text="Primary" | |
value="primary"/> | |
<secondary jcr:primaryType="nt:unstructured" | |
text="Secondary" | |
value="secondary"/> | |
</items> | |
</linkColor> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<linkColor | |
jcr:primaryType="nt:unstructured" | |
sling:resourceType="granite/ui/components/coral/foundation/form/select" | |
fieldLabel="Link Color" | |
name="./linkColor"> | |
<items jcr:primaryType="nt:unstructured"> | |
<primary jcr:primaryType="nt:unstructured" | |
text="Primary" | |
value="primary"/> | |
<secondary jcr:primaryType="nt:unstructured" | |
text="Secondary" | |
value="secondary"/> | |
</items> | |
</linkColor> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<intro | |
jcr:primaryType="nt:unstructured" | |
sling:resourceType="wcm/foundation/components/text" | |
text="Please note that this component is not to be used to include JavaScript or CSS."/> | |
OR | |
<info | |
jcr:primaryType="nt:unstructured" | |
sling:resourceType="granite/ui/components/foundation/text" | |
text="Please note that this component is not to be used to include JavaScript or CSS."/> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<inputgroup | |
jcr:primaryType="nt:unstructured" | |
sling:resourceType="granite/ui/components/coral/foundation/text" | |
text="Enable user sharing for"/> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<html | |
jcr:primaryType="nt:unstructured" | |
sling:resourceType="granite/ui/components/foundation/form/textarea" | |
fieldLabel="HTML" | |
name="./html" | |
required="true"/> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<html | |
jcr:primaryType="nt:unstructured" | |
sling:resourceType="granite/ui/components/coral/foundation/form/textarea" | |
fieldLabel="HTML" | |
name="./html" | |
required="true"/> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<inputExtraCssClass | |
jcr:primaryType="nt:unstructured" | |
sling:resourceType="granite/ui/components/foundation/form/textfield" | |
fieldLabel="Input CSS class" | |
name="./inputExtraCssClass"/> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<carModel | |
jcr:primaryType="nt:unstructured" | |
sling:resourceType="granite/ui/components/coral/foundation/form/textfield" | |
fieldLabel="Model" | |
value="carModel" | |
name="./carModel"/> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment