org.kuali.rice.krad.uif.widget
Class Help

java.lang.Object
  extended by org.kuali.rice.krad.datadictionary.DictionaryBeanBase
      extended by org.kuali.rice.krad.datadictionary.uif.UifDictionaryBeanBase
          extended by org.kuali.rice.krad.uif.component.ComponentBase
              extended by org.kuali.rice.krad.uif.widget.WidgetBase
                  extended by org.kuali.rice.krad.uif.widget.Help
All Implemented Interfaces:
Serializable, Cloneable, Copyable, DictionaryBean, UifDictionaryBean, Component, ScriptEventSupport, LifecycleElement, Widget, org.springframework.core.Ordered

public class Help
extends WidgetBase

Widget that renders help on a component

If help URL is specified then display help icon and/or if help summary is specified then display help tooltip.

Author:
Kuali Rice Team (rice.collab@kuali.org)
See Also:
Serialized Form

Field Summary
 
Fields inherited from class org.kuali.rice.krad.uif.component.ComponentBase
templateOptions
 
Fields inherited from class org.kuali.rice.krad.datadictionary.DictionaryBeanBase
componentCode, namespaceCode
 
Fields inherited from interface org.kuali.rice.krad.uif.component.Ordered
INITIAL_ORDER_VALUE
 
Fields inherited from interface org.springframework.core.Ordered
HIGHEST_PRECEDENCE, LOWEST_PRECEDENCE
 
Constructor Summary
Help()
           
 
Method Summary
protected  void buildExternalHelp(LifecycleElement parent)
          Build the external help
protected  void buildTooltipHelp(LifecycleElement parent)
          Build the tooltip help
 String getExternalHelpUrl()
          The external help Url
 Action getHelpAction()
          HelpActionField is used for rendering external help
 HelpDefinition getHelpDefinition()
          The help definition is used as the key to retrieve the external help Url from the parameter table of the database
protected  ParameterService getParameterService()
          Retrieve the parameter service
 String getTooltipHelpContent()
          TooltipHelpContent
 void performFinalize(Object model, LifecycleElement parent)
          Finalize the help widget for usage
 void performInitialization(Object model)
          The following initialization is performed: If help action not initialized and external help is configured, get the default help action component Initializes the component
 void setExternalHelpUrl(String externalHelpUrl)
          Setter for externalHelpUrl
 void setHelpAction(Action helpAction)
          Setter for helpAction
 void setHelpDefinition(HelpDefinition helpDefinition)
          Setter for the help definition of the database.
 void setTooltipHelpContent(String tooltipHelpContent)
          Setter for tooltipHelpContent
 
Methods inherited from class org.kuali.rice.krad.uif.widget.WidgetBase
getComponentTypeName
 
