|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectorg.javalid.external.jsf.JsfSupport
public class JsfSupport
Utility class for JSF.
Changes for 1.0.1:
| Field Summary | |
|---|---|
static java.lang.String |
KEY_ANNOTATION_VALIDATOR_LOCATION
See JsfFacadeShared, this one is here for backwards compatibility only. |
static java.lang.String |
KEY_JSF_CONFIGURATION_LOCATION
See JsfFacadeShared, this one is here for backwards compatibility only. |
| Method Summary | |
|---|---|
static java.lang.String |
addJsfExpressionTag(java.lang.String value)
This method adds an expression tag around given value, thus #{value}. |
static javax.faces.application.FacesMessage |
createFacesMessage(java.util.ResourceBundle bundle,
java.lang.String jvMessage,
java.lang.Object[] paramValues,
java.util.Locale locale)
Creates a new faces message. |
static javax.faces.application.FacesMessage |
createFacesMessage(java.util.ResourceBundle bundle,
java.lang.String jvMessage,
java.lang.Object[] paramValues,
java.util.Locale locale,
javax.faces.application.FacesMessage.Severity severity)
Creates a new faces message. |
static java.lang.ClassLoader |
getCurrentClassLoader()
Returns the classloader to use, by default the current thread's classloader otherwise the one of this class. |
static JsfFacade |
getJsfFacade()
Returns the current loaded jsf facade that is used by this class. |
static java.util.ResourceBundle |
getResourceBundle(java.util.Locale locale,
java.lang.String bundleName)
Returns the ResourceBundle, raises JvException if no ResourceBundle was found. |
static java.util.ResourceBundle |
getResourceBundleFromJsfConfiguration(javax.faces.context.FacesContext context,
java.util.Locale locale)
Convenience method, which loads the resource bundle that was defined in the jv jsf configuration file. |
static boolean |
isJsfExpression(java.lang.String value)
Checks if given value starts with #{ or ${ and ends with }, like a jsf expression. |
static AnnotationValidator |
locateAnnotationValidator(javax.faces.context.FacesContext context)
Deprecated. Will be removed in the next major release, use JsfFacadeShared instead. |
static JsfConfigurationDeclarative |
locateJsfConfiguration(javax.faces.context.FacesContext context)
This method attempts to locate the JsfConfiguration, does NOT initiate one. |
static java.lang.String |
stripJsfTagFromExpression(java.lang.String expression)
Removes expression accolades from expression. |
static boolean |
validateUsingJsfConfiguration(javax.faces.context.FacesContext ctx,
AnnotationValidator validator,
JsfConfigurationDeclarative jsfConfig,
java.lang.String bundleName)
Performs validation of a business object using given validator. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public static final java.lang.String KEY_ANNOTATION_VALIDATOR_LOCATION
JsfFacadeShared,
Constant Field Valuespublic static final java.lang.String KEY_JSF_CONFIGURATION_LOCATION
JsfFacadeShared,
Constant Field Values| Method Detail |
|---|
public static final java.util.ResourceBundle getResourceBundle(java.util.Locale locale,
java.lang.String bundleName)
locale - the Locale to get the bundle inbundleName - Fully qualified bundlename (properties file)
public static final boolean isJsfExpression(java.lang.String value)
value - The value to check
JsfFacadeShared.isExpression(java.lang.String)public static final java.lang.String stripJsfTagFromExpression(java.lang.String expression)
expression - The expression to strip off #{}
JsfFacadeShared.removeExpression(java.lang.String)public static final java.lang.String addJsfExpressionTag(java.lang.String value)
value - The value to add an expression tag to
JsfFacadeShared.addExpression(java.lang.String)
public static final javax.faces.application.FacesMessage createFacesMessage(java.util.ResourceBundle bundle,
java.lang.String jvMessage,
java.lang.Object[] paramValues,
java.util.Locale locale)
bundle - The bundle to use to lookup jvMessage (that's a .properties code)jvMessage - The message (code) to lookup in the bundleparamValues - Values to format the message with (if any, can be null)locale - The locale to use for the message formatter
public static final javax.faces.application.FacesMessage createFacesMessage(java.util.ResourceBundle bundle,
java.lang.String jvMessage,
java.lang.Object[] paramValues,
java.util.Locale locale,
javax.faces.application.FacesMessage.Severity severity)
bundle - The bundle to use to lookup jvMessage (that's a .properties code)jvMessage - The message (code) to lookup in the bundleparamValues - Values to format the message with (if any, can be null)locale - The locale to use for the message formatterseverity - Set the severity of this message
public static final boolean validateUsingJsfConfiguration(javax.faces.context.FacesContext ctx,
AnnotationValidator validator,
JsfConfigurationDeclarative jsfConfig,
java.lang.String bundleName)
ctx - The context to usevalidator - The annotationvalidator to use herejsfConfig - The configuration information about the jsf-support extensionbundleName - The bundleName to use (to get the messages from)
public static final AnnotationValidator locateAnnotationValidator(javax.faces.context.FacesContext context)
context - The facescontext to check
JavalidException - if the validator could not be foundJsfFacadeShared.findAnnotationValidator(javax.faces.context.FacesContext)public static final JsfConfigurationDeclarative locateJsfConfiguration(javax.faces.context.FacesContext context)
context - The facescontext to check
JavalidException - if the JsfConfiguration could not be found
public static final java.util.ResourceBundle getResourceBundleFromJsfConfiguration(javax.faces.context.FacesContext context,
java.util.Locale locale)
context - The context to uselocale - The locale to get the bundle in
JavalidException - Raised if the bundle was not foundpublic static final java.lang.ClassLoader getCurrentClassLoader()
public static final JsfFacade getJsfFacade()
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||