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.DebugIdImplEnabled
fields, 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, updateWidgetData
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
public MultiplicitySection(MultiplicityConfiguration config)
public MultiplicitySection(MultiplicityConfiguration config, Map<SwapCompositeCondition,List<SwapCompositeConditionFieldConfig>> swappableFieldsDefinition, List<String> deletionParentKeys)
public void setParentPath(String parentPath)
public void resetFieldInteractionFlags()
BaseSection
resetFieldInteractionFlags
in interface Section
resetFieldInteractionFlags
in class BaseSection
Section.resetFieldInteractionFlags()
public void resetDirtyFlags()
resetDirtyFlags
in interface Section
resetDirtyFlags
in class BaseSection
public boolean isDirty()
BaseSection
isDirty
in interface Section
isDirty
in class BaseSection
Section.isDirty()
public MultiplicityConfiguration getConfig()
Copyright © 2004-2013 The Kuali Foundation. All Rights Reserved.