Methods inherited from class org.kuali.rice.krad.uif.component.ComponentBase
addDataAttribute, addScriptDataAttribute, addStyleClass, addWrapperCssClass, appendToStyle, checkMutable, clone, completeValidation, getAdditionalComponentsToRefresh, getAdditionalComponentsToRefreshJs, getAdditionalCssClasses, getAdditionalTemplates, getAlign, getCellWidth, getColSpan, getComponentModifiers, getComponentSecurity, getConditionalRefresh, getConditionalRefreshConditionJs, getConditionalRefreshControlNames, getContext, getCssClasses, getDataAttributes, getEventHandlerScript, getFinalizeMethodAdditionalArguments, getFinalizeMethodInvoker, getFinalizeMethodToCall, getId, getLibraryCssClasses, getMethodToCallOnRefresh, getOnBlurScript, getOnChangeScript, getOnClickScript, getOnCloseScript, getOnDblClickScript, getOnDocumentReadyScript, getOnFocusScript, getOnInputScript, getOnKeyDownScript, getOnKeyPressScript, getOnKeyUpScript, getOnLoadScript, getOnMouseDownScript, getOnMouseMoveScript, getOnMouseOutScript, getOnMouseOverScript, getOnMouseUpScript, getOnSubmitScript, getOnUnloadScript, getOrder, getPhasePathMapping, getPostRenderContent, getPreRenderContent, getProgressiveDisclosureConditionJs, getProgressiveDisclosureControlNames, getProgressiveRender, getPropertyReplacerComponents, getPropertyReplacers, getRefreshTimer, getRefreshWhenChangedPropertyNames, getRenderedHtmlOutput, getRequired, getRowSpan, getScriptDataAttributes, getScriptDataAttributesJs, getSimpleDataAttributes, getStyle, getStyleClassesAsString, getTemplate, getTemplateName, getTemplateOptions, getTemplateOptionsJSString, getTitle, getToolTip, getValign, getViewPath, getViewStatus, getWidth, getWrapperCssClasses, getWrapperCssClassesAsString, getWrapperStyle, initializeComponentSecurity, initializePendingTasks, isDisableSessionPersistence, isDisclosedByAction, isEditAuthz, isFinal, isForceSessionPersistence, isHidden, isInitialized, isModelApplied, isMutable, isProgressiveRenderAndRefresh, isProgressiveRenderViaAJAX, isReadOnly, isRefreshedByAction, isRender, isRendered, isResetDataOnRefresh, isRetrieveViaAjax, isSelfRendered, isSkipInTabOrder, isViewAuthz, notifyCompleted, performApplyModel, preventModification, pushAllToContext, pushObjectToContext, pushToPropertyReplacerContext, setAdditionalComponentsToRefresh, setAdditionalCssClasses, setAlign, setCellWidth, setColSpan, setComponentModifiers, setComponentSecurity, setConditionalRefresh, setContext, setCssClasses, setDataAttributes, setDisableSessionPersistence, setDisclosedByAction, setEditAuthz, setFinalizeMethodAdditionalArguments, setFinalizeMethodInvoker, setFinalizeMethodToCall, setForceSessionPersistence, setHidden, setId, setLibraryCssClasses, setMethodToCallOnRefresh, setOnBlurScript, setOnChangeScript, setOnClickScript, setOnCloseScript, setOnDblClickScript, setOnDocumentReadyScript, setOnFocusScript, setOnInputScript, setOnKeyDownScript, setOnKeyPressScript, setOnKeyUpScript, setOnLoadScript, setOnMouseDownScript, setOnMouseMoveScript, setOnMouseOutScript, setOnMouseOverScript, setOnMouseUpScript, setOnSubmitScript, setOnUnloadScript, setOrder, setPhasePathMapping, setPostRenderContent, setPreRenderContent, setProgressiveRender, setProgressiveRenderAndRefresh, setProgressiveRenderViaAJAX, setPropertyReplacers, setReadOnly, setRefreshedByAction, setRefreshTimer, setRefreshWhenChangedPropertyNames, setRender, setRenderedHtmlOutput, setRequired, setResetDataOnRefresh, setRetrieveViaAjax, setRowSpan, setScriptDataAttributes, setSelfRendered, setSkipInTabOrder, setStyle, setTemplate, setTemplateName, setTemplateOptions, setTemplateOptionsJSString, setTitle, setToolTip, setValign, setViewAuthz, setViewPath, setViewStatus, setViewStatus, setWidth, setWrapperCssClasses, setWrapperStyle, skipLifecycle
 
Methods inherited from class org.kuali.rice.krad.datadictionary.uif.UifDictionaryBeanBase
getExpressionGraph, getPropertyExpression, getPropertyExpressions, setExpressionGraph, setPropertyExpressions
 
