public abstract class BaseSection extends SpanPanel implements Section
com.google.gwt.user.client.ui.UIObject.DebugIdImpl, com.google.gwt.user.client.ui.UIObject.DebugIdImplEnabled
Modifier and Type | Field and Description |
---|---|
protected ArrayList<FieldDescriptor> |
fields |
protected boolean |
isDirty |
protected boolean |
isValidationEnabled |
protected FieldLayout |
layout |
protected LayoutController |
layoutController |
protected ArrayList<Section> |
sections |
Constructor and Description |
---|
BaseSection() |
Modifier and Type | Method and Description |
---|---|
void |
add(com.google.gwt.user.client.ui.Widget w)
DO NOT use this method for adding sections, fields, or widgets to sections
|
String |
addField(FieldDescriptor fieldDescriptor)
Adds a field to this section.
|
String |
addSection(Section section)
Adds a section to this section's layout.
|
String |
addSection(String key,
Section section)
Same as addSection except with an option user defined key (for retrieval of the section if necessary).
|
void |
addStyleName(String style)
Adds a style to this section's underlying layout.
|
String |
addWidget(com.google.gwt.user.client.ui.Widget w)
Use this to add widgets to a sections layout.
|
protected void |
clearValidationErrors()
Clear all validation errors from the layout (removes all red highlight and error text shown on the
screen)
|
void |
clearValidationWarnings()
Clear all validation warnings from the layout (removes all yellow highlight and warning text shown on the
screen)
|
protected static void |
enableField(Boolean isEnabled,
FieldDescriptor fd)
Used to enable,disable widget defined in field descriptor
|
void |
enableValidation(boolean enableValidation)
A section can turn off all validation by setting this flag
|
protected boolean |
ensureDirtyFlagPath(Data root,
QueryPath path) |
FieldDescriptor |
getField(String fieldKey) |
List<FieldDescriptor> |
getFields()
Gets all the fields in a section and its subsections.
|
FieldLayout |
getLayout()
Gets this sections fieldLayout.
|
LayoutController |
getLayoutController()
Gets the defined controller for this section if one exists.
|
Section |
getSection(String sectionKey) |
List<Section> |
getSections()
Gets all nested sections contained in this section
|
List<FieldDescriptor> |
getUnnestedFields()
Gets all the fields in this section, but does not include fields in its nested sections.
|
boolean |
isDirty()
Returns true if this this section is considered dirty (the user may have entered data into this
section)
|
boolean |
isValidationEnabled() |
ValidationResult.ErrorLevel |
processValidationResults(List<ValidationResultInfo> results)
Same as processValidationResults(results, true)
|
ValidationResult.ErrorLevel |
processValidationResults(List<ValidationResultInfo> results,
boolean clearErrors)
Processes the validation results passed in and displays the appropriate message on the screen next
to the corresponding field or section.
|
static void |
progressiveEnableAndRequireFields(Boolean isRequiredAndEnabled,
FieldDescriptor... fieldDescriptors)
This will progressively enable/disable and require/unrequire a set of fields
|
static void |
progressiveEnableFields(Boolean isEnabled,
FieldDescriptor... fieldDescriptors)
This will progressively enable/disable a set of fields
|
static void |
progressiveRequireFields(Boolean isRequired,
FieldDescriptor... fieldDescriptors)
This will progressively require/unrequire a set of fields
|
void |
removeField(FieldDescriptor field) |
void |
removeField(String fieldKey) |
void |
removeSection(Section section)
Removes a section from this section's layout.
|
void |
removeSection(String sectionKey) |
void |
removeWidget(String key) |
void |
removeWidget(com.google.gwt.user.client.ui.Widget widget) |
void |
resetDirtyFlags() |
void |
resetFieldInteractionFlags()
Resets all the dirty and focus flags on fields.
|
void |
setFieldHasHadFocusFlags(boolean hadFocus)
Sets the fields has had focus flag.
|
void |
setHelp(String html)
Sets help for this entire section (appears next to section title)
|
void |
setInstructions(String html)
Sets instructions for this entire section (appears next to section title)
|
void |
setIsDirty(boolean state) |
void |
setLayoutController(LayoutController controller) |
void |
setRequired(AbbrPanel required)
Sets required for this entire section (appears next to section title)
|
void |
setSectionId(String id) |
void |
setStyleName(String style) |
void |
updateModel(DataModel model)
Update the model passed in with data from the fields on this section.
|
void |
updateWidgetData(DataModel model)
Updates the section's fields with data from the model passed in.
|
getExportElementSubset, getExportFieldValue, getText, insert, isExportElement, setExportElement, setHTML, setText
add, adjustIndex, checkIndexBoundsForAccess, checkIndexBoundsForInsertion, getChildren, getWidget, getWidgetCount, getWidgetIndex, getWidgetIndex, insert, insert, iterator, remove, remove
add, adopt, adopt, clear, disown, doAttachChildren, doDetachChildren, orphan, remove
addAttachHandler, addBitlessDomHandler, addDomHandler, addHandler, asWidget, asWidgetOrNull, createHandlerManager, delegateEvent, fireEvent, getHandlerCount, getLayoutData, getParent, isAttached, isOrWasAttached, onAttach, onBrowserEvent, onDetach, onLoad, onUnload, removeFromParent, setLayoutData, sinkEvents
addStyleDependentName, ensureDebugId, ensureDebugId, ensureDebugId, getAbsoluteLeft, getAbsoluteTop, getElement, getOffsetHeight, getOffsetWidth, getStyleElement, getStyleName, getStyleName, getStylePrimaryName, getStylePrimaryName, getTitle, isVisible, isVisible, onEnsureDebugId, removeStyleDependentName, removeStyleName, setElement, setElement, setHeight, setPixelSize, setSize, setStyleDependentName, setStyleName, setStyleName, setStyleName, setStylePrimaryName, setStylePrimaryName, setTitle, setVisible, setVisible, setWidth, sinkBitlessEvent, toString, unsinkEvents
protected FieldLayout layout
protected ArrayList<FieldDescriptor> fields
protected LayoutController layoutController
protected boolean isValidationEnabled
protected boolean isDirty
public BaseSection()
public String addField(FieldDescriptor fieldDescriptor)
protected boolean ensureDirtyFlagPath(Data root, QueryPath path)
public String addSection(Section section)
addSection
in interface Section
Section.addSection(org.kuali.student.common.ui.client.configurable.mvc.sections.Section)
public void removeSection(Section section)
removeSection
in interface Section
Section.removeSection(org.kuali.student.common.ui.client.configurable.mvc.sections.Section)
protected void clearValidationErrors()
public void clearValidationWarnings()
clearValidationWarnings
in interface Section
public List<FieldDescriptor> getFields()
getFields
in interface Section
Section.getFields()
public List<FieldDescriptor> getUnnestedFields()
getUnnestedFields
in interface Section
Section.getUnnestedFields()
public List<Section> getSections()
getSections
in interface Section
Section.getSections()
public ValidationResult.ErrorLevel processValidationResults(List<ValidationResultInfo> results, boolean clearErrors)
processValidationResults
in interface Section
Section.processValidationResults(java.util.List, boolean)
public ValidationResult.ErrorLevel processValidationResults(List<ValidationResultInfo> results)
processValidationResults
in interface Section
Section.processValidationResults(java.util.List)
public LayoutController getLayoutController()
getLayoutController
in interface HasLayoutController
HasLayoutController.getLayoutController()
public void setLayoutController(LayoutController controller)
setLayoutController
in interface HasLayoutController
public String addWidget(com.google.gwt.user.client.ui.Widget w)
addWidget
in interface Section
Section.addWidget(com.google.gwt.user.client.ui.Widget)
public void setFieldHasHadFocusFlags(boolean hadFocus)
setFieldHasHadFocusFlags
in interface Section
Section.setFieldHasHadFocusFlags(boolean)
public void enableValidation(boolean enableValidation)
enableValidation
in interface Section
Section.enableValidation(boolean)
public boolean isValidationEnabled()
isValidationEnabled
in interface Section
public void updateModel(DataModel model)
updateModel
in interface Section
Section.updateModel(org.kuali.student.common.ui.client.mvc.DataModel)
public void updateWidgetData(DataModel model)
updateWidgetData
in interface Section
Section.updateWidgetData(org.kuali.student.common.ui.client.mvc.DataModel)
public void resetFieldInteractionFlags()
resetFieldInteractionFlags
in interface Section
Section.resetFieldInteractionFlags()
public void resetDirtyFlags()
resetDirtyFlags
in interface Section
public String addSection(String key, Section section)
addSection
in interface Section
Section.addSection(java.lang.String, org.kuali.student.common.ui.client.configurable.mvc.sections.Section)
public FieldDescriptor getField(String fieldKey)
public FieldLayout getLayout()
getLayout
in interface Section
Section.getLayout()
public Section getSection(String sectionKey)
getSection
in interface Section
public void removeField(String fieldKey)
removeField
in interface Section
public void removeField(FieldDescriptor field)
removeField
in interface Section
public void removeSection(String sectionKey)
removeSection
in interface Section
public void removeWidget(com.google.gwt.user.client.ui.Widget widget)
removeWidget
in interface Section
public void removeWidget(String key)
removeWidget
in interface Section
public boolean isDirty()
isDirty
in interface Section
Section.isDirty()
public void setIsDirty(boolean state)
public void add(com.google.gwt.user.client.ui.Widget w)
public void addStyleName(String style)
addStyleName
in class com.google.gwt.user.client.ui.UIObject
UIObject.addStyleName(java.lang.String)
public void setStyleName(String style)
setStyleName
in class com.google.gwt.user.client.ui.UIObject
public void setInstructions(String html)
html
- public void setHelp(String html)
html
- public void setRequired(AbbrPanel required)
required
- public void setSectionId(String id)
public static void progressiveEnableFields(Boolean isEnabled, FieldDescriptor... fieldDescriptors)
isEnabled
- if the fields should be enabled or disabledfieldDescriptor
- List of field descriptors to enable/disablepublic static void progressiveEnableAndRequireFields(Boolean isRequiredAndEnabled, FieldDescriptor... fieldDescriptors)
isEnabled
- fieldDescriptors
- public static void progressiveRequireFields(Boolean isRequired, FieldDescriptor... fieldDescriptors)
isRequired
- fieldDescriptors
- protected static void enableField(Boolean isEnabled, FieldDescriptor fd)
isEnabled
- fd
- Copyright © 2004-2013 The Kuali Foundation. All Rights Reserved.