net.sf.yavtags
Class YavConfig

java.lang.Object
  extended by net.sf.yavtags.YavConfig

public class YavConfig
extends java.lang.Object

Class to store YAV configuration (values in yav-config.js). These values can be overwritten via Yavconfig init parameters. To overwrite i18n messages use i18n configuration.


Field Summary
protected  java.lang.String alnumhyphen_regex
           
protected  java.lang.String alnumhyphenat_regex
           
protected  java.lang.String alphabetic_regex
          change to set your own rules based on regular expressions
protected  java.lang.String alphanumeric_regex
           
protected  java.lang.String alphaspace_regex
           
protected  java.lang.String DATE_FORMAT
           
protected  boolean debugmode
          if you want yav to alert you for javascript errors (only for developers)
protected  char DECIMAL_SEP
          change to set your own decimal separator and your date format
protected  java.lang.String email_regex
           
protected  java.lang.String errorsdiv
          div name where errors (and help) will appear (or where jsVar variable is dinamically defined)
protected  java.lang.String innererror
          classname you want for the inner error highlighting
protected  java.lang.String innerhelp
          classname you want for the inner help highlighting
protected  java.lang.String inputclasserror
          classname you want for the error highlighting
protected  java.lang.String inputclassnormal
          classname you want for your fields without highlighting
protected  boolean inputhighlight
          if you want yav to highligh fields with errors
protected  boolean multipleclassname
          if you want to use multiple class names
protected  char RULE_SEP
          change to set your own rule separator
protected  char THOUSAND_SEP
           
protected  boolean trimenabled
          if you want yav to trim the strings
 
Constructor Summary
protected YavConfig()
           
  YavConfig(javax.servlet.FilterConfig config)
          Reads configuration from config init parameters and creates this inmutable object.
 
Method Summary
 java.lang.String getAlnumhyphen_regex()
           
 java.lang.String getAlnumhyphenat_regex()
           
 java.lang.String getAlphabetic_regex()
           
 java.lang.String getAlphanumeric_regex()
           
 java.lang.String getAlphaspace_regex()
           
 java.lang.String getDATE_FORMAT()
           
 char getDECIMAL_SEP()
           
static YavConfig getDefaultConfig()
           
 java.lang.String getEmail_regex()
           
 java.lang.String getErrorsdiv()
           
 java.lang.String getInnererror()
           
 java.lang.String getInnerhelp()
           
 java.lang.String getInputclasserror()
           
 java.lang.String getInputclassnormal()
           
 java.lang.String getJavascriptCode()
           
 char getRULE_SEP()
           
 char getTHOUSAND_SEP()
           
 boolean isDebugmode()
           
 boolean isInputhighlight()
           
 boolean isMultipleclassname()
           
 boolean isTrimenabled()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

inputhighlight

protected boolean inputhighlight
if you want yav to highligh fields with errors


multipleclassname

protected boolean multipleclassname
if you want to use multiple class names


inputclasserror

protected java.lang.String inputclasserror
classname you want for the error highlighting


inputclassnormal

protected java.lang.String inputclassnormal
classname you want for your fields without highlighting


innererror

protected java.lang.String innererror
classname you want for the inner error highlighting


innerhelp

protected java.lang.String innerhelp
classname you want for the inner help highlighting


errorsdiv

protected java.lang.String errorsdiv
div name where errors (and help) will appear (or where jsVar variable is dinamically defined)


debugmode

protected boolean debugmode
if you want yav to alert you for javascript errors (only for developers)


trimenabled

protected boolean trimenabled
if you want yav to trim the strings


DECIMAL_SEP

protected char DECIMAL_SEP
change to set your own decimal separator and your date format


THOUSAND_SEP

protected char THOUSAND_SEP

DATE_FORMAT

protected java.lang.String DATE_FORMAT

alphabetic_regex

protected java.lang.String alphabetic_regex
change to set your own rules based on regular expressions


alphanumeric_regex

protected java.lang.String alphanumeric_regex

alnumhyphen_regex

protected java.lang.String alnumhyphen_regex

alnumhyphenat_regex

protected java.lang.String alnumhyphenat_regex

alphaspace_regex

protected java.lang.String alphaspace_regex

email_regex

protected java.lang.String email_regex

RULE_SEP

protected char RULE_SEP
change to set your own rule separator

Constructor Detail

YavConfig

protected YavConfig()

YavConfig

public YavConfig(javax.servlet.FilterConfig config)
Reads configuration from config init parameters and creates this inmutable object.

Method Detail

getDefaultConfig

public static YavConfig getDefaultConfig()

getJavascriptCode

public java.lang.String getJavascriptCode()

getDATE_FORMAT

public java.lang.String getDATE_FORMAT()

getDECIMAL_SEP

public char getDECIMAL_SEP()

getRULE_SEP

public char getRULE_SEP()

getTHOUSAND_SEP

public char getTHOUSAND_SEP()

getAlnumhyphen_regex

public java.lang.String getAlnumhyphen_regex()

getAlnumhyphenat_regex

public java.lang.String getAlnumhyphenat_regex()

getAlphabetic_regex

public java.lang.String getAlphabetic_regex()

getAlphanumeric_regex

public java.lang.String getAlphanumeric_regex()

getAlphaspace_regex

public java.lang.String getAlphaspace_regex()

isDebugmode

public boolean isDebugmode()

getEmail_regex

public java.lang.String getEmail_regex()

getErrorsdiv

public java.lang.String getErrorsdiv()

getInnererror

public java.lang.String getInnererror()

getInnerhelp

public java.lang.String getInnerhelp()

getInputclasserror

public java.lang.String getInputclasserror()

getInputclassnormal

public java.lang.String getInputclassnormal()

isInputhighlight

public boolean isInputhighlight()

isMultipleclassname

public boolean isMultipleclassname()

isTrimenabled

public boolean isTrimenabled()