|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.day.cq.wcm.foundation.forms.ValidationHelper
public class ValidationHelper
Helper class for the forms components for validation.
| Method Summary | |
|---|---|
static void |
checkConstraint(org.apache.sling.api.SlingHttpServletRequest request,
org.apache.sling.api.SlingHttpServletResponse response,
org.apache.sling.api.resource.Resource resource)
Convenience method to check the constraint of a form element. |
static boolean |
checkRequired(org.apache.sling.api.SlingHttpServletRequest request,
org.apache.sling.api.resource.Resource resource)
Convenience method to check the required flag of a form element. |
static String |
getConstraintMessage(org.apache.sling.api.resource.Resource resource)
Return the constraint message for this element. |
static String |
getFormElementQualifier(org.apache.sling.api.SlingHttpServletRequest request,
org.apache.sling.api.resource.Resource resource)
|
static String |
getRequiredMessage(org.apache.sling.api.resource.Resource resource)
Return the required message for this element. |
static ValidationInfo |
getValidationInfo(org.apache.sling.api.SlingHttpServletRequest request)
Return the current validation info for server side validation |
static boolean |
hasValidationInfo(javax.servlet.http.HttpServletRequest request)
Check if there are validation errors for the current request. |
static void |
writeConstraintCheck(org.apache.sling.api.SlingHttpServletRequest request,
org.apache.sling.api.SlingHttpServletResponse response,
org.apache.sling.api.resource.Resource resource,
javax.servlet.jsp.JspWriter out)
|
static void |
writeRegexpText(org.apache.sling.api.SlingHttpServletRequest request,
org.apache.sling.api.resource.Resource resource,
String regexp,
javax.servlet.jsp.JspWriter out)
|
static void |
writeRequiredCheck(org.apache.sling.api.SlingHttpServletRequest request,
org.apache.sling.api.resource.Resource resource,
javax.servlet.jsp.JspWriter out)
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Method Detail |
|---|
public static ValidationInfo getValidationInfo(org.apache.sling.api.SlingHttpServletRequest request)
request - The current request
public static boolean hasValidationInfo(javax.servlet.http.HttpServletRequest request)
request - The curren t request.
true if there are validation errors.public static String getRequiredMessage(org.apache.sling.api.resource.Resource resource)
resource - The form element resource.
public static String getConstraintMessage(org.apache.sling.api.resource.Resource resource)
resource - The form element resource.
public static boolean checkRequired(org.apache.sling.api.SlingHttpServletRequest request,
org.apache.sling.api.resource.Resource resource)
request - resource - The form element resource.
public static void checkConstraint(org.apache.sling.api.SlingHttpServletRequest request,
org.apache.sling.api.SlingHttpServletResponse response,
org.apache.sling.api.resource.Resource resource)
throws IOException,
javax.servlet.ServletException
request - resource - The form element resource.
IOException
javax.servlet.ServletException
public static void writeRequiredCheck(org.apache.sling.api.SlingHttpServletRequest request,
org.apache.sling.api.resource.Resource resource,
javax.servlet.jsp.JspWriter out)
throws IOException
IOException
public static String getFormElementQualifier(org.apache.sling.api.SlingHttpServletRequest request,
org.apache.sling.api.resource.Resource resource)
public static void writeConstraintCheck(org.apache.sling.api.SlingHttpServletRequest request,
org.apache.sling.api.SlingHttpServletResponse response,
org.apache.sling.api.resource.Resource resource,
javax.servlet.jsp.JspWriter out)
throws IOException,
javax.servlet.ServletException
IOException
javax.servlet.ServletException
public static void writeRegexpText(org.apache.sling.api.SlingHttpServletRequest request,
org.apache.sling.api.resource.Resource resource,
String regexp,
javax.servlet.jsp.JspWriter out)
throws IOException
IOException
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||