Methods inherited from class org.kuali.rice.krad.datadictionary.DictionaryBeanBase
copy, dataDictionaryPostProcessing, getComponentCode, getNamespaceCode, setComponentCode, setNamespaceCode, unwrap
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface org.kuali.rice.krad.uif.component.Component
addDataAttribute, addScriptDataAttribute, addStyleClass, addWrapperCssClass, appendToStyle, completeValidation, getAdditionalComponentsToRefresh, getAdditionalComponentsToRefreshJs, getAdditionalCssClasses, getAdditionalTemplates, getAlign, getCellWidth, getColSpan, getComponentModifiers, getComponentSecurity, getConditionalRefresh, getConditionalRefreshConditionJs, getConditionalRefreshControlNames, getCssClasses, getDataAttributes, getEventHandlerScript, getFinalizeMethodAdditionalArguments, getFinalizeMethodInvoker, getFinalizeMethodToCall, getLibraryCssClasses, getMethodToCallOnRefresh, getOrder, getPostRenderContent, getPreRenderContent, getProgressiveDisclosureConditionJs, getProgressiveDisclosureControlNames, getProgressiveRender, getPropertyReplacerComponents, getPropertyReplacers, getRefreshTimer, getRefreshWhenChangedPropertyNames, getRenderedHtmlOutput, getRequired, getRowSpan, getScriptDataAttributes, getScriptDataAttributesJs, getSimpleDataAttributes, getStyle, getStyleClassesAsString, getTemplate, getTemplateName, getTemplateOptions, getTemplateOptionsJSString, getTitle, getToolTip, getValign, getWidth, getWrapperCssClasses, getWrapperStyle, isDisableSessionPersistence, isDisclosedByAction, isForceSessionPersistence, isHidden, isProgressiveRenderAndRefresh, isProgressiveRenderViaAJAX, isReadOnly, isRefreshedByAction, isRendered, isResetDataOnRefresh, isRetrieveViaAjax, isSelfRendered, setAdditionalComponentsToRefresh, setAdditionalCssClasses, setAlign, setCellWidth, setColSpan, setComponentModifiers, setComponentSecurity, setConditionalRefresh, setCssClasses, setDataAttributes, setDisableSessionPersistence, setDisclosedByAction, setForceSessionPersistence, setHidden, setLibraryCssClasses, setOrder, setPostRenderContent, setPreRenderContent, setProgressiveRender, setProgressiveRenderAndRefresh, setProgressiveRenderViaAJAX, setPropertyReplacers, setReadOnly, setRefreshedByAction, setRefreshTimer, setRefreshWhenChangedPropertyNames, setRenderedHtmlOutput, setRequired, setResetDataOnRefresh, setRetrieveViaAjax, setRowSpan, setScriptDataAttributes, setSelfRendered, setStyle, setTemplate, setTemplateName, setTemplateOptions, setTemplateOptionsJSString, setTitle, setToolTip, setValign, setViewStatus, setWidth, setWrapperCssClasses, setWrapperStyle
 
Methods inherited from interface org.kuali.rice.krad.datadictionary.uif.UifDictionaryBean
getExpressionGraph, getPropertyExpression, getPropertyExpressions, setExpressionGraph, setPropertyExpressions
 
Methods inherited from interface org.kuali.rice.krad.datadictionary.DictionaryBean
dataDictionaryPostProcessing, getComponentCode, getNamespaceCode
 
Methods inherited from interface org.kuali.rice.krad.uif.util.LifecycleElement
checkMutable, getContext, getId, getPhasePathMapping, getViewPath, getViewStatus, initializePendingTasks, isFinal, isInitialized, isModelApplied, isMutable, isRender, notifyCompleted, performApplyModel, pushAllToContext, pushObjectToContext, setContext, setId, setPhasePathMapping, setRender, setViewPath, setViewStatus, skipLifecycle
 
Methods inherited from interface org.kuali.rice.krad.datadictionary.Copyable
clone, copy, preventModification, unwrap
 
