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, DictionaryBean, UifDictionaryBean, Component, ScriptEventSupport, 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 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(View view, Component parent)
          Build the external help
protected  void buildTooltipHelp(Component parent)
          Build the tooltip help
 List<Component> getComponentsForLifecycle()
          List of components that are contained within the component and should be sent through the lifecycle
 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(View view, Object model, Component parent)
          Finalize the help widget for usage
 void performInitialization(View view, Object model)
          The following initialization is performed: If help action not initialized and external help is configured, get the default help action 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
addCellCssClass, addDataAttribute, addDataAttributeIfNonEmpty, addStyleClass, appendToStyle, completeValidation, getAdditionalComponentsToRefresh, getAdditionalComponentsToRefreshJs, getAlign, getAllDataAttributesJs, getBaseId, getCellCssClasses, getCellStyle, getCellStyleClassesAsString, getCellWidth, getColSpan, getComplexDataAttributesJs, getComponentModifiers, getComponentPrototypes, getComponentSecurity, getComponentSecurityClass, getConditionalRefresh, getConditionalRefreshConditionJs, getConditionalRefreshControlNames, getContext, getCssClasses, getDataAttributes, getFinalizeMethodAdditionalArguments, getFinalizeMethodInvoker, getFinalizeMethodToCall, getId, getMethodToCallOnRefresh, getOnBlurScript, getOnChangeScript, getOnClickScript, getOnCloseScript, getOnDblClickScript, getOnDocumentReadyScript, getOnFocusScript, getOnKeyDownScript, getOnKeyPressScript, getOnKeyUpScript, getOnLoadScript, getOnMouseDownScript, getOnMouseMoveScript, getOnMouseOutScript, getOnMouseOverScript, getOnMouseUpScript, getOnSubmitScript, getOnUnloadScript, getOrder, getProgressiveDisclosureConditionJs, getProgressiveDisclosureControlNames, getProgressiveRender, getPropertyReplacerComponents, getPropertyReplacers, getRefreshTimer, getRefreshWhenChangedPropertyNames, getRenderedHtmlOutput, getRequired, getRowSpan, getSimpleDataAttributes, getStyle, getStyleClassesAsString, getTemplate, getTemplateName, getTemplateOptions, getTemplateOptionsJSString, getTitle, getToolTip, getValign, getWidth, isDisableSessionPersistence, isDisclosedByAction, isForceSessionPersistence, isHidden, isProgressiveRenderAndRefresh, isProgressiveRenderViaAJAX, isReadOnly, isRefreshedByAction, isRender, isResetDataOnRefresh, isSelfRendered, isSkipInTabOrder, performApplyModel, pushAllToContext, pushObjectToContext, pushToPropertyReplacerContext, setAdditionalComponentsToRefresh, setAlign, setBaseId, setCellCssClasses, setCellStyle, setCellWidth, setColSpan, setComponentModifiers, setComponentSecurity, setConditionalRefresh, setContext, setCssClasses, setDataAttributes, setDisableSessionPersistence, setDisclosedByAction, setFinalizeMethodAdditionalArguments, setFinalizeMethodInvoker, setFinalizeMethodToCall, setForceSessionPersistence, setHidden, setId, setMethodToCallOnRefresh, setOnBlurScript, setOnChangeScript, setOnClickScript, setOnCloseScript, setOnDblClickScript, setOnDocumentReadyScript, setOnFocusScript, setOnKeyDownScript, setOnKeyPressScript, setOnKeyUpScript, setOnLoadScript, setOnMouseDownScript, setOnMouseMoveScript, setOnMouseOutScript, setOnMouseOverScript, setOnMouseUpScript, setOnSubmitScript, setOnUnloadScript, setOrder, setProgressiveRender, setProgressiveRenderAndRefresh, setProgressiveRenderViaAJAX, setPropertyReplacers, setReadOnly, setRefreshedByAction, setRefreshTimer, setRefreshWhenChangedPropertyNames, setRender, setRenderedHtmlOutput, setRequired, setResetDataOnRefresh, setRowSpan, setSelfRendered, setSkipInTabOrder, setStyle, setTemplate, setTemplateName, setTemplateOptions, setTemplateOptionsJSString, setTitle, setToolTip, setValign, setWidth
 
Methods inherited from class org.kuali.rice.krad.datadictionary.uif.UifDictionaryBeanBase
getExpressionGraph, getPropertyExpression, getPropertyExpressions, getRefreshExpressionGraph, setExpressionGraph, setPropertyExpressions, setRefreshExpressionGraph
 
