All Methods Static Methods Instance Methods Concrete Methods
Modifier and Type |
Method and Description |
void |
actionPerformed(ControllerEvent evt)
Should be overridden by subclasses to handle ControllerEvent s.
|
void |
addAction(ActionNode.Category category,
ActionListener<ActionNode.ActionNodeEvent> l) |
void |
addAction(ActionNode.Category category,
ActionNode action,
ActionListener<ActionNode.ActionNodeEvent> l) |
void |
addActionListener(ActionNode action,
ActionListener<ActionNode.ActionNodeEvent> l)
Adds a listener to respond to events fired by a given action.
|
void |
addActions(ActionNode.Category category,
ActionNode... actions)
Adds a set of actions to this controller, registered to a given category.
|
void |
addActions(ActionNode.Category category,
Actions actions) |
void |
addEventListener(ActionListener<ControllerEvent> l)
Adds a controller listener.
|
<T> void |
addLookup(Class<T> type,
T object)
Adds a lookup with a specific clas as a key.
|
void |
addLookup(Object obj)
|
<T> void |
addObjectFactory(Class<T> type,
Controller.ObjectFactory factory)
Registers a factory to create objects of the given type.
|
<T> T |
createObjectWithFactory(Class<T> type,
Object[] params)
This will attempt to create an object of the given type using registered factories.
|
protected ViewNode |
createViewNode()
Creates the view node that should be used as the node for the controller’s view.
|
protected void |
dispatchEvent(ControllerEvent evt)
Dispatches an event first to listeners of this controller, and then, if not consumed yet,
to listeners of the parent controller.
|
ActionNode |
extendAction(ActionNode.Category category,
boolean overwriteAttributes,
Attribute... attributes)
Extends an existing action from one of the parent controllers, and registers it as an action
on this controller.
|
ActionNode |
extendAction(ActionNode.Category category,
SuccessCallback<ActionNode> callback)
Extends an action from a parent controller, and registers it as an action on this controller.
|
void |
fillSlot(Tag slotId,
ActionListener<FillSlotEvent> l)
Adds a listener to be notified when the Slot placeholder with the given ID is requesting to be filled.
|
ActionNode |
getAction(ActionNode.Category category)
Gets an action in the specified category that is registered on this controller.
|
Actions |
getActions(ActionNode.Category category)
Gets actions registered in this Controller in the specified category.
|
ActionsNode |
getActionsNode(ActionNode.Category category,
boolean aggregate)
Gets an actions node for the given category such that it can be added directly to
a ViewNode .
|
ApplicationController |
getApplicationController()
Gets the ApplicationController for the current controller context.
|
FormController |
getFormController()
Gets the FormController for the current controller context.
|
FormController |
getFormController(int maxDistance)
Returns the FormController in this hierarchy if it can be found within a maximum distance when
traversing up the controller hierarchy.
|
ActionNode |
getInheritedAction(ActionNode.Category category)
Gets the first action matching the given category that is registered on this controller
or one of the controller’s parents.
|
Actions |
getInheritedActions(ActionNode.Category category,
boolean aggregate)
Gets actions registered in the specified category on this controller or parents.
|
Controller |
getParent()
Gets the parent controller for this controller.
|
AppSectionController |
getSectionController()
Gets the section controller for the current controller context.
|
ActionsNode |
getSingleActionsNode(ActionNode.Category category)
|
ViewController |
getViewController() |
ViewNode |
getViewNode()
Gets the ViewNode that should be used as the view model for views of this controller.
|
protected void |
initControllerActions()
This can be used to initialize actions that the controller uses.
|
boolean |
isStarted()
Checks if the controller is started.
|
<T> T |
lookup(Class<T> type)
Obtains an object of the given type that has been previously registered by this controller (or a parent controller) via the addLookup(java.lang.Object)
method.
|
Entity |
lookupEntity(Class type)
Obtains a lookup as an entity.
|
protected void |
onStartController()
A lifecycle method that shoudl be used to setup the controller.
|
protected void |
onStopController()
A lifecycle method that should be used to cleanup variables and listeners that were setup in
the onStartController() method.
|
<T> T |
parentLookup(Class<T> type)
Looks up an object starting at the parent controller.
|
Entity |
parentLookupEntity(Class type)
Looks up an entity starting at the parent controller.
|
void |
refresh()
Refreshes the controller.
|
void |
removeActionListener(ActionNode action,
ActionListener<ActionNode.ActionNodeEvent> l) |
void |
removeEventListener(ActionListener<ControllerEvent> l) |
void |
setParent(Controller parent)
Sets the parent controller for this controller.
|
static <T extends Controller> T |
start(T controller)
Static method that starts a given controller, and returns the controller back
for chaining.
|
void |
startController()
Starts the given controller.
|
<T> boolean |
withLookup(Class<T> type,
SuccessCallback<T> callback)
Does lookup for object of given type.
|
boolean |
withLookupEntity(Class type,
SuccessCallback<Entity> callback)
Looks up an entity of a given class, and executes the provided callback with it if the
entity is found.
|
<T> boolean |
withParentLookup(Class<T> type,
SuccessCallback<T> callback)
|
boolean |
withParentLookupEntity(Class type,
SuccessCallback<Entity> callback)
|