com.jalios.jcms.taglib
Class TooltipTag

java.lang.Object
  extended by javax.servlet.jsp.tagext.TagSupport
      extended by javax.servlet.jsp.tagext.BodyTagSupport
          extended by com.jalios.jcms.taglib.TooltipTag
All Implemented Interfaces:
JcmsConstants, JaliosConstants, Serializable, javax.servlet.jsp.tagext.BodyTag, javax.servlet.jsp.tagext.IterationTag, javax.servlet.jsp.tagext.JspTag, javax.servlet.jsp.tagext.Tag

public class TooltipTag
extends javax.servlet.jsp.tagext.BodyTagSupport
implements JcmsConstants

This tag prints a small tooltip icons that displays inline or ajax content

Version:
$Revision: 27753 $
Author:
Jean-Philippe Encausse
See Also:
Serialized Form

Nested Class Summary
static class TooltipTag.Tooltip
           
 
Field Summary
protected  String bodyText
           
protected  String[] glpParams
           
protected  String icon
           
protected  String longdesc
           
protected  String property
           
static String REVISION
           
protected  String sprite
           
static String TOOLTIP_CLASS
           
static String TOOLTIP_CLASS_INLINE
           
static String TOOLTIP_URI
           
 
Fields inherited from class javax.servlet.jsp.tagext.BodyTagSupport
bodyContent
 
Fields inherited from class javax.servlet.jsp.tagext.TagSupport
id, pageContext
 
Fields inherited from interface com.jalios.jcms.JcmsConstants
ADATE_SEARCH, ADMIN_NOTES_PROP, ADVANCED_TAB, ARCHIVES_DIR, ASCII_WIDTH, CATEGORY_TAB, CDATE_SEARCH, COMMON_ALARM, CONTENT_TAB, COOKIE_MAX_AGE, CRYPT_MD5, CRYPT_UNDEFINED, CRYPT_UNIX, CTRL_TOPIC_INTERNAL, CTRL_TOPIC_REF, CTRL_TOPIC_VALUE, CTRL_TOPIC_WRITE, CUSTOM_PROP, DOCCHOOSER_HEIGHT, DOCCHOOSER_WIDTH, DOCS_DIR, EDATE_SEARCH, EMAIL_REGEXP, ERROR_MSG, FORBIDDEN_FILE_ACCESS, FORBIDDEN_REDIRECT, FORCE_REDIRECT, ICON_ARCHIVE, ICON_LOCK, ICON_LOCK_STRONG, ICON_WARN, ICON_WH_BOOK_CLOSED, ICON_WH_BOOK_OPEN, INFORMATION_MSG, JALIOS_JUNIT_PROP, JCMS_CADDY, JCMS_MSG_LIST, JSYNC_DOWNLOAD_DIR, JSYNC_SYNC_ALARM, LOG_FILE, LOG_TOPIC_SECURITY, LOGGER_PROP, LOGGER_XMLPROP, MBR_PHOTO_DIR, MDATE_SEARCH, MONITOR_XML, OP_CREATE, OP_DEEP_COPY, OP_DEEP_DELETE, OP_DELETE, OP_MERGE, OP_UPDATE, PDATE_SEARCH, PHOTO_DIR, PHOTO_ICON, PHOTO_ICON_HEIGHT, PHOTO_ICON_WIDTH, PHOTO_LARGE, PHOTO_LARGE_HEIGHT, PHOTO_LARGE_WIDTH, PHOTO_NORMAL, PHOTO_NORMAL_HEIGHT, PHOTO_NORMAL_WIDTH, PHOTO_SMALL, PHOTO_SMALL_HEIGHT, PHOTO_SMALL_WIDTH, PHOTO_TINY, PHOTO_TINY_HEIGHT, PHOTO_TINY_WIDTH, PREVIOUS_TAB, PRINT_VIEW, PRIVATE_FILE_ACCESS, PUBLIC_FILE_ACCESS, READ_RIGHT_TAB, SDATE_SEARCH, SEARCHENGINE_ALARM, SESSION_AUTHORIZED_FILENAMES_SET, STATS_REPORT_DIR, STATUS_PROP, STORE_XML, TEMPLATE_TAB, THUMBNAIL_LARGE_HEIGHT, THUMBNAIL_LARGE_WIDTH, THUMBNAIL_SMALL_HEIGHT, THUMBNAIL_SMALL_WIDTH, UDATE_SEARCH, UPDATE_RIGHT_TAB, UPLOAD_DIR, URL_REGEXP, WARNING_MSG, WEBAPP_PROP, WFEXPRESS_ALARM, WFREMINDER_ALARM, WORKFLOW_TAB, WORKFLOW_XML
 
