Sun and Oracle Community Voices How to Buy Log In United States [Change] English

»  Spotlight Articles
»  Projects
»  Publications
»  People
»  Awards
»  Events
»  Downloads
»  Internships
»  Contrarian Minds
»  About Sun Labs
Brazil project: Class FormTemplate

sunlabs.brazil.template Class FormTemplate

java.lang.Object
  |
  +--sunlabs.brazil.template.Template
        |
        +--sunlabs.brazil.template.FormTemplate
All Implemented Interfaces:
Serializable

public class FormTemplate
extends Template
implements Serializable

SAMPLE Template class for substituting Default values into html forms This class is used by the TemplateHandler. The default values in form tags are replaced by the server property that matches the field name.

See Also:
Serialized Form

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_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_select(RewriteContext hr)           Forget the variable name for the next group of option tags
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

FormTemplate

public FormTemplate()
Method Detail

init

public boolean init(RewriteContext hr)
Save a reference to our request properties.
Overrides:
init in class Template

tag_input

public void tag_input(RewriteContext hr)
Look for <input name=[x] value=[v]> and replace the value with the entry in the request properties. If no value is supplied, no substitution is done.

tag_select

public void tag_select(RewriteContext hr)
Remember the variable name for the next group of option tags.

tag_slash_select

public void tag_slash_select(RewriteContext hr)
Forget the variable name for the next group of option tags

tag_option

public void tag_option(RewriteContext hr)
Look at the option tag, set the "selected" attribute as needed. In order for this to work, the VALUE tag *must* be used

done

public boolean done(RewriteContext hr)
This is for debugging only !!
Overrides:
done in class Template

Version 2.2, Generated 07/25/00
Copyright (c) 2000, Sun Microsystems.