com.tirsen.angkor
Class Controller

java.lang.Object
  |
  +--com.tirsen.angkor.AbstractViewFactory
        |
        +--com.tirsen.angkor.Controller
All Implemented Interfaces:
java.io.Serializable, ViewFactory

public abstract class Controller
extends AbstractViewFactory

Base class useful for implementing controllers. TODO resolve error-handling currently this is performed during render phase setting up the models should be performed during parse phase during parse phase we can send all errors to the application which can decide upon passing the user to an error page how to load the models during parse phase? when navigating to a new page an event should be sent to that page ie. when changing the target of a named component link events should be sent (they should be queued up to the next parse phase), the controller adds a listener for this event (which probably could be performed by the base class Controller with an abstract template method createModels() throws Exception)

Version:
$Revision: 1.6 $
Author:
Jon Tirsén (tirsen@users.sourceforge.net)
See Also:
Serialized Form

Constructor Summary
Controller(Application application)
           
 
Method Summary
abstract  View createView()
           
 Application getApplication()
           
 java.lang.String getDisplayName()
           
 View getView()
          This method is called by the framework at any time and any number of times during the render phase.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Controller

public Controller(Application application)
Method Detail

getApplication

public Application getApplication()

getView

public View getView()
This method is called by the framework at any time and any number of times during the render phase. To decrease memory usage and optimize serialization the view is transient and referred using a weak reference. This implies that the createView method can be called at any time recreating the view. The createView method thus need to be able to completely restore the view and it's link to actualy persistent conversational state such as the models which should be kept in a non-transient field.


getDisplayName

public java.lang.String getDisplayName()

createView

public abstract View createView()


Copyright © 2002-2002 . All Rights Reserved.