Methods inherited from interface org.kuali.rice.krad.uif.component.ScriptEventSupport
getOnBlurScript, getOnChangeScript, getOnClickScript, getOnCloseScript, getOnDblClickScript, getOnDocumentReadyScript, getOnFocusScript, getOnInputScript, getOnKeyDownScript, getOnKeyPressScript, getOnKeyUpScript, getOnLoadScript, getOnMouseDownScript, getOnMouseMoveScript, getOnMouseOutScript, getOnMouseOverScript, getOnMouseUpScript, getOnSubmitScript, getOnUnloadScript, setOnBlurScript, setOnChangeScript, setOnClickScript, setOnCloseScript, setOnDblClickScript, setOnDocumentReadyScript, setOnFocusScript, setOnInputScript, setOnKeyDownScript, setOnKeyPressScript, setOnKeyUpScript, setOnLoadScript, setOnMouseDownScript, setOnMouseMoveScript, setOnMouseOutScript, setOnMouseOverScript, setOnMouseUpScript, setOnSubmitScript, setOnUnloadScript
 

Constructor Detail

Help

public Help()
Method Detail

performInitialization

public void performInitialization(Object model)
The following initialization is performed: Initializes the component

Where components can set defaults and setup other necessary state. The initialize method should only be called once per component lifecycle and is invoked within the initialize phase of the view lifecylce.

Specified by:
performInitialization in interface LifecycleElement
Overrides:
performInitialization in class ComponentBase
Parameters:
model - - object instance containing the view data
See Also:
ComponentDefaultInitializeTask

performFinalize

public void performFinalize(Object model,
                            LifecycleElement parent)
Finalize the help widget for usage

In addition to the standard finalization the following tasks are performed:

  • Build the external help Url
  • Set the javascript action which opens the external help in window
  • Set render to false if help not configured
  • The following finalization is done here: The last phase before the view is rendered

    Here final preparations can be made based on the updated view state.

    Specified by:
    performFinalize in interface LifecycleElement
    Overrides:
    performFinalize in class ComponentBase
    Parameters:
    model - - top level object containing the data
    parent - - parent component

    buildExternalHelp

    protected void buildExternalHelp(LifecycleElement parent)
    Build the external help

    When the externalHelpUrl is blank and the helpDefinition is specified then the external help URL is looked up via the helpDefinition from the system parameters. The namespace in the helpDefinition does not need to be specified and will default to the namespace of the view.

    Set the javascript action to open the external help in a window.

    Set the html title attribute of the help icon.

    Parameters:
    parent - used to get the help title text used in the html title attribute of the help icon

    buildTooltipHelp

    protected void buildTooltipHelp(LifecycleElement parent)
    Build the tooltip help

    The help tooltip is set on the component. To use the help tooltip bean definition, the help's tooltip is used as and intermediary for setting up the tooltip widget and then copied to the component.

    Parameters:
    parent - used for checking misconfigurations

    getHelpAction

    public Action getHelpAction()
    HelpActionField is used for rendering external help

    Returns:
    Action for external help

    setHelpAction

    public void setHelpAction(Action helpAction)
    Setter for helpAction

    Parameters:
    helpAction -

    getHelpDefinition

    public HelpDefinition getHelpDefinition()
    The help definition is used as the key to retrieve the external help Url from the parameter table of the database

    Returns:
    HelpDefinition

    setHelpDefinition

    public void setHelpDefinition(HelpDefinition helpDefinition)
    Setter for the help definition of the database.

    Parameters:
    helpDefinition -

    getExternalHelpUrl

    public String getExternalHelpUrl()
    The external help Url

    This should contain a valid URL. When specified this URL takes precedence over the external help URL from the system parameters.

    Returns:
    Url of the external help

    setExternalHelpUrl

    public void setExternalHelpUrl(String externalHelpUrl)
    Setter for externalHelpUrl

    Parameters:
    externalHelpUrl -

    getTooltipHelpContent

    public String getTooltipHelpContent()
    TooltipHelpContent

    Returns:
    TooltipHelpContent

    setTooltipHelpContent

    public void setTooltipHelpContent(String tooltipHelpContent)
    Setter for tooltipHelpContent

    Parameters:
    tooltipHelpContent -

    getParameterService

    protected ParameterService getParameterService()
    Retrieve the parameter service

    Returns:
    ParameterService


    Copyright © 2005–2014 The Kuali Foundation. All rights reserved.