org.deltava.taglib.content
Class ActiveUserFilterTag

java.lang.Object
  extended by javax.servlet.jsp.tagext.TagSupport
      extended by org.deltava.taglib.content.ActiveUserFilterTag
All Implemented Interfaces:
Serializable, IterationTag, JspTag, Tag

public class ActiveUserFilterTag
extends TagSupport

A JSP tag to filter content based upon whether a user is currently logged in.

Since:
1.0
Version:
1.0
Author:
Luke
See Also:
Serialized Form

Field Summary
 
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
ActiveUserFilterTag()
           
 
Method Summary
 int doStartTag()
          Filters the content of this tag based on if the user is logged in.
 void release()
          Releases the tag's state variables.
 void setUser(int userID)
          Sets the user ID to search for.
 
Methods inherited from class javax.servlet.jsp.tagext.TagSupport
doAfterBody, doEndTag, 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
 

Constructor Detail

ActiveUserFilterTag

public ActiveUserFilterTag()
Method Detail

setUser

public void setUser(int userID)
Sets the user ID to search for.

Parameters:
userID - the database ID of the user to check for.
See Also:
DatabaseBean.getID()

doStartTag

public int doStartTag()
               throws JspException
Filters the content of this tag based on if the user is logged in.

Specified by:
doStartTag in interface Tag
Overrides:
doStartTag in class TagSupport
Returns:
SKIP_BODY if user not found, otherwise EVAL_BODY_INCLUDE
Throws:
JspException
See Also:
UserPool.contains(int)

release

public void release()
Releases the tag's state variables.

Specified by:
release in interface Tag
Overrides:
release in class TagSupport


Copyright © 2004-2009 Global Virtual Airlines Group. All Rights Reserved.