net.jot.web.forms
Class JOTPropertiesForm
java.lang.Object
net.jot.web.view.JOTViewBlock
net.jot.web.view.JOTViewTag
net.jot.web.forms.JOTForm
net.jot.web.forms.JOTGeneratedForm
net.jot.web.forms.JOTPropertiesForm
public abstract class JOTPropertiesForm
- extends JOTGeneratedForm
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.
- Author:
- thibautc
|
Field Summary |
protected java.util.Properties |
props
|
|
Method Summary |
void |
addFormField(JOTFormField field)
Adds a form field |
void |
refreshData(JOTFlowRequest request)
Will be called when the form data changed (in the request / form submission)
To update the data values here. |
void |
save(JOTFlowRequest request)
Call this to save the new form values to the property file
This will save the values and then call your saveProperties implementation |
abstract void |
saveProperties()
Implement to save the properties back where they came from (your property file). |
abstract void |
updateProperties(JOTFlowRequest request)
Implement to set/load the properties. |
| Methods inherited from class net.jot.web.forms.JOTGeneratedForm |
addCategory, addSubmitButton, getCss, getDescription, getFormAction, getFormBowells, getHtml, getItems, getJavascript, init, layoutForm, setFormAction, setFormTitle, validate, validateForm |
| Methods inherited from class net.jot.web.forms.JOTForm |
defineField, get, getAll, getErrors, getResult, hasValidated, preValidate, reparseForm, setErrors, setHasValidated, setResult, validatePermissions |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
props
protected java.util.Properties props
JOTPropertiesForm
public JOTPropertiesForm()
addFormField
public void addFormField(JOTFormField field)
- Description copied from class:
JOTGeneratedForm
- Adds a form field
- Overrides:
addFormField in class JOTGeneratedForm
refreshData
public void refreshData(JOTFlowRequest request)
throws java.lang.Exception
- Will be called when the form data changed (in the request / form submission)
To update the data values here.
- Overrides:
refreshData in class JOTGeneratedForm
- Parameters:
request -
- Throws:
java.lang.Exception
updateProperties
public abstract void updateProperties(JOTFlowRequest request)
- Implement to set/load the properties.
This method should set the "props" variable (Properties object loaded from some property file)
- Parameters:
request -
saveProperties
public abstract void saveProperties()
throws java.lang.Exception
- Implement to save the properties back where they came from (your property file).
Note: save the "props" object to your property file.
- Throws:
java.lang.Exception
save
public void save(JOTFlowRequest request)
throws java.lang.Exception
- Call this to save the new form values to the property file
This will save the values and then call your saveProperties implementation
- Specified by:
save in class JOTForm
- Parameters:
request -
- Throws:
java.lang.Exception