Dialog ====== .. granite:servercomponent:: /libs/granite/ui/components/foundation/layouts/dialog :layout: :deprecated: The layout to render dialog. The dialog is designed to expand to the container size, thus it is required to be contained in the container that has a size. It has the following content structure at the layout resource: .. gnd:gnd:: [granite:LayoutsDialog] /** * The layout style of the form. This property only makes sense when the main component is a form. * * vertical * The form fields (and their labels) are laid out in vertical manner. * aligned * The each form field is laid out side-by-side with its label. */ - formStyle (String) = 'vertical' < 'vertical', 'aligned' It has the following content structure at the main resource: .. gnd:gnd:: [granite:LayoutsDialogMain] /** * The dialog title. */ - jcr:title (String) mandatory i18n /** * The component (usually button) used to cancel the form. */ + cancel /** * The component (usually button) used to submit the form. */ + submit /** * The body of this dialog. */ + content Example:: + mydialog - jcr:title = "My Dialog" - sling:resourceType = "granite/ui/components/foundation/container" + layout - sling:resourceType = "granite/ui/components/foundation/layouts/dialog" + cancel - sling:resourceType = "granite/ui/components/foundation/button" - text = "Cancel" + submit - sling:resourceType = "granite/ui/components/foundation/button" - text = "Submit" + content - sling:resourceType = "granite/ui/components/foundation/container"