com.davesag.jsf
Interface ReadWriteHandler

All Superinterfaces:
Handler
All Known Implementing Classes:
AbstractReadWriteHandler

public interface ReadWriteHandler
extends Handler

A ReadWriteHandler is a JSF Managed Mean that is responsible for correctly handling the complete lifecycle of an underlying bean.

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


Method Summary
 String create()
          This is a JSF action method that creates a new default instance of the handled bean and returns a result string that the navigation handler can deal with.
 String delete()
          This is a JSF action method that deletes the current item.
 String release()
          This is a JSF action method that releases the current item without saving.
 String save()
          This is a JSF action method that saves the current item and releases it.
 
Methods inherited from interface com.davesag.jsf.Handler
getFields, getItem, isActive, load
 

Method Detail

create

public String create()
This is a JSF action method that creates a new default instance of the handled bean and returns a result string that the navigation handler can deal with. The created object becomes the current item and its properties are translated and stored in a view facing Map of fields.

Returns:
a result code.

save

public String save()
This is a JSF action method that saves the current item and releases it. This is an exit point for the handler. After save is called there is no current item or Map of fields.

Returns:
a result code.

release

public String release()
This is a JSF action method that releases the current item without saving. It is usually the action associated with a cancel button. This is an exit point for the handler. After release is called there is no current item or Map of fields.

Returns:
a result code.

delete

public String delete()
This is a JSF action method that deletes the current item. After delete is called there is no current item or Map of fields.

Returns:
a result code.


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