public class LayoutHelper extends Object
| Modifier and Type | Method and Description |
|---|---|
static void |
printDescription(String fieldId,
String descr,
Writer out)
Print the description
If
fieldId is set the description will be enclosed in a label
for accessibility. |
static void |
printDescription(String descr,
Writer out)
Print the description
The
description is encoded using
StringEscapeUtils.escapeHtml4(String) before it is written to
the Writer. |
static void |
printErrors(SlingHttpServletRequest request,
String fieldName,
boolean hideLabel,
Writer out)
Print all errors (if there are any.) If there are error messages for this
field, a div for each error message is created.
|
static boolean |
printErrors(SlingHttpServletRequest request,
String fieldName,
boolean hideLabel,
Writer out,
int valueIndex)
Print all errors (if there are any.) If there are error messages for this
field, a div for each error message is created.
|
static void |
printErrors(SlingHttpServletRequest request,
String fieldName,
Writer out)
Print all errors (if there are any.) If there are error messages for this
field, a div for each error message is created.
|
static boolean |
printErrors(SlingHttpServletRequest request,
String fieldName,
Writer out,
int valueIndex)
Print all errors (if there are any.) If there are error messages for this
field, a div for each error message is created.
|
static void |
printTitle(String fieldId,
String title,
boolean required,
boolean hideLabel,
Writer out)
Print the left column, title and required.
|
static void |
printTitle(String fieldId,
String title,
boolean required,
Writer out)
Print the left column, title and required.
|
public static void printTitle(String fieldId, String title, boolean required, Writer out) throws IOException
title is encoded using
StringEscapeUtils.escapeHtml4(String) before it is written to
the Writer.fieldId - The id of the field (not the name) - This can be null if
title is null.title - The title of the field (or null)required - Flag indicating if this field is required.out - The writer.IOException - If writing fails.public static void printTitle(String fieldId, String title, boolean required, boolean hideLabel, Writer out) throws IOException
title is encoded using
StringEscapeUtils.escapeHtml4(String) before it is written to
the Writer.fieldId - The id of the field (not the name) - This can be null if
title is null.title - The title of the field (or null)required - Flag indicating if this field is required.hideLabel - Option to completely hide the label (removes form_leftcollabel and form_leftcolmark
divs content)out - The writer.IOException - If writing fails.public static void printDescription(String descr, Writer out) throws IOException
description is encoded using
StringEscapeUtils.escapeHtml4(String) before it is written to
the Writer.descr - The description of the field (or null)out - The writer.IOException - If writing fails.public static void printDescription(String fieldId, String descr, Writer out) throws IOException
fieldId is set the description will be enclosed in a label
for accessibility. This facility should only be used when the field has no
title, or the title is not used as a label for some reason.
The description is encoded using
StringEscapeUtils.escapeHtml4(String) before it is written to
the Writer.fieldId - Field id.descr - The description of the field (or null)out - The writer.IOException - If writing fails.public static void printErrors(SlingHttpServletRequest request, String fieldName, Writer out) throws IOException
printTitle(String, String, boolean, Writer) is
called and a third inner div with the message and the classes
form_rightcol and form_error is created.request - The current request.fieldName - The name of the field (not the id!)out - The writer.IOException - If writing fails.public static boolean printErrors(SlingHttpServletRequest request, String fieldName, Writer out, int valueIndex) throws IOException
printTitle(String, String, boolean, Writer) is
called and a third inner div with the message and the classes
form_rightcol and form_error is created.request - The current request.fieldName - The name of the field (not the id!)out - The writer.valueIndex - value indextrue if an error has been printed (since 5.5)IOException - If writing fails.public static void printErrors(SlingHttpServletRequest request, String fieldName, boolean hideLabel, Writer out) throws IOException
printTitle(String, String, boolean, Writer) is
called and a third inner div with the message and the classes
form_rightcol and form_error is created.request - The current request.fieldName - The name of the field (not the id!)hideLabel - Option to completely hide the label (removes form_leftcollabel and form_leftcolmark
divs content)out - The writer.IOException - If writing fails.public static boolean printErrors(SlingHttpServletRequest request, String fieldName, boolean hideLabel, Writer out, int valueIndex) throws IOException
printTitle(String, String, boolean, Writer) is
called and a third inner div with the message and the classes
form_rightcol and form_error is created.request - The current request.fieldName - The name of the field (not the id!)hideLabel - Option to completely hide the label (removes form_leftcollabel and form_leftcolmark
divs content)out - The writer.valueIndex - value indextrue if an error has been printed (since 5.5)IOException - If writing fails.Copyright © 2010 - 2020 Adobe. All Rights Reserved