2.17.2: 2011-06-17

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

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

public class Note
extends TagSupport

This tag is used to display small notes on a BASE web page.

Example:

   <%@ taglib prefix="base" uri="/WEB-INF/base.tld" %>
   <base:note type="info" title="Some information">
   Here is some important information...
   </base:note>

Syntax:

   <base:note
      id=...
      clazz=...
      style=...
      messagestyle=...
      type=info|information|warning|question|error
      title=...
      icon=...
      visible=...
   >

Attribute Default value Required Description
id - no The ID of the note. 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:

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

clazz note no The value if this attribute goes directly into the standard HTML class attribute. This allows you to apply different styles to different notes.
style - no The value if this attribute goes directly into the standard HTML style attribute. This allows you to apply different styles to different notes.
messagestyle - no The value if this attribute goes directly into the standard HTML style attribute of the message part. This allows you to apply different styles to different notes.
type error yes The type of note to display. Four types are pre-defined:
  • info,information: An information message.
  • warning: A warning message.
  • question: A question.
  • error: An error message.
The type is used to select a propert icon unless it is specified.
title no The title of the note.
icon no The filename of an icon to display together with the message. If not specified a default icon matching the type attribute is automatically selected. The icon file must be located in the /images directory.
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 icon
          The filename of an optional icon that should be displayed with the error message.
private  String messageStyle
          Optional style attribute for the message section
private static int NOTE_TYPE_ERROR
           
private static int NOTE_TYPE_INFORMATION
           
private static int NOTE_TYPE_QUESTION
           
private static int NOTE_TYPE_WARNING
           
private  Page page
          The parent <base:page> tag.
private static long serialVersionUID
           
private  String style
          Optional style attribute
private  String title
          The title of the note.
private  int type
          The type of note.
private  boolean visible
          If the note 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
Note()
           
 
Method Summary
 int doEndTag()
           
 int doStartTag()
           
 String getClazz()
           
 String getIcon()
           
 String getMessagestyle()
           
 String getStyle()
           
 String getTitle()
           
 boolean isVisible()
           
 void setClazz(String clazz)
           
 void setIcon(String icon)
           
 void setMessagestyle(String messageStyle)
           
 void setStyle(String style)
           
 void setTitle(String title)
           
 void setType(String type)
           
 void setVisible(boolean visible)
           
 
Methods inherited from class javax.servlet.jsp.tagext.TagSupport
doAfterBody, 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

NOTE_TYPE_ERROR

private static final int NOTE_TYPE_ERROR
See Also:
Constant Field Values

NOTE_TYPE_INFORMATION

private static final int NOTE_TYPE_INFORMATION
See Also:
Constant Field Values

NOTE_TYPE_WARNING

private static final int NOTE_TYPE_WARNING
See Also:
Constant Field Values

NOTE_TYPE_QUESTION

private static final int NOTE_TYPE_QUESTION
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


messageStyle

private String messageStyle
Optional style attribute for the message section


type

private int type
The type of note.


title

private String title
The title of the note.


icon

private String icon
The filename of an optional icon that should be displayed with the error message.


visible

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

Constructor Detail

Note

public Note()
Method Detail

setClazz

public void setClazz(String clazz)

getClazz

public String getClazz()

setStyle

public void setStyle(String style)

getStyle

public String getStyle()

setMessagestyle

public void setMessagestyle(String messageStyle)

getMessagestyle

public String getMessagestyle()

setType

public void setType(String type)

setTitle

public void setTitle(String title)

getTitle

public String getTitle()

setIcon

public void setIcon(String icon)

getIcon

public String getIcon()

setVisible

public void setVisible(boolean visible)

isVisible

public boolean isVisible()

doStartTag

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

doEndTag

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

2.17.2: 2011-06-17