public class FormRef extends java.lang.Object implements AForm
Form
more than once.Modifier and Type | Method and Description |
---|---|
void |
binded(int id)
The form has been binded, do any required initialization.
|
<T extends IField> |
bindField(java.lang.Class<T> type,
java.lang.String id)
|
boolean |
equals(java.lang.Object obj) |
IAction |
getAction(java.lang.String id) |
java.util.Set<java.lang.String> |
getActions() |
<T> AFormField<T> |
getBindedField(java.lang.Class<T> type,
java.lang.String id) |
AFormField<?> |
getBindedField(java.lang.String id)
This method is not intended to be called before
IForm.bindField(Class, String) . |
java.util.Set<java.lang.String> |
getBindedFields()
This method is not intended to be called before
IForm.binded(int) . |
IFieldContraints |
getContraintsFor(java.lang.String fieldId) |
<T> AFormField<T> |
getField(java.lang.Class<T> type,
java.lang.String id) |
AFormField<?> |
getField(java.lang.String id) |
java.util.Set<java.lang.String> |
getFields() |
Form |
getForm() |
java.lang.String |
getLabel(java.lang.String fieldId)
This method can be called before binding the field.
|
IMessage |
getMessage() |
IMessage |
getMessage(java.lang.Enum<?> sc) |
IMessage[] |
getMessages() |
java.util.Map<java.lang.Enum<?>,IMessage> |
getMessagesMap() |
StrokeStripe |
getStrokes() |
int |
hashCode() |
boolean |
hasMessage() |
boolean |
hasMessage(MessageTypeEnum type) |
boolean |
isEnabled()
If disabled then actions are also disabled.
|
boolean |
isReadOnly()
In a read only form, actions are enabled but input fields are not.
|
AForm |
registerAction(java.lang.String id,
IAction action)
Used to add actions to the current form.
|
IAction |
removeAction(java.lang.String id)
Removes only directly owned actions, ie.
|
AForm |
replaceAction(java.lang.String id,
IAction action) |
void |
setMessage(java.lang.Enum<?> sc,
IMessage message) |
boolean |
validate(java.lang.String fieldId,
java.lang.String... otherFieldsToValidate) |
public FormRef(Form form)
public final Form getForm()
public final <T extends IField> T bindField(java.lang.Class<T> type, java.lang.String id)
IForm
public final void binded(int id)
IForm
IForm.bindField(Class, String)
call.binded
in interface IForm
binded
in interface AForm
id
- - since it can be called more than once, as you can have the IForm
form shared between different IFlow
(if the implementation support it),
this id can be used to track this situation, it changes when a new cycle of bind
begins.public final IAction getAction(java.lang.String id)
public java.util.Set<java.lang.String> getActions()
getActions
in interface IForm
getActions
in interface AForm
public final AFormField<?> getBindedField(java.lang.String id)
IForm
IForm.bindField(Class, String)
.getBindedField
in interface IForm
getBindedField
in interface AForm
getBindedField
in interface IFormView
IField
binded to the given id.public final java.util.Set<java.lang.String> getBindedFields()
IForm
IForm.binded(int)
.getBindedFields
in interface IForm
getBindedFields
in interface AForm
getBindedFields
in interface IFormView
public final AFormField<?> getField(java.lang.String id)
public final java.util.Set<java.lang.String> getFields()
public final java.lang.String getLabel(java.lang.String fieldId)
IForm
public final StrokeStripe getStrokes()
getStrokes
in interface IForm
getStrokes
in interface AForm
public boolean isEnabled()
IForm
public boolean isReadOnly()
IForm
isReadOnly
in interface IForm
isReadOnly
in interface AForm
isReadOnly
in interface IFormView
public AForm registerAction(java.lang.String id, IAction action)
IForm
registerAction
in interface IForm
registerAction
in interface AForm
id
- - the action id to be added.action
- - the IAction
handler.public final IAction removeAction(java.lang.String id)
removeAction
in interface IForm
removeAction
in interface AForm
public AForm replaceAction(java.lang.String id, IAction action)
replaceAction
in interface IForm
replaceAction
in interface AForm
public final boolean validate(java.lang.String fieldId, java.lang.String... otherFieldsToValidate)
validate
in interface IForm
validate
in interface AForm
fieldId
- - the changed field, null means that the whole form has to
be validated.otherFieldsToValidate
- - possible other fields that must be validated.public final <T> AFormField<T> getBindedField(java.lang.Class<T> type, java.lang.String id)
getBindedField
in interface AForm
getBindedField
in interface IFormView
public final IFieldContraints getContraintsFor(java.lang.String fieldId)
getContraintsFor
in interface AForm
getContraintsFor
in interface IFormView
public final <T> AFormField<T> getField(java.lang.Class<T> type, java.lang.String id)
public final IMessage getMessage()
getMessage
in interface IMessageSet
getMessage
in interface AForm
public final IMessage getMessage(java.lang.Enum<?> sc)
getMessage
in interface IMessageSet
getMessage
in interface AForm
public final IMessage[] getMessages()
getMessages
in interface IMessageSet
getMessages
in interface AForm
public final java.util.Map<java.lang.Enum<?>,IMessage> getMessagesMap()
getMessagesMap
in interface IMessageSet
getMessagesMap
in interface AForm
IMessageSet.getMessage()
.public final boolean hasMessage()
hasMessage
in interface IMessageSet
hasMessage
in interface AForm
public final boolean hasMessage(MessageTypeEnum type)
hasMessage
in interface IMessageSet
hasMessage
in interface AForm
MessageTypeEnum
type or severe is found.public final void setMessage(java.lang.Enum<?> sc, IMessage message)
setMessage
in interface IMessageSet
setMessage
in interface AForm
sc
- - the owner of the message.message
- - null to remove the message for the given IMessageToken
.public final int hashCode()
hashCode
in class java.lang.Object
public final boolean equals(java.lang.Object obj)
equals
in class java.lang.Object