sunlabs.brazil.sunlabs
public class FormHelpTemplate extends FormTemplate
"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
| Method Summary | |
|---|---|
| boolean | done(RewriteContext hr) |
| protected void | do_help(RewriteContext hr)
Look for help text, and put it into an event call.
|
| protected String | format(String base, String arg)
Substitute "arg" into "base" at "%" |
| boolean | init(RewriteContext hr) |
| void | tag_form(RewriteContext hr)
Look for a "help" attribute, remember its value, then remove it . |
| void | tag_input(RewriteContext hr)
Look for a "help" attribute, remember its value, then remove it . |
| void | tag_option(RewriteContext hr)
Needed to retain parent functionality. |
| void | tag_select(RewriteContext hr)
Look for a "help" attribute, remember its value, then remove it . |
| void | tag_slash_form(RewriteContext hr)
Forget about the "help" action. |
| void | tag_slash_select(RewriteContext hr)
Needed to retain parent functionality. |
| void | tag_textarea(RewriteContext hr)
Look for a "help" attribute, remember its value, then remove it . |