org.kuali.student.common.ui.client.configurable.mvc.views
Class SectionView

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.views.SectionView
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, BreadcrumbSupport, HistorySupport, View, ReportExportWidget
Direct Known Subclasses:
CollaboratorSectionView, VerticalSectionView

public abstract class SectionView
extends BaseSection
implements View

A view implementation of a section. A section view is used to add sections as views to a controller.

Author:
Kuali Student

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
protected  DataModel model
           
protected  String modelId
           
 
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
SectionView()
           
SectionView(Enum<?> viewEnum, String viewName)
           
 
Method Summary
 void addView(View view)
          Add a view as a widget to this section
 com.google.gwt.user.client.ui.Widget asWidget()
          Get the attachable widget which represents this view
 boolean beforeHide()
          Called by the controller before the view is hidden to allow the view to perform cleanup or request confirmation from the user, etc.
 void beforeShow(Callback<Boolean> onReadyCallback)
          Called by controller before the view is displayed to allow lazy initialization or any other preparatory work to be done.
 void collectBreadcrumbNames(List<String> names)
          Adds a human readable name(s) to the list passed in for use in the breadcrumb
 String collectHistory(String historyStack)
           
 Controller getController()
          Returns the controller associated with the view
 DataModel getModel()
           
 String getModelId()
           
 String getName()
          Returns the view's name
 Enum<?> getViewEnum()
          This method gets view name enumeration
 void init(Enum<?> viewEnum, String viewName)
           
 boolean isExportButtonActive()
          This method needs to be implemented only on views that want the export button to display.
 void onHistoryEvent(String historyStack)
           
 void setController(Controller controller)
           
 void setModelId(String modelId)
           
 void setName(String name)
           
 void setViewEnum(Enum<?> viewEnum)
           
 void showExport(boolean show)
           
 String toString()
           
 void updateMetadata(ModelDefinition modelDefinition)
           
 void updateView()
          Update the fields on the screen with the model received back from requestModel on the parent controller
 void updateView(DataModel m)
          Force an update of fields on this section with the model passed in
 
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, isDirty, isValidationEnabled, processValidationResults, processValidationResults, progressiveEnableAndRequireFields, progressiveEnableFields, progressiveRequireFields, removeField, removeField, removeSection, removeSection, removeWidget, removeWidget, resetDirtyFlags, resetFieldInteractionFlags, 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, 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, unsinkEvents
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface org.kuali.student.common.ui.client.mvc.View
clear, updateModel
 

Field Detail

modelId

protected String modelId

model

protected DataModel model
Constructor Detail

SectionView

public SectionView()

SectionView

public SectionView(Enum<?> viewEnum,
                   String viewName)
Parameters:
viewEnum - Enumeration of this view - id used for navigation, history, and showing a view
viewName - Name of this view - what this view is called in the breadcrumb
Method Detail

init

public void init(Enum<?> viewEnum,
                 String viewName)

getViewEnum

public Enum<?> getViewEnum()
This method gets view name enumeration

Specified by:
getViewEnum in interface View
Returns:

setViewEnum

public void setViewEnum(Enum<?> viewEnum)

beforeShow

public void beforeShow(Callback<Boolean> onReadyCallback)
Called by controller before the view is displayed to allow lazy initialization or any other preparatory work to be done. In SectionView, the section is cleared of all validation errors, the model is requested from its parent controller, the widgets are updated with the latest data, and beforeShow is called on all of its potential child views.

Specified by:
beforeShow in interface View

getModelId

public String getModelId()

setModelId

public void setModelId(String modelId)

beforeHide

public boolean beforeHide()
Called by the controller before the view is hidden to allow the view to perform cleanup or request confirmation from the user, etc. Can cancel the action by returning false.

Specified by:
beforeHide in interface View
Returns:
true if the view can be hidden, or false to cancel the action.

getController

public Controller getController()
Returns the controller associated with the view

Specified by:
getController in interface View
Returns:
See Also:
View.getController()

getName

public String getName()
Returns the view's name

Specified by:
getName in interface View
Returns:
See Also:
View.getName()

setName

public void setName(String name)

setController

public void setController(Controller controller)

updateView

public void updateView()
Update the fields on the screen with the model received back from requestModel on the parent controller


updateView

public void updateView(DataModel m)
Force an update of fields on this section with the model passed in

Parameters:
m -

asWidget

public com.google.gwt.user.client.ui.Widget asWidget()
Description copied from interface: View
Get the attachable widget which represents this view

Specified by:
asWidget in interface com.google.gwt.user.client.ui.IsWidget
Specified by:
asWidget in interface View
Overrides:
asWidget in class com.google.gwt.user.client.ui.Widget
See Also:
View.asWidget()

collectHistory

public String collectHistory(String historyStack)
Specified by:
collectHistory in interface HistorySupport
See Also:
HistorySupport.collectHistory(java.lang.String)

onHistoryEvent

public void onHistoryEvent(String historyStack)
Specified by:
onHistoryEvent in interface HistorySupport
See Also:
HistorySupport.onHistoryEvent(java.lang.String)

collectBreadcrumbNames

public void collectBreadcrumbNames(List<String> names)
Description copied from interface: BreadcrumbSupport
Adds a human readable name(s) to the list passed in for use in the breadcrumb

Specified by:
collectBreadcrumbNames in interface BreadcrumbSupport
See Also:
BreadcrumbSupport.collectBreadcrumbNames(java.util.List)

addView

public void addView(View view)
Add a view as a widget to this section

Parameters:
view -

getModel

public DataModel getModel()

updateMetadata

public void updateMetadata(ModelDefinition modelDefinition)

toString

public String toString()
Overrides:
toString in class com.google.gwt.user.client.ui.UIObject

isExportButtonActive

public boolean isExportButtonActive()
Description copied from interface: View
This method needs to be implemented only on views that want the export button to display. The default implementation is not to display the export button

Specified by:
isExportButtonActive in interface View
Returns:

showExport

public void showExport(boolean show)
Specified by:
showExport in interface View


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