Generic class that provides easy mapping of a property file to a form
This allow for an easy "setup form" where as the setup options are stored in a property file.
Generic class that provides easy mapping of a property file to a form This allow for an easy "setup form" where as the setup options are stored in a property file. Extend to map your own property file.
public void
defineField
(String name, int type)
[Inherited From JOTForm]
Define a field of the form (name/field type)
You should define all the types you want to use / see in the html form
Typically you make calls to this method from within init()
Define a field of the form (name/field type) You should define all the types you want to use / see in the html form Typically you make calls to this method from within init()
Parameters: - name -
- type -
Ovveride this to change the form CSS
It's probably best to have this css into your template and have this return an empty string.
Ovveride this to change the form CSS It's probably best to have this css into your template and have this return an empty string. This here are just default that would work independently of the template.
Will be called when the form data changed (in the request / form submission)
To update the data values here.
Will be called when the form data changed (in the request / form submission) To update the data values here.
Parameters: - request -
Throws: - java.lang.Exception -
public void
removeFlag
(String flag)
[Inherited From JOTViewTag]
Remove a flag from the HTML (if found)
Remove a flag from the HTML (if found)
Parameters: - flag -
Call this to save the new form values to the property file
This will save the values and then call your saveProperties implementation
Call this to save the new form values to the property file This will save the values and then call your saveProperties implementation
Parameters: - request -
Throws: - java.lang.Exception -
Implement to save the properties back where they came from (your property file).
Implement to save the properties back where they came from (your property file). Note: save the "props" object to your property file.
Throws: - Exception -
public void
setContent
(String newContent)
[Inherited From JOTViewBlock]
If a content is defined(not null), then the "HTML element" block content will be replaced by
the value of newConetnt.
If a content is defined(not null), then the "HTML element" block content will be replaced by the value of newConetnt. ie:
xyzxyz
If newParam is set to "aaaaa", the rendered HTML page will show: aaaaaa If newParam is set to null, the rendered HTML page will show: xyzxyz
Parameters: - newContent - default:null
public void
setErrors
(Hashtable errors)
[Inherited From JOTForm]
This allows to redefine (or add new) HTML tags to the block.
This allows to redefine (or add new) HTML tags to the block. For example say you have this block: You have added the following htmlTags using setHtmlTags: ["class","css1"] ["border","2"] The htmnl output will look like this:
public void
setVisible
(boolean visible)
[Inherited From JOTViewBlock]
If set to false, the elemnt will be hidden "removed" from the generated HTML.
If set to false, the elemnt will be hidden "removed" from the generated HTML.
Parameters: - visible - default:true
public void
unsetTagProperty
(String name)
[Inherited From JOTViewTag]
Unset a tag property, so that it will be left alone.
Unset a tag property, so that it will be left alone.
Parameters: - name -
- value -
Implement to set/load the properties. This method should set the "props" variable (Properties object loaded from some property file)
Parameters: - request -