nl.imsystems.atag.tags
Class ActionTag

java.lang.Object
  extended by javax.servlet.jsp.tagext.TagSupport
      extended by javax.servlet.jsp.tagext.BodyTagSupport
          extended by nl.imsystems.atag.tags.ATagBase
              extended by nl.imsystems.atag.tags.ActionTag
All Implemented Interfaces:
Serializable, BodyTag, IterationTag, JspTag, Tag

public class ActionTag
extends ATagBase

Tag handler for <a:action/> tag.

An action is used in order to tie a client event (such as 'click', 'change', etc.) on the referenced component to the server.

There are 3 variations of action:

1) Action with a javascript template body
This will execute the javascript in the body of the tag on the client.

2) Server event action (post src component only)
Porpagates the event to the server, posting the value of the event source component only.

3) Server event action (post entire form)
Porpagates the event to the server, posting the entire form.

Multiple action tags with the same event attribute can be added to the parent, and will be executed consecutively on reciept of that event type.

Attributes

Name Required Default Description
event Yes   The event this action should be executed on (e.g. 'click', 'change', etc.)
postForm No false Determines if this action should post the entire form or only the event source component. This option can be switched on globally from the <a:page/> tag.
url No Current url The url to which the event should be posted if different from current url

Supported By

<a:action/> can be placed inside the following tags:
<a:componentRef/>
<a:wrapper/>

Supports

Javascript template body.

Author:
kayvan

See Also:
Serialized Form

Field Summary
 
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 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
ActionTag()
           
 
Method Summary
 int doEndTag()
           
 int doStartTag()
           
 String getContent()
           
 String getEvent()
           
 String getPostForm()
           
 String getUrl()
           
 void setEvent(String event)
           
 void setPostForm(String postForm)
           
 void setUrl(String url)
           
 
Methods inherited from class nl.imsystems.atag.tags.ATagBase
getAlias, getATagContext, getContextPath, getNamingContext, getParentTag, getRefererId, getRequest, getResponse, getTagId, popContext, pushContext, resolveRelativeName
 
Methods inherited from class javax.servlet.jsp.tagext.BodyTagSupport
doAfterBody, doInitBody, 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
 

Constructor Detail

ActionTag

public ActionTag()
Method Detail

getEvent

public String getEvent()

setEvent

public void setEvent(String event)

getUrl

public String getUrl()

setUrl

public void setUrl(String url)

getPostForm

public String getPostForm()

setPostForm

public void setPostForm(String postForm)

getContent

public String getContent()

doStartTag

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

doEndTag

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