org.kuali.student.common.ui.client.configurable.mvc.sections
Class MultiplicitySection

java.lang.Object
  extended by com.google.gwt.user.client.ui.UIObject
      extended by com.google.gwt.user.client.ui.Widget
          extended by com.google.gwt.user.client.ui.Panel
              extended by com.google.gwt.user.client.ui.ComplexPanel
                  extended by org.kuali.student.common.ui.client.widgets.field.layout.element.SpanPanel
                      extended by org.kuali.student.common.ui.client.configurable.mvc.sections.BaseSection
                          extended by org.kuali.student.common.ui.client.configurable.mvc.sections.MultiplicitySection
All Implemented Interfaces:
com.google.gwt.event.logical.shared.HasAttachHandlers, com.google.gwt.event.shared.HasHandlers, com.google.gwt.user.client.EventListener, com.google.gwt.user.client.ui.HasWidgets, com.google.gwt.user.client.ui.HasWidgets.ForIsWidget, com.google.gwt.user.client.ui.IndexedPanel, com.google.gwt.user.client.ui.IndexedPanel.ForIsWidget, com.google.gwt.user.client.ui.IsWidget, Iterable<com.google.gwt.user.client.ui.Widget>, HasLayoutController, Section, ReportExportWidget

public class MultiplicitySection
extends BaseSection

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

MultiplicitySection

public MultiplicitySection(MultiplicityConfiguration config)

MultiplicitySection

public MultiplicitySection(MultiplicityConfiguration config,
                           Map<SwapCompositeCondition,List<SwapCompositeConditionFieldConfig>> swappableFieldsDefinition,
                           List<String> deletionParentKeys)
Method Detail

setParentPath

public void setParentPath(String parentPath)

resetFieldInteractionFlags

public void resetFieldInteractionFlags()
Description copied from class: BaseSection
Resets all the dirty and focus flags on fields.

Specified by:
resetFieldInteractionFlags in interface Section
Overrides:
resetFieldInteractionFlags in class BaseSection
See Also:
Section.resetFieldInteractionFlags()

resetDirtyFlags

public void resetDirtyFlags()
Specified by:
resetDirtyFlags in interface Section
Overrides:
resetDirtyFlags in class BaseSection

isDirty

public boolean isDirty()
Description copied from class: BaseSection
Returns true if this this section is considered dirty (the user may have entered data into this section)

Specified by:
isDirty in interface Section
Overrides:
isDirty in class BaseSection
See Also:
Section.isDirty()

getConfig

public MultiplicityConfiguration getConfig()


Copyright © 2004-2012 The Kuali Foundation. All Rights Reserved.