Fields inherited from interface com.jalios.util.JaliosConstants
CRLF, MILLIS_IN_ONE_DAY, MILLIS_IN_ONE_HOUR, MILLIS_IN_ONE_MINUTE, MILLIS_IN_ONE_MONTH, MILLIS_IN_ONE_SECOND, MILLIS_IN_ONE_WEEK, MILLIS_IN_ONE_YEAR
 
Fields inherited from interface javax.servlet.jsp.tagext.BodyTag
EVAL_BODY_BUFFERED, EVAL_BODY_TAG
 
Fields inherited from interface javax.servlet.jsp.tagext.IterationTag
EVAL_BODY_AGAIN
 
Fields inherited from interface javax.servlet.jsp.tagext.Tag
EVAL_BODY_INCLUDE, EVAL_PAGE, SKIP_BODY, SKIP_PAGE
 
Constructor Summary
TooltipTag()
           
 
Method Summary
protected  void clean()
           
 int doAfterBody()
           
 int doEndTag()
           
 String getBodyText()
          Returns the value previously sets
 String getIcon()
          Returns the value of the icon attribute previously sets
 String getLongdesc()
          Returns the value of the longdesc attribute previously sets
static String getLongdescProperty(String ttGlp, String[] ttParams, boolean wrap)
          Convenient method use to generate longdesc tooltip property on an HTML tag.
 String[] getParams()
          Returns the value of the parameters associated with the given property
 String getProperty()
          Returns the value of the property previously sets
 String getSprite()
          Returns the value of the sprite attribute previously sets
static String getTooltipForLongdesc(String ttLongdesc)
          Convenient method use to generate tooltip IMG tag for a given longdesc.
static String getTooltipForLongdesc(String ttLongdesc, String ttIcon)
          Convenient method use to generate tooltip IMG tag for a given longdesc.
static String getTooltipForProperty(String ttGlp, String[] ttParams)
          Convenient method use to generate tooltip IMG tag for a given property.
static String getTooltipForProperty(String ttGlp, String[] ttParams, String ttIcon, String ttClass)
          Convenient method use to generate tooltip IMG tag for a given property.
static String getTooltipForText(String ttBody)
          Convenient method use to generate tooltip IMG tag for a given body text.
static String getTooltipForText(String ttBody, String ttIcon)
          Convenient method use to generate tooltip IMG tag for a given body text.
static String getTooltipForTitle(String ttTitle)
          Convenient method use to generate tooltip IMG tag for a given title.
static String getTooltipForTitle(String ttTitle, String ttIcon)
          Convenient method use to generate tooltip IMG tag for a given title.
static String getTooltipForTitle(String ttTitle, String ttIcon, String ttClass)
          Convenient method use to generate tooltip IMG tag for a given title.
 void setBodyText(String bodyText)
          Set the value used to fill tooltip content using inline DOM.
 void setIcon(String icon)
          Set the value of the icon attribute used to display tooltip.
 void setLongdesc(String longdesc)
          Set the value of the longdesc attribute used to fill tooltip content using AJAX request.
 void setParams(String[] pparams)
          Set the associated parameters of a given property
 void setProperty(String property)
          Set the value of the property used to fill tooltip content using AJAX request on dedicated longdesc uri.
 void setSprite(String sprite)
          Set the value of the sprite attribute used to display tooltip.
 
Methods inherited from class javax.servlet.jsp.tagext.BodyTagSupport
doInitBody, doStartTag, getBodyContent, getPreviousOut, release, setBodyContent
 
Methods inherited from class javax.servlet.jsp.tagext.TagSupport
findAncestorWithClass, getId, getParent, getValue, getValues, removeValue, setId, setPageContext, setParent, setValue
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface javax.servlet.jsp.tagext.Tag
getParent, setPageContext, setParent
 

Field Detail

REVISION

public static final String REVISION
See Also:
Constant Field Values

TOOLTIP_URI

public static final String TOOLTIP_URI
See Also:
Constant Field Values

TOOLTIP_CLASS

public static final String TOOLTIP_CLASS
See Also:
Constant Field Values

TOOLTIP_CLASS_INLINE

public static final String TOOLTIP_CLASS_INLINE
See Also:
Constant Field Values

bodyText

protected String bodyText

property

protected String property

glpParams

protected String[] glpParams

longdesc

protected String longdesc

icon

protected String icon

sprite

protected String sprite
Constructor Detail

TooltipTag

public TooltipTag()
Method Detail

doAfterBody

public int doAfterBody()
                throws javax.servlet.jsp.JspException
Specified by:
doAfterBody in interface javax.servlet.jsp.tagext.IterationTag
Overrides:
doAfterBody in class javax.servlet.jsp.tagext.BodyTagSupport
Throws:
javax.servlet.jsp.JspException

doEndTag

