Class FormHelpTemplate

All Implemented Interfaces:
TemplateInterface

public class FormHelpTemplate extends FormTemplate
Template class for adding field help to the FormTemplate. The "help" attribute of the <form> element specifies a javascript template used to generate an event handler for each form element. The "help" attribute on each form element is passed to the javascript template, allowing a (user supplied) javascript function to present field specific help. The help text for each feld may be supplied as a server config file.

"help" feature:
This template may be used to provide field specific help with a little external javascript "glue". For example, the markup:

 <form event=onfocus help="do_help(%)">
 ...
   <input name=foo ... help="help for this input field">
 ...
 </form>
 
will generate:
 <form>
 ...
   <input ... onfocus='do_help("help for this input field")'>
 ...
 </form>
 
This works with the form elements <input> <select>, and <textarea>. The "event" defaults to "onfocus". If foo.help is a defined property then it is used as the help text.
Version:
@(#)FormHelpTemplate.java 1.1
Author:
Stephen Uhler
  • Constructor Details

    • FormHelpTemplate

      public FormHelpTemplate()
  • Method Details