|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
public interface PObjForm
Abstract base class for rendering forms based on meta-data from the
PObject library.
FormDecl,
Messages| Method Summary | |
|---|---|
void |
addErrorMessage(java.lang.String messageId,
java.lang.Object... params)
Adds an error message to the set of global messages. |
void |
addInvalidValueMessage(java.lang.String property,
java.lang.Object... params)
Adds an error message for the specified property that the value invalid. |
void |
addMandatoryMessage(java.lang.String property)
Adds an error message for the specified property that the value is mandatory. |
void |
addMessage(java.lang.String property,
Message msg)
Add a message to the set of messages for the specified property. |
void |
addSuccessMessage(java.lang.String messageId,
java.lang.Object... params)
Adds a success message to the set of global messages. |
void |
clearMessage(java.lang.String property,
java.lang.String msgKey)
Removes a specific message for the given property. |
void |
clearMessages()
Clear all messages recorded by this object. |
FormElement |
createFormElement(FormEntry entry)
Creates a FormElement for one specified FormEntry. |
Container |
getContainer()
Returns the database connection which the form uses. |
FormElement |
getElement(FormEntry entry)
Returns the FormElement for the specified FormEntry. |
java.util.List<FormElement> |
getElements()
|
FormDecl |
getFormDecl()
Returns the form declaration that this form is based on. |
int |
getMessageCount()
Return the number of messages recorded for all properties (including global messages). |
int |
getMessageCount(java.lang.String property)
Return the number of messages associated with the specified property. |
java.util.Iterator<java.lang.String> |
getMessageProperties()
Return the set of property names for which at least one message has been recorded. |
Messages |
getMessages()
|
java.util.Iterator<Message> |
getMessages(java.lang.String property)
Return the set of messages related to a specific property. |
boolean |
hasChanged()
Tests whether any element in the form has been changed. |
boolean |
hasChanged(FormEntry entry)
Tests whether the value of the element for the given entry has changed. |
boolean |
hasChanged(java.lang.String entryName)
Tests whether the value of the element with the given name has changed. |
boolean |
hasMessages()
Return true if there are no messages recorded in this object,
or false otherwise. |
void |
populateForm(Record record,
FormEntry[] entries)
Populates the specified form entries with the data from the record. |
void |
populateForm(Record record,
FormEntry[] entries,
boolean setCurrentAsInitial)
Populates the specified form entries with the data from the record. |
void |
populateObject(FormEntry[] entries,
Record record)
Populates the record with the data from the form elements of the corresponding form entries. |
void |
populateObject(FormEntry[] entries,
Record record,
boolean transferUnchangedValues)
Populates the record with the data from the form elements of the corresponding form entries. |
void |
setContainer(Container container)
|
void |
setCurrentAsInitialState()
|
void |
validate()
|
| Method Detail |
|---|
void addMessage(java.lang.String property,
Message msg)
void addInvalidValueMessage(java.lang.String property,
java.lang.Object... params)
addMessage(String,Message)void addMandatoryMessage(java.lang.String property)
addMessage(String,Message)
void addErrorMessage(java.lang.String messageId,
java.lang.Object... params)
void addSuccessMessage(java.lang.String messageId,
java.lang.Object... params)
void clearMessages()
void clearMessage(java.lang.String property,
java.lang.String msgKey)
int getMessageCount()
int getMessageCount(java.lang.String property)
java.util.Iterator<java.lang.String> getMessageProperties()
Messages getMessages()
java.util.Iterator<Message> getMessages(java.lang.String property)
boolean hasMessages()
true if there are no messages recorded in this object,
or false otherwise.
FormDecl getFormDecl()
FormElement createFormElement(FormEntry entry)
FormElement for one specified FormEntry.
Container getContainer()
void setContainer(Container container)
FormElement getElement(FormEntry entry)
FormElement for the specified FormEntry.
java.util.List<FormElement> getElements()
boolean hasChanged()
boolean hasChanged(java.lang.String entryName)
boolean hasChanged(FormEntry entry)
hasChanged(String)
void populateForm(Record record,
FormEntry[] entries,
boolean setCurrentAsInitial)
For the current value of the corresponding form element for each form entry will the set to the value of the column with the same name within the record.
record - The record which should be populated into the form.entries - The form entries whose current values will be set to the
data read from the record.setCurrentAsInitial - if true the new current value of
the changed form elements will also be used as the initial one.
java.lang.IllegalArgumentException - if for a form entry no column with the
same name exists in the record.getElement(FormEntry)
void populateForm(Record record,
FormEntry[] entries)
This method ensures that the new value is also used as initial one.
record - The record which should be populated into the form.entries - The form entries whose current values will be set to the
data read from the record.
java.lang.IllegalArgumentException - if for a form entry no column with the
same name exists in the record.populateForm(Record,FormEntry[],boolean)
void populateObject(FormEntry[] entries,
Record record,
boolean transferUnchangedValues)
For each specified form entry the current value of the corresponding form element will be written to the column with the same name in the record.
record - The record which should be populated into the form.entries - The form entries whose current values will be set to the
data read from the record.transferUnchangedValues - if false only the values of
form elements that have been changed are copied into the record.
java.lang.IllegalArgumentException - if for a form entry no column with the
same name exists in the record.getElement(FormEntry)
void populateObject(FormEntry[] entries,
Record record)
This method only transfers changed values into the record.
record - The record which should be populated into the form.entries - The form entries whose current values will be set to the
data read from the record.
java.lang.IllegalArgumentException - if for a form entry no column with the
same name exists in the record.populateObject(FormEntry[],Record,boolean)void setCurrentAsInitialState()
void validate()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||