org.apache.myfaces.trinidadinternal.el
Class HelpProvider

java.lang.Object
  extended by org.apache.myfaces.trinidadinternal.el.HelpProvider
Direct Known Subclasses:
SecondaryWindowHelpProvider

public abstract class HelpProvider
extends java.lang.Object

The HelpProvider abstract class provides flexible mechanism for enabling context-sensitive help from applications created with the UIX UI Components or UIX language. HelpProvider is a bean that defines two standard Map and a set of standard keys.

Similar to most UI frameworks, context sensitive help in the UIX Framework is topic-id based. Developers use topic-ids in their pages and components, and these topic-ids are passed to the help technology which resolves the topic-id at runtime and displays the desired help topic. In UIX, developers will be able to use topic-ids as keys to the "helpTopic" Map when data-binding the destination attribute of various components (links, buttons, global buttons). In addition, the developer will be able to use the standard HelpProvider constant keys (like FRONT_PAGE_KEY) when data-binding destinations using the "helpSystem" Map to display navigation and system pages in the help system.

HelpProvider can be extended to support a variety of different help technologies. Subclasses only need to implement the getHelpSystemValue() method and the getHelpTopicValue() method. Implementations can use various schemes to create the value returned for a given topic-id or system key (remember that the value will be used as a destination).

For example, a simple getHelpTopicValue() implementation would simply map the topic-ID to the URL of a static webpage, and return that string URL as the value. A HelpProvider subclass for a web-based help system, like the OracleHelpProvider, may choose to generate a URL off to a separate servlet and simply pass the topic-id as a parameter.

Most HelpProvider subclasses will wish to return a javascript pseudo URL that will launch a secondary window for displaying the help topic. See the SecondaryWindowHelpProvider abstract class for more information.

Version:
$Name: $ ($Revision: adfrt/faces/adf-faces-impl/src/main/java/oracle/adfinternal/view/faces/el/HelpProvider.java#0 $) $Date: 10-nov-2005.19:06:18 $
Author:
The Oracle ADF Faces Team

Field Summary
static java.lang.String FRONT_PAGE_KEY
           
 
Constructor Summary
HelpProvider()
           
 
Method Summary
 java.util.Map<java.lang.String,java.lang.Object> getHelpSystemMap()
           
protected abstract  java.lang.Object getHelpSystemValue(java.lang.Object key)
          Subclasses of HelpProvider must implement this method.
 java.util.Map<java.lang.String,java.lang.Object> getHelpTopicMap()
           
protected abstract  java.lang.Object getHelpTopicValue(java.lang.Object key)
          Subclasses of HelpProvider must implement this method.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

FRONT_PAGE_KEY

public static final java.lang.String FRONT_PAGE_KEY
See Also:
Constant Field Values
Constructor Detail

HelpProvider

public HelpProvider()
Method Detail

getHelpTopicMap

public java.util.Map<java.lang.String,java.lang.Object> getHelpTopicMap()

getHelpSystemMap

public java.util.Map<java.lang.String,java.lang.Object> getHelpSystemMap()

getHelpTopicValue

protected abstract java.lang.Object getHelpTopicValue(java.lang.Object key)
Subclasses of HelpProvider must implement this method. The key passed as the selection criteria should be treated as a topic-id, and the return value should be a destination (URL string or javascript) for the help topic page.

Parameters:
key - the selection criteria (topic-id)
Returns:
the value (should be string destination) for the selection criteria

getHelpSystemValue

protected abstract java.lang.Object getHelpSystemValue(java.lang.Object key)
Subclasses of HelpProvider must implement this method. The key passed as the selection criteria should be one of the keys defined as HelpProvider constants, otherwise implementations are free to return null. The return value should be a destination (URL string or javascript) for the appropriate page in the help system.

Parameters:
key - the selection criteria (HelpProvider key)
Returns:
the value (should be string destination) for the selection criteria


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