net.sourceforge.jstags.tags.forms
Class AsyncCombo

java.lang.Object
  extended by javax.servlet.jsp.tagext.TagSupport
      extended by net.sourceforge.jstags.tags.JSTagsTagSupport
          extended by net.sourceforge.jstags.tags.forms.AsyncCombo
All Implemented Interfaces:
java.io.Serializable, javax.servlet.jsp.tagext.IterationTag, javax.servlet.jsp.tagext.JspTag, javax.servlet.jsp.tagext.Tag

public class AsyncCombo
extends JSTagsTagSupport

It allows a combo being filled with data fetched asynchronously (ajax) from a given url when the page is loaded. This tag depends on the JavaScript library Mochikit together with JSTags JavaScript libraries

Since:
1.1
Author:
sschz@users.sourceforge.net
See Also:
Serialized Form

Field Summary
private  java.lang.String nameValuePairs
           
private static long serialVersionUID
           
private  java.lang.String targetFieldName
           
private  java.lang.String targetFormName
           
private  java.lang.String url
           
 
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
AsyncCombo()
           
 
Method Summary
 java.lang.String getNameValuePairs()
           
 java.lang.String getTargetFieldName()
           
 java.lang.String getTargetFormName()
           
protected  java.lang.String getTemplateName()
           
protected  java.util.Map<java.lang.String,java.lang.String> getTemplateNameValuePairs()
           
 java.lang.String getUrl()
           
 void setNameValuePairs(java.lang.String nameValuePairs)
           
 void setTargetFieldName(java.lang.String targetFieldName)
           
 void setTargetFormName(java.lang.String targetFormName)
           
 void setUrl(java.lang.String url)
           
 
Methods inherited from class net.sourceforge.jstags.tags.JSTagsTagSupport
doStartTag, getOutput
 
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
 

Field Detail

serialVersionUID

private static final long serialVersionUID
See Also:
Constant Field Values

url

private java.lang.String url

targetFormName

private java.lang.String targetFormName

targetFieldName

private java.lang.String targetFieldName

nameValuePairs

private java.lang.String nameValuePairs
Constructor Detail

AsyncCombo

public AsyncCombo()
Method Detail

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 data to fill the second combo will be retrieved from.

setUrl

public void setUrl(java.lang.String url)

getTargetFormName

public java.lang.String getTargetFormName()
Returns:
Name of the form the combo belongs to.

setTargetFormName

public void setTargetFormName(java.lang.String targetFormName)

getTargetFieldName

public java.lang.String getTargetFieldName()
Returns:
Name of the field in the combo, the one that will be filled with the data fetched from the given URL.

setTargetFieldName

public void setTargetFieldName(java.lang.String targetFieldName)

getNameValuePairs

public java.lang.String getNameValuePairs()
Returns:
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)


Copyright © 2007. All Rights Reserved.