org.viewaframework.controller
Interface ViewControllerDispatcher

All Known Implementing Classes:
DefaultViewControllerDispatcher

public interface ViewControllerDispatcher

This is the interface responsible for matching all the declared listeners to the components that are going to use them. This implementation is going to collect all the listeners and inject them in the components of a given view depending on the name of the view and the component.

Probably the implementation will be moved from the application context to the view context in order to make the framework more modular.

Since:
1.0
Author:
Mario Garcia

Method Summary
 void addController(String pathExpression, ViewController<? extends EventListener,? extends EventObject> controller)
           
 Map<String,ViewController<? extends EventListener,? extends EventObject>> getControllers()
          This method holds a map with the controllers sorted by viewId
 Map<String,List<ViewController<? extends EventListener,? extends EventObject>>> getViewControllers(ViewContainer view)
          This method loops all the components inserted in the controllers general list and only takes those from the view given as parameter.
 void removeController(String pathExpression)
           
 void setControllers(Map<String,ViewController<? extends EventListener,? extends EventObject>> controllers)
          This method receives all the listeners of the application sorted by view id.
 

Method Detail

addController

void addController(String pathExpression,
                   ViewController<? extends EventListener,? extends EventObject> controller)
Parameters:
pathExpression -
controller -

getControllers

Map<String,ViewController<? extends EventListener,? extends EventObject>> getControllers()
This method holds a map with the controllers sorted by viewId

Returns:
The map sorted by view id

getViewControllers

Map<String,List<ViewController<? extends EventListener,? extends EventObject>>> getViewControllers(ViewContainer view)
This method loops all the components inserted in the controllers general list and only takes those from the view given as parameter.

Parameters:
view - The view whose listeners we want to collect
Returns:
The listeners that belongs to the view

removeController

void removeController(String pathExpression)
Parameters:
pathExpression -

setControllers

void setControllers(Map<String,ViewController<? extends EventListener,? extends EventObject>> controllers)
This method receives all the listeners of the application sorted by view id.

Parameters:
controllers -


Copyright © 2010. All Rights Reserved.