|
![]() |
|||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectsunlabs.brazil.template.Template
sunlabs.brazil.template.FormTemplate (view source)
public class FormTemplate
Template class for substituting default values into html forms. This class is used by the TemplateHandler. The default values in form elements are replaced by the request property that matches the field name. The following field elements are processed:
value
attribute must be present.
additional information is provided below.
If the enclosing <form> tag has the attribute "prepend", then "prepend" is tacked on the front of each variable name before its value is looked-up. The "prepend" attribute is then removed from the form tag.
Field Summary |
---|
Fields inherited from class sunlabs.brazil.template.Template |
---|
debug |
Constructor Summary | |
---|---|
FormTemplate()
|
Method Summary | |
---|---|
boolean |
done(RewriteContext hr)
This is for debugging only !! |
boolean |
init(RewriteContext hr)
Save a reference to our request properties. |
void |
tag_form(RewriteContext hr)
Look for a "prepend" attrubute, remember its value, then remove it from the tag. |
void |
tag_input(RewriteContext hr)
Look for <input name=[x] value=[v]> and replace the value with the entry in the request properties. |
void |
tag_option(RewriteContext hr)
Look at the option tag, set the "selected" attribute as needed. |
void |
tag_select(RewriteContext hr)
Remember the variable name for the next group of option tags. |
void |
tag_slash_form(RewriteContext hr)
Forget about the "prepend" value |
void |
tag_slash_select(RewriteContext hr)
Forget the variable name for the next group of option tags |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public FormTemplate()
Method Detail |
---|
public boolean init(RewriteContext hr)
init
in interface TemplateInterface
init
in class Template
public void tag_form(RewriteContext hr)
public void tag_slash_form(RewriteContext hr)
public void tag_input(RewriteContext hr)
value
contains any ${..} constructs, the substituted
value is used instead of the value in the corrosponding request property.
public void tag_select(RewriteContext hr)
public void tag_slash_select(RewriteContext hr)
public void tag_option(RewriteContext hr)
public boolean done(RewriteContext hr)
done
in interface TemplateInterface
done
in class Template
|
Version Kenai-svn-r24, Generated 08/18/09 Copyright (c) 2001-2009, Sun Microsystems. |
|||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |