public class FieldDescriptor extends Object
FieldElement
,
Section
,
BaseSection
,
Configurer
Modifier and Type | Field and Description |
---|---|
protected String |
fieldKey |
protected Metadata |
metadata |
Constructor and Description |
---|
FieldDescriptor(String fieldKey,
MessageKeyInfo messageKey,
Metadata metadata) |
FieldDescriptor(String fieldKey,
MessageKeyInfo messageKey,
Metadata metadata,
com.google.gwt.user.client.ui.Widget fieldWidget) |
Modifier and Type | Method and Description |
---|---|
protected void |
addStyleToWidget(com.google.gwt.user.client.ui.Widget w) |
protected com.google.gwt.user.client.ui.Widget |
createFieldWidget() |
FieldElement |
getFieldElement() |
String |
getFieldKey() |
String |
getFieldLabel() |
com.google.gwt.user.client.ui.Widget |
getFieldWidget() |
MessageKeyInfo |
getMessageKey() |
Metadata |
getMetadata() |
String |
getModelId() |
ModelWidgetBinding<?> |
getModelWidgetBinding() |
Callback<Boolean> |
getValidationRequestCallback() |
boolean |
hasHadFocus()
Return true if the field has been touched by the user in some fashion, this is set by the field's section
|
void |
hideLabel() |
boolean |
isDirty()
Returns true if this field is marked as dirty.
|
boolean |
isIgnoreShowRequired() |
boolean |
isLabelShown() |
boolean |
isOptional()
Fields that are optional should not be displayed if there is no data in some cases,
it is up to the section implementation whether or not to honor this flag
|
boolean |
isVisible() |
void |
setDirty(boolean dirty) |
void |
setFieldKey(String fieldKey) |
void |
setFieldWidget(com.google.gwt.user.client.ui.Widget fieldWidget) |
void |
setHasHadFocus(boolean hasHadFocus) |
void |
setIgnoreShowRequired(boolean ignoreShowRequired) |
void |
setMessageKey(MessageKeyInfo messageKey) |
void |
setMetadata(Metadata metadata) |
void |
setModelId(String modelId) |
void |
setOptional(boolean optional)
Sets the optional flag
Fields that are optional should not be displayed if there is no data in some cases,
it is up to the section implementation whether or not to honor this flag
|
void |
setRequired(Boolean isRequired)
Reset the requiredness of the field descriptor.
|
protected void |
setupField() |
void |
setValidationCallBack(Callback<Boolean> callback)
Allows additional processing to happen when a validation check is being processed when the input
widget loses focus defined in the callback
|
void |
setWidgetBinding(ModelWidgetBinding widgetBinding)
Sets the ModelWidgetBinding for this field.
|
public FieldDescriptor(String fieldKey, MessageKeyInfo messageKey, Metadata metadata)
fieldKey
- - key for this field which matches a field in the overall model definition that this
field will be used formessageKey
- - key object used for determing field labelsmetadata
- - metadata used to determine requiredness, validation, and autogenerated widgetpublic FieldDescriptor(String fieldKey, MessageKeyInfo messageKey, Metadata metadata, com.google.gwt.user.client.ui.Widget fieldWidget)
fieldKey
- - key for this field which matches a field in the overall model definition that this
field will be used formessageKey
- - key object used for determing field labelsmetadata
- - metadata used to determine requiredness and validationfieldWidget
- - widget to use instead of an automatically determined oneprotected void addStyleToWidget(com.google.gwt.user.client.ui.Widget w)
protected void setupField()
public void hideLabel()
FieldElement.hideLabel()
public boolean isLabelShown()
public FieldElement getFieldElement()
public String getFieldKey()
public void setFieldKey(String fieldKey)
public String getFieldLabel()
public com.google.gwt.user.client.ui.Widget getFieldWidget()
protected com.google.gwt.user.client.ui.Widget createFieldWidget()
public ModelWidgetBinding<?> getModelWidgetBinding()
public void setValidationCallBack(Callback<Boolean> callback)
callback
- public Callback<Boolean> getValidationRequestCallback()
public boolean isDirty()
public void setDirty(boolean dirty)
public boolean hasHadFocus()
public void setHasHadFocus(boolean hasHadFocus)
public Metadata getMetadata()
public void setMetadata(Metadata metadata)
public void setFieldWidget(com.google.gwt.user.client.ui.Widget fieldWidget)
public String getModelId()
public void setModelId(String modelId)
public void setWidgetBinding(ModelWidgetBinding widgetBinding)
widgetBinding
- public MessageKeyInfo getMessageKey()
public void setMessageKey(MessageKeyInfo messageKey)
public void setOptional(boolean optional)
optional
- public boolean isOptional()
public boolean isVisible()
public void setRequired(Boolean isRequired)
public boolean isIgnoreShowRequired()
public void setIgnoreShowRequired(boolean ignoreShowRequired)
Copyright © 2004-2013 The Kuali Foundation. All Rights Reserved.