Methods inherited from class org.kuali.rice.krad.datadictionary.DictionaryBeanBase
getComponentCode, getNamespaceCode, setComponentCode, setNamespaceCode
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface org.kuali.rice.krad.uif.component.Component
addCellCssClass, addDataAttribute, addStyleClass, appendToStyle, completeValidation, getAdditionalComponentsToRefresh, getAdditionalComponentsToRefreshJs, getAlign, getAllDataAttributesJs, getBaseId, getCellCssClasses, getCellStyle, getCellWidth, getColSpan, getComplexDataAttributesJs, getComponentModifiers, getComponentPrototypes, getComponentSecurity, getConditionalRefresh, getConditionalRefreshConditionJs, getConditionalRefreshControlNames, getContext, getCssClasses, getDataAttributes, getFinalizeMethodAdditionalArguments, getFinalizeMethodInvoker, getFinalizeMethodToCall, getId, getOrder, getProgressiveDisclosureConditionJs, getProgressiveDisclosureControlNames, getProgressiveRender, getPropertyReplacerComponents, getPropertyReplacers, getRefreshTimer, getRefreshWhenChangedPropertyNames, getRenderedHtmlOutput, getRequired, getRowSpan, getSimpleDataAttributes, getStyle, getTemplate, getTemplateOptions, getTemplateOptionsJSString, getTitle, getToolTip, getValign, getWidth, isDisableSessionPersistence, isDisclosedByAction, isForceSessionPersistence, isHidden, isProgressiveRenderAndRefresh, isProgressiveRenderViaAJAX, isReadOnly, isRefreshedByAction, isRender, isResetDataOnRefresh, isSelfRendered, performApplyModel, pushAllToContext, pushObjectToContext, setAdditionalComponentsToRefresh, setAlign, setBaseId, setCellCssClasses, setCellStyle, setCellWidth, setColSpan, setComponentModifiers, setComponentSecurity, setConditionalRefresh, setContext, setCssClasses, setDataAttributes, setDisableSessionPersistence, setDisclosedByAction, setForceSessionPersistence, setHidden, setId, setOrder, setProgressiveRender, setProgressiveRenderAndRefresh, setProgressiveRenderViaAJAX, setPropertyReplacers, setReadOnly, setRefreshedByAction, setRefreshTimer, setRefreshWhenChangedPropertyNames, setRender, setRenderedHtmlOutput, setRequired, setResetDataOnRefresh, setRowSpan, setSelfRendered, setStyle, setTemplate, setTemplateOptions, setTemplateOptionsJSString, setTitle, setToolTip, setValign, setWidth
 
Methods inherited from interface org.kuali.rice.krad.datadictionary.uif.UifDictionaryBean
getExpressionGraph, getPropertyExpression, getPropertyExpressions, getRefreshExpressionGraph, setExpressionGraph, setPropertyExpressions, setRefreshExpressionGraph
 
Methods inherited from interface org.kuali.rice.krad.datadictionary.DictionaryBean
getComponentCode, getNamespaceCode
 
Methods inherited from interface org.kuali.rice.krad.uif.component.ScriptEventSupport
getOnBlurScript, getOnChangeScript, getOnClickScript, getOnCloseScript, getOnDblClickScript, getOnDocumentReadyScript, getOnFocusScript, getOnKeyDownScript, getOnKeyPressScript, getOnKeyUpScript, getOnLoadScript, getOnMouseDownScript, getOnMouseMoveScript, getOnMouseOutScript, getOnMouseOverScript, getOnMouseUpScript, getOnSubmitScript, getOnUnloadScript, setOnBlurScript, setOnLoadScript
 

Constructor Detail

Help

public Help()
Method Detail

performInitialization

public void performInitialization(View view,
                                  Object model)
The following initialization is performed:

Specified by:
performInitialization in interface Component
Overrides:
performInitialization in class ComponentBase
Parameters:
view - - view instance in which the component belongs
model - - object instance containing the view data
See Also:
ComponentBase.performInitialization(org.kuali.rice.krad.uif.view.View, java.lang.Object)

performFinalize

public void performFinalize(View view,
                            Object model,
                            Component 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
  • Specified by:
    performFinalize in interface Component
    Overrides:
    performFinalize in class ComponentBase
    Parameters:
    view - - view instance that should be finalized for rendering
    model - - top level object containing the data
    parent - - parent component
    See Also:
    ComponentBase.performFinalize(org.kuali.rice.krad.uif.view.View, java.lang.Object, org.kuali.rice.krad.uif.component.Component)

    buildExternalHelp

    protected void buildExternalHelp(View view,
                                     Component 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:
    view - - used to get the default namespace
    parent - used to get the help title text used in the html title attribute of the help icon

    buildTooltipHelp

    protected void buildTooltipHelp(Component 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

    getComponentsForLifecycle

    public List<Component> getComponentsForLifecycle()
    Description copied from interface: Component
    List of components that are contained within the component and should be sent through the lifecycle

    Used by ViewHelperService for the various lifecycle callbacks

    Specified by:
    getComponentsForLifecycle in interface Component
    Overrides:
    getComponentsForLifecycle in class ComponentBase
    Returns:
    List child components
    See Also:
    ComponentBase.getComponentsForLifecycle()

    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.

    * @return 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-2013 The Kuali Foundation. All Rights Reserved.