net.sourceforge.jstags.tags.content
Class AsyncContentLoader
java.lang.Object
javax.servlet.jsp.tagext.TagSupport
net.sourceforge.jstags.tags.JSTagsTagSupport
net.sourceforge.jstags.tags.content.AsyncContentLoader
- All Implemented Interfaces:
- java.io.Serializable, javax.servlet.jsp.tagext.IterationTag, javax.servlet.jsp.tagext.JspTag, javax.servlet.jsp.tagext.Tag
public class AsyncContentLoader
- extends JSTagsTagSupport
It loads some content asynchronously in the page when it is loaded.
- Since:
- 1.1
- Author:
- sschz@users.sourceforge.net
- See Also:
- Serialized Form
| 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 |
| 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 |
serialVersionUID
private static final long serialVersionUID
- See Also:
- Constant Field Values
url
private java.lang.String url
nameValuePairs
private java.lang.String nameValuePairs
contentType
private java.lang.String contentType
targetId
private java.lang.String targetId
callbackFc
private java.lang.String callbackFc
AsyncContentLoader
public AsyncContentLoader()
getTemplateName
protected java.lang.String getTemplateName()
throws javax.servlet.jsp.JspException
- Specified by:
getTemplateName in class JSTagsTagSupport
- Returns:
- name of the .js template used to create the JavaScript code used by this tag
- Throws:
javax.servlet.jsp.JspException
getTemplateNameValuePairs
protected java.util.Map<java.lang.String,java.lang.String> getTemplateNameValuePairs()
- Specified by:
getTemplateNameValuePairs in class JSTagsTagSupport
- Returns:
Map of [name, value] pairs representing all the name-value pair
used to create the JavaScript code. Such pairs will be used to replace data inside the .js
template in order to get the code of a certain effect.
getUrl
public java.lang.String getUrl()
- Returns:
- URL the content is loaded from.
setUrl
public void setUrl(java.lang.String url)
getNameValuePairs
public java.lang.String getNameValuePairs()
- Returns:
- It contains a ',' separated object of pairs name:value.
i.e. {name1:'value1',name2:56}. These parameters will be added, with the value
given here, to the request
setNameValuePairs
public void setNameValuePairs(java.lang.String nameValuePairs)
getContentType
public java.lang.String getContentType()
- Returns:
- Type of the content being loaded. If HTML it will be inserted in the
targetId element automatically. Otherwise, a js function must be provided
to insert such content.
setContentType
public void setContentType(java.lang.String contentType)
getTargetId
public java.lang.String getTargetId()
- Returns:
- Identifier of the element the content retrieved from the URL
will be inserted in.
setTargetId
public void setTargetId(java.lang.String targetId)
getCallbackFc
public java.lang.String getCallbackFc()
- Returns:
- JavaScript function being executed when the content is fetched
from the given URL. It inserts such content in the page.
setCallbackFc
public void setCallbackFc(java.lang.String callbackFc)
Copyright © 2007. All Rights Reserved.