|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.google.gwt.user.client.ui.UIObject
com.google.gwt.user.client.ui.Widget
com.google.gwt.user.client.ui.Panel
com.google.gwt.user.client.ui.ComplexPanel
org.kuali.student.common.ui.client.widgets.field.layout.element.SpanPanel
org.kuali.student.common.ui.client.configurable.mvc.sections.BaseSection
org.kuali.student.common.ui.client.configurable.mvc.sections.MultiplicitySection
public class MultiplicitySection
This class creates a section containing a multiplicity widget based on the supplied configuration
Sample code to use this class :-
private void addVersionCodeFields(Section section) {
QueryPath parentPath = QueryPath.concat(COURSE, QueryPath.getPathSeparator(), VERSIONS);
MultiplicityConfiguration config = new MultiplicityConfiguration(MultiplicityConfiguration.MultiplicityType.GROUP,
MultiplicityConfiguration.StyleType.TOP_LEVEL_GROUP, getMetaData(parentPath.toString()));
config.setAddItemLabel(getLabel(LUConstants.ADD_VERSION_CODE_LABEL_KEY));
config.setItemLabel(getLabel(LUConstants.VERSION_CODE_LABEL_KEY));
config.setUpdateable(true);
FieldDescriptor parentFd = buildFieldDescriptor(COURSE + QueryPath.getPathSeparator() + VERSIONS, getLabel(LUConstants.VERSION_CODES_LABEL_KEY), null);
config.setParentFd(parentFd);
FieldDescriptor versionCode = buildFieldDescriptor(CreditCourseVersionsConstants.VERSION_CODE, LUConstants.VERSION_CODE_LABEL_KEY, parentPath.toString());
FieldDescriptor versionTitle = buildFieldDescriptor(CreditCourseVersionsConstants.VERSION_TITLE, LUConstants.TITLE_LABEL_KEY, parentPath.toString());
config.addField(versionCode);
config.addField(versionTitle);
MultiplicitySection ms = new MultiplicitySection(config);
section.addSection(ms);
}
TODO:
- Create factory methods for each 'flavour' of multiplicity
- Styling options for table, e.g. no grid lines
- For read-only multiplicities, set contained widgets to be read only too
| Nested Class Summary |
|---|
| Nested classes/interfaces inherited from class com.google.gwt.user.client.ui.UIObject |
|---|
com.google.gwt.user.client.ui.UIObject.DebugIdImpl, com.google.gwt.user.client.ui.UIObject.DebugIdImplEnabled |
| Nested classes/interfaces inherited from interface com.google.gwt.user.client.ui.IndexedPanel |
|---|
com.google.gwt.user.client.ui.IndexedPanel.ForIsWidget |
| Nested classes/interfaces inherited from interface com.google.gwt.user.client.ui.HasWidgets |
|---|
com.google.gwt.user.client.ui.HasWidgets.ForIsWidget |
| Field Summary |
|---|
| Fields inherited from class org.kuali.student.common.ui.client.configurable.mvc.sections.BaseSection |
|---|
fields, isDirty, isValidationEnabled, layout, layoutController, sections |
| Fields inherited from class com.google.gwt.user.client.ui.UIObject |
|---|
DEBUG_ID_PREFIX |
| Constructor Summary | |
|---|---|
MultiplicitySection(MultiplicityConfiguration config)
|
|
MultiplicitySection(MultiplicityConfiguration config,
Map<SwapCompositeCondition,List<SwapCompositeConditionFieldConfig>> swappableFieldsDefinition,
List<String> deletionParentKeys)
|
|
| Method Summary | |
|---|---|
MultiplicityConfiguration |
getConfig()
|
boolean |
isDirty()
Returns true if this this section is considered dirty (the user may have entered data into this section) |
void |
resetDirtyFlags()
|
void |
resetFieldInteractionFlags()
Resets all the dirty and focus flags on fields. |
void |
setParentPath(String parentPath)
|
| Methods inherited from class org.kuali.student.common.ui.client.configurable.mvc.sections.BaseSection |
|---|
add, addField, addSection, addSection, addStyleName, addWidget, clearValidationErrors, clearValidationWarnings, enableField, enableValidation, ensureDirtyFlagPath, getField, getFields, getLayout, getLayoutController, getSection, getSections, getUnnestedFields, isValidationEnabled, processValidationResults, processValidationResults, progressiveEnableAndRequireFields, progressiveEnableFields, progressiveRequireFields, removeField, removeField, removeSection, removeSection, removeWidget, removeWidget, setFieldHasHadFocusFlags, setHelp, setInstructions, setIsDirty, setLayoutController, setRequired, setSectionId, setStyleName, updateModel, updateWidgetData |
| Methods inherited from class org.kuali.student.common.ui.client.widgets.field.layout.element.SpanPanel |
|---|
getExportElementSubset, getExportFieldValue, getText, insert, isExportElement, setExportElement, setHTML, setText |
| Methods inherited from class com.google.gwt.user.client.ui.ComplexPanel |
|---|
add, adjustIndex, checkIndexBoundsForAccess, checkIndexBoundsForInsertion, getChildren, getWidget, getWidgetCount, getWidgetIndex, getWidgetIndex, insert, insert, iterator, remove, remove |
| Methods inherited from class com.google.gwt.user.client.ui.Panel |
|---|
add, adopt, adopt, clear, disown, doAttachChildren, doDetachChildren, orphan, remove |
| Methods inherited from class com.google.gwt.user.client.ui.Widget |
|---|
addAttachHandler, addBitlessDomHandler, addDomHandler, addHandler, asWidget, asWidgetOrNull, createHandlerManager, delegateEvent, fireEvent, getHandlerCount, getLayoutData, getParent, isAttached, isOrWasAttached, onAttach, onBrowserEvent, onDetach, onLoad, onUnload, removeFromParent, setLayoutData, sinkEvents |
| Methods inherited from class com.google.gwt.user.client.ui.UIObject |
|---|
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 |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
|---|
public MultiplicitySection(MultiplicityConfiguration config)
public MultiplicitySection(MultiplicityConfiguration config,
Map<SwapCompositeCondition,List<SwapCompositeConditionFieldConfig>> swappableFieldsDefinition,
List<String> deletionParentKeys)
| Method Detail |
|---|
public void setParentPath(String parentPath)
public void resetFieldInteractionFlags()
BaseSection
resetFieldInteractionFlags in interface SectionresetFieldInteractionFlags in class BaseSectionSection.resetFieldInteractionFlags()public void resetDirtyFlags()
resetDirtyFlags in interface SectionresetDirtyFlags in class BaseSectionpublic boolean isDirty()
BaseSection
isDirty in interface SectionisDirty in class BaseSectionSection.isDirty()public MultiplicityConfiguration getConfig()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||