org.apache.shale.dialog.scxml
Interface DialogStateMapper

All Known Implementing Classes:
DefaultDialogStateMapper

public interface DialogStateMapper

DialogStateMapper is an interface describing a pluggable mechanism to map between the state ID within a SCXML dialog definition and the corresponding JavaServer Faces view identifier that should be rendered when the dialog state machine comes to rest in that state.

By default, an identity transform is applied i.e. the JavaServer Faces view identifier used is the same as the dialog state identifier.

The default behavior can be changed by replacing the application scoped bean at key Globals.STATE_MAPPER. The replacement must implement DialogStateMapper.

Since:
1.0.4 $Id: DialogStateMapper.java 469656 2006-10-31 21:18:18Z rahul $

Method Summary
 String mapStateId(String dialogName, String stateId, javax.faces.context.FacesContext context)
          Return the JavaServer Faces view identifier that corresponds to current dialog state.
 

Method Detail

mapStateId

String mapStateId(String dialogName,
                  String stateId,
                  javax.faces.context.FacesContext context)

Return the JavaServer Faces view identifier that corresponds to current dialog state. The current FacesContext instance is also available so developers can consult pertinent information such as user role, current locale, user agent making the request etc. to map the state identifier to the view identifier, if needed.

Parameters:
dialogName - The logical name of the dialog this state belongs to
stateId - The state identifier for the current dialog state
context - The current FacesContext
Returns:
The JavaServer Faces view identifier that should be rendered


Copyright © 2004-2007 Apache Software Foundation. All Rights Reserved.