API Overview API Index Package Overview Direct link to this page
JavaOnTracks 0.1.2
  net.jot.web.view. JOTFormParser View Source
Author(s)
thibautc
Since
Version
Serial
Hierarchy
 Object
      JOTViewParser
          JOTFormParser
Implements
Subclasses
Description
public class JOTFormParser
Whwn a form is found withina view, this parser will process it and set/adjust the values of fields etc...
See also:   
Constructors
public JOTFormParser ()
Methods
Hide/Show inherited methods
pack-privatestatic String do1LineBlocks (String template, JOTViewParserData view) throws Exception [Inherited From JOTViewParser]
  Deal with 1liner blocks
pack-privatestatic String do1LineTags (String template, JOTViewParserData view) [Inherited From JOTViewParser]
  Same as doTags but for 1liner tags
pack-privatestatic String doBlocks (String template, JOTViewParserData view, String templateRoot) throws Exception [Inherited From JOTViewParser]
  Deal with jot:block tags ie: make sthen visible or not, replace their content etc ...
publicstatic String doElements (Hashtable elements, String content, JOTViewParserData view, String templateRoot) throws Exception
  Process a form piece (field)
publicstatic String doForms (String template, JOTViewParserData view, String templateRoot) throws Exception
  Process the form
pack-privatestatic String doIfs (String template, JOTViewParserData view, String templateRoot) throws Exception [Inherited From JOTViewParser]
pack-privatestatic String doIncludes (String template, JOTViewParserData view, String templateRoot) throws Exception [Inherited From JOTViewParser]
pack-privatestatic String doLoops (String template, JOTViewParserData view, String templateRoot) throws Exception [Inherited From JOTViewParser]
  Process loops Loopable variabale must be of 1 of those types: - Collection: AbstractCollection, AbstractList, AbstractSet, ArrayList, BeanContextServicesSupport, BeanContextSupport, HashSet, LinkedHashSet, LinkedList, TreeSet, Vector - Object[] - Hashtable() (keys are ignored)
pack-privatestatic String doRangeLoops (String template, JOTViewParserData view, String templateRoot) throws Exception [Inherited From JOTViewParser]
publicstatic String doRemoveTags (String template) [Inherited From JOTViewParser]
  Removes the tags
pack-privatestatic String doTags (String template, JOTViewParserData view, String templateRoot) throws Exception [Inherited From JOTViewParser]
  Handle the tags that are marked with a jotid property ie: makes them invisible, replace their content, replace some of the tag properties etc ...
pack-privatestatic String doUrls (String template, JOTViewParserData view) [Inherited From JOTViewParser]
process URL's
pack-privatestatic String doVariables (String template, JOTViewParserData view) throws Exception [Inherited From JOTViewParser]
  Replaces the template variables par their values
pack-privatestatic String doVariables2 (String template, JOTViewParserData view) throws Exception [Inherited From JOTViewParser]
pack-privatestatic Object evaluateObject (JOTViewParserData view, Object parent, String call) throws Exception [Inherited From JOTViewParser]
  Once a variable is split into individual objects/fields, we call this to get each "piece" value
publicstatic JOTPair findMatchingClosingTag (int pos, String template, Pattern openTag, Pattern closeTag) [Inherited From JOTViewParser]
  Find the matching(balanced) closing html tag to the tag provided Note that if the HTML is broken (unbalanced tags) this might break.
pack-privatestatic Vector getVariableHash (String varName) throws Exception [Inherited From JOTViewParser]
  Parse a template variable into pieces ie: toto.tata.titi().tutu becomes [toto,tata,titi,tutu]
pack-privatestatic Object getVariableValue (JOTViewParserData view, Vector varHash, Object obj, String defaultVal) throws Exception [Inherited From JOTViewParser]
  Evaluate a template variable and finds its value
protectedstatic String handleTag (JOTViewParserData view, String templateRoot, String openPattern, String closePattern, String content, JOTFormElement element) throws Exception
  Handles field tags: custom HTML properties / flags susch as: - class="myclass" - DISABLED etc...
pack-privatestatic Field lookForField (Object obj, String field) [Inherited From JOTViewParser]
  Try to find a public Field with the given name in the object or null if it is not defined in the object
protectedstatic Method lookForMethod (Object obj, String method, Object values) [Inherited From JOTViewParser]
  Try to find a Method of the given name in the object or null if it is not defined in the object
publicstatic void main (String args) [Inherited From JOTViewParser]
  For testing purposes.
publicstatic String parse (JOTViewParserData view, String template, String templateRoot) throws Exception [Inherited From JOTViewParser]
  Parse the whole template file as a String.
