com.davesag.jsf
Interface Handler

All Known Subinterfaces:
ReadWriteHandler
All Known Implementing Classes:
AbstractHandler, AbstractReadWriteHandler

public interface Handler

A Handler is a JSF Managed Mean that is responsible correctly loading an underlying bean and acting as an MVC controller between it and a Map of user displayable properties.

The bean lifecycle can be broken down as follows:
retrieval
model / view accessability
.


Method Summary
 Map getFields()
          Accessor for the map of properties to be presented to the view layer.
 Object getItem()
          Accessor for the underlying bean that this handler is handling.
 boolean isActive()
          Is there currently a bean being handled?
 String load()
          This is a JSF action method that loads an instance of the handled bean, given a unique identifier passed in the request.
 

Method Detail

getItem

public Object getItem()
Accessor for the underlying bean that this handler is handling.

Returns:
the underlying bean, or null if no bean is being handled.

getFields

public Map getFields()
Accessor for the map of properties to be presented to the view layer.

Returns:
a map of properties, keyed by their name.

isActive

public boolean isActive()
Is there currently a bean being handled?

Returns:
true if there is a currently handled bean.

load

public String load()
This is a JSF action method that loads an instance of the handled bean, given a unique identifier passed in the request. The loaded object becomes the current item and its properties are translated and stored in a view facing Map of fields.



JSF Helper API version 20 Jan 2005. (C) 2004 Dave Sag.