public class MultiplicitySection extends BaseSection
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 toocom.google.gwt.user.client.ui.UIObject.DebugIdImpl, com.google.gwt.user.client.ui.UIObject.DebugIdImplEnabledfields, isDirty, isValidationEnabled, layout, layoutController, sections| Constructor and Description |
|---|
MultiplicitySection(MultiplicityConfiguration config) |
MultiplicitySection(MultiplicityConfiguration config,
Map<SwapCompositeCondition,List<SwapCompositeConditionFieldConfig>> swappableFieldsDefinition,
List<String> deletionParentKeys) |
| Modifier and Type | Method and Description |
|---|---|
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) |
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, updateWidgetDatagetExportElementSubset, getExportFieldValue, getText, insert, isExportElement, setExportElement, setHTML, setTextadd, adjustIndex, checkIndexBoundsForAccess, checkIndexBoundsForInsertion, getChildren, getWidget, getWidgetCount, getWidgetIndex, getWidgetIndex, insert, insert, iterator, remove, removeadd, adopt, adopt, clear, disown, doAttachChildren, doDetachChildren, orphan, removeaddAttachHandler, addBitlessDomHandler, addDomHandler, addHandler, asWidget, asWidgetOrNull, createHandlerManager, delegateEvent, fireEvent, getHandlerCount, getLayoutData, getParent, isAttached, isOrWasAttached, onAttach, onBrowserEvent, onDetach, onLoad, onUnload, removeFromParent, setLayoutData, sinkEventsaddStyleDependentName, 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, unsinkEventspublic MultiplicitySection(MultiplicityConfiguration config)
public MultiplicitySection(MultiplicityConfiguration config, Map<SwapCompositeCondition,List<SwapCompositeConditionFieldConfig>> swappableFieldsDefinition, List<String> deletionParentKeys)
public void setParentPath(String parentPath)
public void resetFieldInteractionFlags()
BaseSectionresetFieldInteractionFlags in interface SectionresetFieldInteractionFlags in class BaseSectionSection.resetFieldInteractionFlags()public void resetDirtyFlags()
resetDirtyFlags in interface SectionresetDirtyFlags in class BaseSectionpublic boolean isDirty()
BaseSectionisDirty in interface SectionisDirty in class BaseSectionSection.isDirty()public MultiplicityConfiguration getConfig()
Copyright © 2004-2013 The Kuali Foundation. All Rights Reserved.