|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object com.google.gwt.user.client.ui.UIObject com.google.gwt.user.client.ui.Widget com.google.gwt.user.client.ui.Composite org.kuali.student.common.ui.client.mvc.Controller org.kuali.student.common.ui.client.configurable.mvc.LayoutController
public abstract class LayoutController
The LayoutController is a central piece of the UIF. This controller is also itself a view. As such, LayoutControllers can also have other LayoutControllers as their views.
Controller
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 |
Field Summary | |
---|---|
protected Enum<?> |
defaultView
|
protected String |
name
|
protected View |
startPopupView
|
protected KSLightBox |
startViewWindow
|
protected Map<String,Enum<?>> |
viewEnumMap
|
protected Map<Enum<?>,View> |
viewMap
|
protected Enum<?> |
viewType
|
Fields inherited from class org.kuali.student.common.ui.client.mvc.Controller |
---|
context, NO_OP_CALLBACK, parentController |
Fields inherited from class com.google.gwt.user.client.ui.UIObject |
---|
DEBUG_ID_PREFIX |
Constructor Summary | |
---|---|
LayoutController(String controllerId)
Constructor Sets up event handlers fro section update events and validation request events. |
Method Summary | ||
---|---|---|
void |
addStartViewPopup(View view)
Creates a popup window with the view, that can be shown when needed for additional information needed from the user |
|
void |
addView(View view)
Add a view to this LayoutController. |
|
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)
Default implementation does nothing on before show. |
|
void |
beforeViewChange(Enum<?> viewChangingTo,
Callback<Boolean> okToChange)
This particular implementation of beforeViewChange checks to see if all its view contains a Controller and if it does checks with that controller to see if it is ok to change the view. |
|
ValidationResultInfo.ErrorLevel |
checkForErrors(List<ValidationResultInfo> list)
Check to see if the list of validation results have an error. |
|
void |
clear()
Can be called to reset a view to a cleared state. |
|
void |
collectBreadcrumbNames(List<String> names)
Adds a human readable name(s) to the list passed in for use in the breadcrumb |
|
static LayoutController |
findParentLayout(com.google.gwt.user.client.ui.Widget w)
Finds the first parent LayoutController of this LayoutController, returns null if this is the top level LayoutController. |
|
Controller |
getController()
Returns the controller associated with the view |
|
Enum<?> |
getDefaultView()
|
|
String |
getName()
Returns the view's name |
|
KSLightBox |
getStartPopup()
|
|
View |
getStartPopupView()
|
|
|
getView(V viewType,
Callback<View> callback)
Returns the view associated with the specified enum value. |
|
Enum<?> |
getViewEnum()
|
|
Enum<?> |
getViewEnumValue(String enumValue)
|
|
boolean |
isStartViewShowing()
|
|
boolean |
isValid(List<ValidationResultInfo> validationResults,
boolean checkCurrentSectionOnly)
Check to see if current/all section(s) is valid (ie. |
|
boolean |
isValid(List<ValidationResultInfo> validationResults,
boolean checkCurrentSectionOnly,
boolean allFields)
|
|
private boolean |
isValid(List<ValidationResultInfo> validationResults,
Section section,
boolean allFields)
|
|
void |
setController(Controller controller)
|
|
|
setDefaultView(V viewType)
Set the view with the viewType enum passed in to the be the default view. |
|
void |
setName(String name)
Sets the name of this LayoutController. |
|
void |
setViewEnum(Enum<?> viewType)
|
|
void |
showDefaultView(Callback<Boolean> onReadyCallback)
Shows the default view. |
|
void |
showFirstView(Callback<Boolean> onReadyCallback)
Show the view that was the first one added and will likely be the first one in a layout's menu, for example. |
|
void |
showStartPopup(Callback<Boolean> onReadyCallback)
|
|
abstract void |
updateModel()
Updates the model with information from this view. |
|
void |
updateModelFromCurrentView()
Update a the model from the view that is currently being shown by this controller |
|
void |
updateModelFromView(Enum<?> viewType)
Update the model with a single views information |
|
private void |
validate(DataModel model,
ValidateRequestEvent event)
|
Methods inherited from class org.kuali.student.common.ui.client.mvc.Controller |
---|
addApplicationEventHandler, collectHistory, findController, fireApplicationEvent, fireNavigationEvent, getCurrentView, getCurrentViewEnum, getDefaultModelId, getHistoryToken, getParentController, getViewContext, hideView, onHistoryEvent, registerModel, renderView, requestModel, requestModel, requestModel, resetCurrentView, setCurrentViewEnum, setDefaultModelId, setParentController, setViewContext, showView, showView |
Methods inherited from class com.google.gwt.user.client.ui.Composite |
---|
getWidget, initWidget, isAttached, onAttach, onBrowserEvent, onDetach, setWidget |
Methods inherited from class com.google.gwt.user.client.ui.Widget |
---|
addDomHandler, addHandler, delegateEvent, doAttachChildren, doDetachChildren, fireEvent, getHandlerCount, getLayoutData, getParent, isOrWasAttached, onLoad, onUnload, removeFromParent, setLayoutData, sinkEvents |
Methods inherited from class com.google.gwt.user.client.ui.UIObject |
---|
addStyleDependentName, addStyleName, ensureDebugId, ensureDebugId, ensureDebugId, getAbsoluteLeft, getAbsoluteTop, getElement, getOffsetHeight, getOffsetWidth, getStyleElement, getStyleName, getStyleName, getStylePrimaryName, getStylePrimaryName, getTitle, isVisible, isVisible, onEnsureDebugId, removeStyleDependentName, removeStyleName, setElement, setElement, setHeight, setPixelSize, setSize, setStyleName, setStyleName, setStyleName, setStylePrimaryName, setStylePrimaryName, setTitle, setVisible, setVisible, setWidth, toString, 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.configurable.mvc.layouts.ViewLayoutController |
---|
showView |
Methods inherited from interface org.kuali.student.common.ui.client.mvc.history.HistorySupport |
---|
collectHistory, onHistoryEvent |
Field Detail |
---|
protected Map<Enum<?>,View> viewMap
protected Map<String,Enum<?>> viewEnumMap
protected Enum<?> defaultView
protected String name
protected Enum<?> viewType
protected View startPopupView
protected KSLightBox startViewWindow
Constructor Detail |
---|
public LayoutController(String controllerId)
controllerId
- - not usedMethod Detail |
---|
private void validate(DataModel model, ValidateRequestEvent event)
public ValidationResultInfo.ErrorLevel checkForErrors(List<ValidationResultInfo> list)
list
-
public static LayoutController findParentLayout(com.google.gwt.user.client.ui.Widget w)
w
-
public void addStartViewPopup(View view)
ViewLayoutController
addStartViewPopup
in interface ViewLayoutController
ViewLayoutController.addStartViewPopup(org.kuali.student.common.ui.client.mvc.View)
public boolean isStartViewShowing()
public View getStartPopupView()
public void showStartPopup(Callback<Boolean> onReadyCallback)
public KSLightBox getStartPopup()
public void addView(View view)
ViewLayoutController
addView
in interface ViewLayoutController
ViewLayoutController.addView(org.kuali.student.common.ui.client.mvc.View)
public <V extends Enum<?>> void setDefaultView(V viewType)
ViewLayoutController
setDefaultView
in interface ViewLayoutController
ViewLayoutController.setDefaultView(java.lang.Enum)
public Enum<?> getDefaultView()
public abstract void updateModel()
View
updateModel
in interface View
View.updateModel()
public void updateModelFromView(Enum<?> viewType)
viewType
- public void updateModelFromCurrentView()
public <V extends Enum<?>> void getView(V viewType, Callback<View> callback)
Controller
getView
in class Controller
public Enum<?> getViewEnumValue(String enumValue)
getViewEnumValue
in class Controller
public void showDefaultView(Callback<Boolean> onReadyCallback)
Controller
showDefaultView
in class Controller
public void showFirstView(Callback<Boolean> onReadyCallback)
onReadyCallback
- public boolean isValid(List<ValidationResultInfo> validationResults, boolean checkCurrentSectionOnly)
validationResults
- List of validation results for the layouts model.checkCurrentSectionOnly
- true if errors should be checked on current section only, false if all sections should be checked
public boolean isValid(List<ValidationResultInfo> validationResults, boolean checkCurrentSectionOnly, boolean allFields)
validationResults
- checkCurrentSectionOnly
- allFields
-
isValid(List, boolean)
private boolean isValid(List<ValidationResultInfo> validationResults, Section section, boolean allFields)
public void beforeViewChange(Enum<?> viewChangingTo, Callback<Boolean> okToChange)
beforeViewChange
in class Controller
Controller.beforeViewChange(java.lang.Enum, org.kuali.student.common.ui.client.mvc.Callback)
public com.google.gwt.user.client.ui.Widget asWidget()
View
asWidget
in interface View
SectionView
public boolean beforeHide()
View
beforeHide
in interface View
public void beforeShow(Callback<Boolean> onReadyCallback)
beforeShow
in interface View
View.beforeShow(org.kuali.student.common.ui.client.mvc.Callback)
public Controller getController()
View
getController
in interface View
public String getName()
View
getName
in interface View
public Enum<?> getViewEnum()
getViewEnum
in interface View
public void setViewEnum(Enum<?> viewType)
public void setName(String name)
name
- public void setController(Controller controller)
public void collectBreadcrumbNames(List<String> names)
BreadcrumbSupport
collectBreadcrumbNames
in interface BreadcrumbSupport
public void clear()
View
clear
in interface View
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |