org.ultrawork.wtk.helper.taglib
Class ViewTag

java.lang.Object
  |
  +--javax.servlet.jsp.tagext.TagSupport
        |
        +--org.ultrawork.wtk.helper.taglib.ViewTag
All Implemented Interfaces:
javax.servlet.jsp.tagext.IterationTag, java.io.Serializable, javax.servlet.jsp.tagext.Tag

public class ViewTag
extends javax.servlet.jsp.tagext.TagSupport

Conditionnaly include the specified file or body content based upon the code of the PerformResult instance returned by the execution of the perform method of the ViewHelper instance created in the parent CreateTag.

Version:
0.1
Author:
Nicolas Bonvin
See Also:
Serialized Form

Field Summary
private  java.lang.String code
           
private  java.lang.String path
           
 
Fields inherited from class javax.servlet.jsp.tagext.TagSupport
id, pageContext, parent, values
 
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
ViewTag()
           
 
Method Summary
 int doEndTag()
          Includes the body content if authorized
 int doStartTag()
          Conditionnaly include the specified file based upon the parent CreateTag state.
protected  CreateTag findCreateTag()
           
 java.lang.String getCode()
           
 java.lang.String getPath()
           
protected  void includeFile()
           
 void setCode(java.lang.String code)
           
 void setPath(java.lang.String path)
           
protected  boolean shouldEvalBody()
           
 
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, registerNatives, toString, wait, wait, wait
 

Field Detail

code

private java.lang.String code

path

private java.lang.String path
Constructor Detail

ViewTag

public ViewTag()
Method Detail

doStartTag

public int doStartTag()
               throws javax.servlet.jsp.JspTagException
Conditionnaly include the specified file based upon the parent CreateTag state.
Overrides:
doStartTag in class javax.servlet.jsp.tagext.TagSupport
Throws:
javax.servlet.jsp.JspTagException - if a Tag exception has occurred

doEndTag

public int doEndTag()
             throws javax.servlet.jsp.JspTagException
Includes the body content if authorized
Overrides:
doEndTag in class javax.servlet.jsp.tagext.TagSupport
Throws:
javax.servlet.jsp.JspTagException - if a Tag exception occurs

findCreateTag

protected CreateTag findCreateTag()
                           throws javax.servlet.jsp.JspTagException

getCode

public java.lang.String getCode()

setCode

public void setCode(java.lang.String code)

getPath

public java.lang.String getPath()

setPath

public void setPath(java.lang.String path)

shouldEvalBody

protected boolean shouldEvalBody()
                          throws javax.servlet.jsp.JspTagException

includeFile

protected void includeFile()
                    throws javax.servlet.jsp.JspTagException


Copyright 2002 - ultrawork