public int doEndTag()
             throws javax.servlet.jsp.JspException
Specified by:
doEndTag in interface javax.servlet.jsp.tagext.Tag
Overrides:
doEndTag in class javax.servlet.jsp.tagext.BodyTagSupport
Throws:
javax.servlet.jsp.JspException

clean

protected void clean()

getLongdescProperty

public static String getLongdescProperty(String ttGlp,
                                         String[] ttParams,
                                         boolean wrap)
Convenient method use to generate longdesc tooltip property on an HTML tag. The HTML element should use css class TOOLTIP_CLASS.

Parameters:
ttGlp - the jcms property
ttParams - the property's params
wrap - boolean true if the result should be wrap in a longdesc attribute
Returns:
String longdesc computed value for given property

getTooltipForProperty

public static String getTooltipForProperty(String ttGlp,
                                           String[] ttParams)
Convenient method use to generate tooltip IMG tag for a given property.

Parameters:
ttGlp - the jcms property
ttParams - the property's params
Returns:
String html tag computed for given property

getTooltipForProperty

public static String getTooltipForProperty(String ttGlp,
                                           String[] ttParams,
                                           String ttIcon,
                                           String ttClass)
Convenient method use to generate tooltip IMG tag for a given property.

Parameters:
ttGlp - the jcms property
ttParams - the property's params
ttIcon - a custom icon
Returns:
String html tag computed for given property

getTooltipForText

public static String getTooltipForText(String ttBody)
Convenient method use to generate tooltip IMG tag for a given body text.

Parameters:
ttBody - the inline body text
Returns:
String html tag computed for given property

getTooltipForText

public static String getTooltipForText(String ttBody,
                                       String ttIcon)
Convenient method use to generate tooltip IMG tag for a given body text.

Parameters:
ttBody - the inline body text
ttIcon - a custom icon
Returns:
String html tag computed for given property

getTooltipForLongdesc

public static String getTooltipForLongdesc(String ttLongdesc)
Convenient method use to generate tooltip IMG tag for a given longdesc.

Parameters:
ttLongdesc - the longdesc
Returns:
String html tag computed for given property

getTooltipForLongdesc

public static String getTooltipForLongdesc(String ttLongdesc,
                                           String ttIcon)
Convenient method use to generate tooltip IMG tag for a given longdesc.

Parameters:
ttLongdesc - the longdesc
ttIcon - a custom icon
Returns:
String html tag computed for given property

getTooltipForTitle

public static String getTooltipForTitle(String ttTitle)
Convenient method use to generate tooltip IMG tag for a given title.

Parameters:
ttTitle - the title
Returns:
String html tag computed for given property

getTooltipForTitle

public static String getTooltipForTitle(String ttTitle,
                                        String ttIcon)
Convenient method use to generate tooltip IMG tag for a given title.

Parameters:
ttTitle - the title
ttIcon - a custom icon
Returns:
String html tag computed for given property

getTooltipForTitle

public static String getTooltipForTitle(String ttTitle,
                                        String ttIcon,
                                        String ttClass)
Convenient method use to generate tooltip IMG tag for a given title.

Parameters:
ttTitle - the title
ttIcon - a custom icon
Returns:
String html tag computed for given property

getBodyText

public String getBodyText()
Returns the value previously sets

Returns:
String body text

setBodyText

public void setBodyText(String bodyText)
Set the value used to fill tooltip content using inline DOM.

Parameters:
bodyText - String body text

getProperty

public String getProperty()
Returns the value of the property previously sets

Returns:
String property

setProperty

public void setProperty(String property)
Set the value of the property used to fill tooltip content using AJAX request on dedicated longdesc uri.

Parameters:
property - String property

getParams

public String[] getParams()
Returns the value of the parameters associated with the given property

Returns:
String[] params

setParams

public void setParams(String[] pparams)
Set the associated parameters of a given property

Parameters:
pparams - String[] of parameters

getLongdesc

public String getLongdesc()
Returns the value of the longdesc attribute previously sets

Returns:
String longdesc

setLongdesc

public void setLongdesc(String longdesc)
Set the value of the longdesc attribute used to fill tooltip content using AJAX request.

Parameters:
longdesc - String longdesc

getIcon

public String getIcon()
Returns the value of the icon attribute previously sets

Returns:
String icon uri

setIcon

public void setIcon(String icon)
Set the value of the icon attribute used to display tooltip.

Parameters:
icon - String icon uri

getSprite

public String getSprite()
Returns the value of the sprite attribute previously sets

Returns:
String sprite value

setSprite

public void setSprite(String sprite)
Set the value of the sprite attribute used to display tooltip.

Parameters:
sprite - String sprite value


Copyright © 2001-2010 Jalios SA. All Rights Reserved.