|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.apache.tapestry5.corelib.components.BeanEditForm
@SupportsInformalParameters public class BeanEditForm
A component that creates an entire form editing the properties of a particular bean. Inspired by Trails and BeanForm (both for Tapestry 4). Generates a simple UI for editing the properties of a JavaBean, with the flavor of UI for each property (text field, checkbox, drop down list) determined from the property type (or by other means, such as an annotation), and the order and validation for the properties determined from annotations on the property's getter and setter methods.
You may add block parameters to the component; when the name matches (case insensitive) the name of a property, then the corresponding Block is renderered, rather than any of the built in property editor blocks. This allows you to override specific properties with your own customized UI, for cases where the default UI is insufficient, or no built-in editor type is appropriate.
BeanModel,
BeanModelSource,
PropertyEditor,
DataType| Constructor Summary | |
|---|---|
BeanEditForm()
|
|
| Method Summary | |
|---|---|
void |
clearErrors()
Invokes ValidationTracker.clear(). |
String |
getClientId()
Returns the client id of the embedded form. |
boolean |
getHasErrors()
Returns true if the form's ValidationTracker contains any errors. |
boolean |
isValid()
Returns true if the form's ValidationTracker does not contain any errors. |
void |
recordError(Field field,
String errorMessage)
A convienience for invoking ValidationTracker.recordError(Field, String). |
void |
recordError(String errorMessage)
A convienience for invoking ValidationTracker.recordError(String). |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public BeanEditForm()
| Method Detail |
|---|
public String getClientId()
getClientId in interface ClientElementpublic void clearErrors()
FormValidationControlValidationTracker.clear().
clearErrors in interface FormValidationControlpublic boolean getHasErrors()
FormValidationControlValidationTracker contains any errors.
getHasErrors in interface FormValidationControlpublic boolean isValid()
FormValidationControlValidationTracker does not contain any errors.
isValid in interface FormValidationControl
public void recordError(Field field,
String errorMessage)
FormValidationControlValidationTracker.recordError(Field, String).
recordError in interface FormValidationControlpublic void recordError(String errorMessage)
FormValidationControlValidationTracker.recordError(String).
recordError in interface FormValidationControl
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||