2.17.2: 2011-06-17

net.sf.basedb.clients.web.taglib
Class Icon

java.lang.Object
  extended by javax.servlet.jsp.tagext.TagSupport
      extended by net.sf.basedb.clients.web.taglib.Icon
All Implemented Interfaces:
Serializable, IterationTag, JspTag, Tag

public class Icon
extends TagSupport

This tag is used to make it easier to display icons on a BASE web page.

Example:

   <%@ taglib prefix="base" uri="/WEB-INF/base.tld" %>
   <base:icon image="required.gif" />

Syntax:

   <base:icon
      id=...
      clazz=...
      style=...
      image=...
      tooltip=...
      onclick=...
      visible=...
   >

Attribute Default value Required Description
id - no The ID of the icon. The value of this attribute goes directly into the standard id attribute. This means that if you need a reference to the note object in your own JavaScript code, you may for example use the following code:

icon = document.getElementById('<id>');

clazz icon no The value if this attribute goes directly into the standard HTML class attribute. This allows you to apply different styles to different icons.
style - no The value if this attribute goes directly into the standard HTML style attribute. This allows you to apply different styles to different icons.
image yes The name of the image to display. The image must be in the /images directory. Only include the filename, not the path. This taglib will find the correct path from the current jsp page.
tooltip no A short explanation that will show up as a tooltip.
onclick no An optional JavaScript statement that will exceute when the user clicks on the icon.
visible true no If the note should be visible or not.

Version:
2.0
Author:
Nicklas
See Also:
Serialized Form

Field Summary
private  String clazz
          Optional class attribute
private  String image
          The filename of the image.
private  String onClick
          An optional JavaScript statement.
private  Page page
          The parent <base:page> tag.
private static long serialVersionUID
           
private  String style
          Optional style attribute
private  String tooltip
          An optional tooltip.
private  boolean visible
          If the icon should be visible or not.
 
Fields inherited from class javax.servlet.jsp.tagext.TagSupport
id, pageContext
 
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
Icon()
           
 
Method Summary
 int doStartTag()
           
 String getClazz()
           
 String getImage()
           
 String getOnclick()
           
 String getStyle()
           
 String getTooltip()
           
 boolean isVisible()
           
 void setClazz(String clazz)
           
 void setImage(String image)
           
 void setOnclick(String onClick)
           
 void setStyle(String style)
           
 void setTooltip(String tooltip)
           
 void setVisible(boolean visible)
           
 
Methods inherited from class javax.servlet.jsp.tagext.TagSupport
doAfterBody, doEndTag, findAncestorWithClass, getId, getParent, getValue, getValues, release, removeValue, setId, setPageContext, setParent, setValue
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

serialVersionUID

private static final long serialVersionUID
See Also:
Constant Field Values

page

private Page page
The parent <base:page> tag.


clazz

private String clazz
Optional class attribute


style

private String style
Optional style attribute


image

private String image
The filename of the image.


tooltip

private String tooltip
An optional tooltip.


onClick

private String onClick
An optional JavaScript statement.


visible

private boolean visible
If the icon should be visible or not.

Constructor Detail

Icon

public Icon()
Method Detail

setClazz

public void setClazz(String clazz)

getClazz

public String getClazz()

setStyle

public void setStyle(String style)

getStyle

public String getStyle()

setImage

public void setImage(String image)

getImage

public String getImage()

setVisible

public void setVisible(boolean visible)

isVisible

public boolean isVisible()

setTooltip

public void setTooltip(String tooltip)

getTooltip

public String getTooltip()

setOnclick

public void setOnclick(String onClick)

getOnclick

public String getOnclick()

doStartTag

public int doStartTag()
               throws JspException
Specified by:
doStartTag in interface Tag
Overrides:
doStartTag in class TagSupport
Throws:
JspException

2.17.2: 2011-06-17