publicstatic String parseTemplate (JOTViewParserData view, String templateRoot, String templateFile) throws Exception [Inherited From JOTViewParser]
  Parse a whole template file
pack-privatestatic String replaceFlags (String openingTag, Hashtable flags, boolean oneLiner) [Inherited From JOTViewParser]
  Replaces the flags in the HTML, such as "DISABLED" or "CHECKED"
pack-privatestatic String replaceTagProperties (String openingTag, Hashtable tagProperties, boolean oneLiner) [Inherited From JOTViewParser]
  Replaces an html tag properties with the ones provided ie: change the value of the class property in ...
publicstatic void safeAppendReplacement (Matcher m, StringBuffer sb, String replacement) [Inherited From JOTViewParser]
  Standard java appendReplacement() use the $sign to do block replace stuff.
publicstatic void setPostProcessor (JOTViewParserInterface postprocessor) [Inherited From JOTViewParser]
  set your own custom preprocessor
publicstatic void setPreProcessor (JOTViewParserInterface preprocessor) [Inherited From JOTViewParser]
Fields
Hide/Show inherited fields
protectedfinalstatic Pattern BLOCK_PATTERN [Inherited From JOTViewParser]
protectedfinalstatic Pattern BLOCK_PATTERN_1LINE [Inherited From JOTViewParser]
protectedfinalstatic Pattern CLOSE_BLOCK_PATTERN [Inherited From JOTViewParser]
protectedfinalstatic String CLOSE_BLOCK_STRING = "" [Inherited From JOTViewParser]
protectedfinalstatic Pattern CLOSE_IF_PATTERN [Inherited From JOTViewParser]
protectedfinalstatic String CLOSE_IF_STRING = "" [Inherited From JOTViewParser]
protectedfinalstatic Pattern CLOSE_LOOP_PATTERN [Inherited From JOTViewParser]
protectedfinalstatic String CLOSE_LOOP_STRING = "" [Inherited From JOTViewParser]
protectedfinalstatic String COUNTER_NAME = "cpt" [Inherited From JOTViewParser]
protectedfinalstatic Pattern FORM_PATTERN [Inherited From JOTViewParser]
protectedfinalstatic Pattern GENERIC_LOOP_PATTERN [Inherited From JOTViewParser]
protectedfinalstatic Pattern IF_PATTERN [Inherited From JOTViewParser]
protectedfinalstatic Pattern INCLUDE_PATTERN [Inherited From JOTViewParser]
protectedfinalstatic Pattern LOOP_PATTERN [Inherited From JOTViewParser]
protectedfinalstatic String LOOP_STACK = "__JOT_LOOP_STACK" [Inherited From JOTViewParser]
protectedfinalstatic String MISSING_VALUE = "MISSING_VALUE !" [Inherited From JOTViewParser]
protectedfinalstatic Pattern OPEN_BLOCK_PATTERN [Inherited From JOTViewParser]
protectedfinalstatic Pattern OPEN_IF_PATTERN [Inherited From JOTViewParser]
protectedfinalstatic Pattern OPEN_TAG_JOTCLASS_PATTERN [Inherited From JOTViewParser]
protectedfinalstatic Pattern OPEN_TAG_JOTID_PATTERN [Inherited From JOTViewParser]
protectedfinalstatic Pattern OPEN_TAG_PATTERN [Inherited From JOTViewParser]
protectedfinalstatic Pattern PARAMS_PATTERN [Inherited From JOTViewParser]
publicfinalstatic int PATTERN_FLAGS = "170" [Inherited From JOTViewParser]
protectedfinalstatic Pattern RANGE_LOOP_PATTERN [Inherited From JOTViewParser]
protectedfinalstatic Pattern REMOVE_PATTERN [Inherited From JOTViewParser]
protectedfinalstatic Pattern TAG_PATTERN [Inherited From JOTViewParser]
protectedfinalstatic Pattern TAG_PATTERN_1LINE [Inherited From JOTViewParser]
protectedfinalstatic Pattern URL_PATTERN [Inherited From JOTViewParser]
protectedfinalstatic Pattern VAR_MEMBER_PATTERN [Inherited From JOTViewParser]
protectedfinalstatic Pattern VAR_PATTERN [Inherited From JOTViewParser]
protectedfinalstatic Pattern VAR_PATTERN2 [Inherited From JOTViewParser]
protectedfinalstatic Pattern WIDGET_PATTERN [Inherited From JOTViewParser]
Nested Classes
Generated By: JavaOnTracks Doclet 0.1.5     ©Thibaut Colar