Escolar Documentos
Profissional Documentos
Cultura Documentos
6 API
Struts Packages
org.apache.struts2 Main Struts interfaces and classes.
org.apache.struts2.components
org.apache.struts2.components.table
org.apache.struts2.components.table.rendere JSP UI tags for rendering table output
r in HTML.
org.apache.struts2.components.template
Classes for Struts configuration and
org.apache.struts2.config
property handling.
Classes for action dispatching in Struts
org.apache.struts2.dispatcher
(the Controller part of MVC).
org.apache.struts2.dispatcher.mapper
Classes to help dispatch multipart
org.apache.struts2.dispatcher.multipart
HTTP requests.
org.apache.struts2.impl
org.apache.struts2.interceptor Web specific interceptor classes.
org.apache.struts2.interceptor.debugging
org.apache.struts2.interceptor.validation
org.apache.struts2.portlet
org.apache.struts2.portlet.context
org.apache.struts2.portlet.dispatcher
org.apache.struts2.portlet.interceptor
org.apache.struts2.portlet.result
org.apache.struts2.portlet.util
org.apache.struts2.servlet.interceptor
org.apache.struts2.util Miscellaneous helper classes.
org.apache.struts2.validators
org.apache.struts2.views
org.apache.struts2.views.annotations
org.apache.struts2.views.freemarker Classes for views using FreeMarker.
org.apache.struts2.views.freemarker.tags
org.apache.struts2.views.jsp Struts's JSP tag library.
Struts's JSP tag library for iterator
org.apache.struts2.views.jsp.iterator
handling.
org.apache.struts2.views.jsp.ui Struts' JSP UI tags.
org.apache.struts2.views.jsp.ui.table JSP UI tags for modeling tables.
Miscellaneous helper classes for all
org.apache.struts2.views.util
views.
org.apache.struts2.views.velocity Classes for views using Velocity.
org.apache.struts2.views.velocity.components
The new xslt view supports an
extensible Java XML adapter
framework that makes it easy to
org.apache.struts2.views.xslt customize the XML rendering of
objects and to incorporate structured
XML text and arbitarary DOM
fragments into the output.
XWork Packages
Main Xwork interfaces and
com.opensymphony.xwork2
classes.
com.opensymphony.xwork2.config Configuration core classes.
com.opensymphony.xwork2.config.entities Configuration entity classes.
Configuration implementation
com.opensymphony.xwork2.config.impl
classes.
com.opensymphony.xwork2.config.providers Configuration provider classes.
com.opensymphony.xwork2.conversion.annotation
Type conversion annotations.
s
Type conversion meta data
com.opensymphony.xwork2.conversion.metadata
classes.
com.opensymphony.xwork2.inject Guice (pronounced "juice").
com.opensymphony.xwork2.inject.util Guice util classes.
com.opensymphony.xwork2.interceptor Interceptor classes.
com.opensymphony.xwork2.interceptor.annotation
Interceptor annotations.
s
com.opensymphony.xwork2.mock XWork specific mock classes.
com.opensymphony.xwork2.spring Spring ObjectFactory classes.
Spring specific interceptor
com.opensymphony.xwork2.spring.interceptor
classes.
com.opensymphony.xwork2.util XWork util classes.
Classes and utilities used to
com.opensymphony.xwork2.util.location
track location information.
Classes to enable profiling of
com.opensymphony.xwork2.util.profiling
action execution.
com.opensymphony.xwork2.validator XWork validation subsystem.
com.opensymphony.xwork2.validator.annotations Validator annotations.
com.opensymphony.xwork2.validator.metadata Validator meta data classes.
com.opensymphony.xwork2.validator.validators XWork default validator classes.
Package org.apache.struts2
Main Struts interfaces and classes.
See:
Description
Interface Summary
StrutsStatics Constants used by Struts.
Class Summary
RequestUtils Request handling utility class.
ServletActionContext Web-specific context information for actions.
This class provides a central location for framework
StrutsConstants configuration keys used to retrieve and store Struts
configuration settings.
StrutsTestCase Base test case for JUnit testing Struts.
TestNGStrutsTestCas
Base test class for TestNG unit tests.
e
Exception Summary
A generic runtime exception that optionally contains Location
StrutsException
information
org.apache.struts2
Interface StrutsStatics
All Known Implementing Classes:
FilterDispatcher, FilterDispatcherCompatWeblogic61, FreemarkerResult,
Jsr168Dispatcher, PlainTextResult, PortletFreemarkerResult,
PortletPreferencesInterceptor, PortletResult, PortletVelocityResult,
PreparatorServlet, ServletActionContext, ServletActionRedirectResult,
ServletConfigInterceptor, ServletDispatcherResult, ServletRedirectResult,
StreamResult, StrutsResultSupport, VelocityResult
Constants used by Struts. The constants can be used to get or set objects out of the action
context or other collections.
Example:
ActionContext.getContext().put(HTTP_REQUEST, request);
or
Field Summary
static String HTTP_REQUEST
Constant for the HTTP request object.
static String HTTP_RESPONSE
Constant for the HTTP response object.
static String PAGE_CONTEXT
Constant for the JSP page context.
static String SERVLET_CONTEXT
Constant for the servlet context object.
static String SERVLET_DISPATCHER
Constant for an HTTP request dispatcher.
static String STRUTS_PORTLET_CONTEXT
Constant for the PortletContext object
Field Detail
HTTP_REQUEST
static final String HTTP_REQUEST
Constant for the HTTP request object.
See Also:
Constant Field Values
HTTP_RESPONSE
static final String HTTP_RESPONSE
Constant for the HTTP response object.
See Also:
Constant Field Values
SERVLET_DISPATCHER
static final String SERVLET_DISPATCHER
Constant for an HTTP request dispatcher.
See Also:
Constant Field Values
SERVLET_CONTEXT
static final String SERVLET_CONTEXT
Constant for the servlet context object.
See Also:
Constant Field Values
PAGE_CONTEXT
static final String PAGE_CONTEXT
Constant for the JSP page context.
See Also:
Constant Field Values
STRUTS_PORTLET_CONTEXT
static final String STRUTS_PORTLET_CONTEXT
Constant for the PortletContext object
See Also:
Constant Field Values
org.apache.struts2
Class RequestUtils
java.lang.Object
org.apache.struts2.RequestUtils
Constructor Summary
RequestUtils()
Method Summary
static String getServletPath(HttpServletRequest request)
Retrieves the current request servlet path.
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll,
toString, wait, wait, wait
Constructor Detail
RequestUtils
public RequestUtils()
Method Detail
getServletPath
public static String getServletPath(HttpServletRequest request)
Retrieves the current request servlet path. Deals with differences between servlet
specs (2.2 vs 2.3+)
Parameters:
request - the request
Returns:
the servlet path
org.apache.struts2
Class ServletActionContext
java.lang.Object
com.opensymphony.xwork2.ActionContext
org.apache.struts2.ServletActionContext
All Implemented Interfaces:
Serializable, StrutsStatics
See Also:
Serialized Form
Field Summary
static String ACTION_MAPPING
private serialVersionUID
static long
static String STRUTS_VALUESTACK_KEY
Fields inherited from class com.opensymphony.xwork2.ActionContext
ACTION_INVOCATION, ACTION_NAME, APPLICATION, CONVERSION_ERRORS, LOCALE,
PARAMETERS, SESSION, TYPE_CONVERTER, VALUE_STACK
Fields inherited from interface org.apache.struts2.StrutsStatics
HTTP_REQUEST, HTTP_RESPONSE, PAGE_CONTEXT, SERVLET_CONTEXT,
SERVLET_DISPATCHER, STRUTS_PORTLET_CONTEXT
Constructor Summary
private ServletActionContext(Map context)
Method Summary
static ActionContext getActionContext(HttpServletRequest req)
Gets the current action context
static ActionMapping getActionMapping()
Gets the action mapping for this context
static PageContext getPageContext()
Returns the HTTP page context.
static HttpServletReques getRequest()
t Gets the HTTP servlet request object.
static HttpServletRespon getResponse()
se Gets the HTTP servlet response object.
static ServletContext getServletContext()
Gets the servlet context.
static ValueStack getValueStack(HttpServletRequest req)
Gets the current value stack for this request
static void setRequest(HttpServletRequest request)
Sets the HTTP servlet request object.
static void setResponse(HttpServletResponse response)
Sets the HTTP servlet response object.
static void setServletContext(ServletContext servletConte
xt)
Sets the current servlet context object
Methods inherited from class com.opensymphony.xwork2.ActionContext
get, getActionInvocation, getApplication, getContext, getContextMap,
getConversionErrors, getLocale, getName, getParameters, getSession,
getValueStack, put, setActionInvocation, setApplication, setContext,
setContextMap, setConversionErrors, setLocale, setName, setParameters,
setSession, setValueStack
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
STRUTS_VALUESTACK_KEY
public static final String STRUTS_VALUESTACK_KEY
See Also:
Constant Field Values
ACTION_MAPPING
public static final String ACTION_MAPPING
See Also:
Constant Field Values
Constructor Detail
ServletActionContext
private ServletActionContext(Map context)
Method Detail
getActionContext
public static ActionContext getActionContext(HttpServletRequest req)
Gets the current action context
Parameters:
req - The request
Returns:
The current action context
getValueStack
public static ValueStack getValueStack(HttpServletRequest req)
Gets the current value stack for this request
Parameters:
req - The request
Returns:
The value stack
getActionMapping
public static ActionMapping getActionMapping()
Gets the action mapping for this context
Returns:
The action mapping
getPageContext
public static PageContext getPageContext()
Returns the HTTP page context.
Returns:
the HTTP page context.
setRequest
public static void setRequest(HttpServletRequest request)
Sets the HTTP servlet request object.
Parameters:
request - the HTTP servlet request object.
getRequest
public static HttpServletRequest getRequest()
Gets the HTTP servlet request object.
Returns:
the HTTP servlet request object.
setResponse
public static void setResponse(HttpServletResponse response)
Sets the HTTP servlet response object.
Parameters:
response - the HTTP servlet response object.
getResponse
public static HttpServletResponse getResponse()
Gets the HTTP servlet response object.
Returns:
the HTTP servlet response object.
getServletContext
public static ServletContext getServletContext()
Gets the servlet context.
Returns:
the servlet context.
setServletContext
public static void setServletContext(ServletContext servletContext)
Sets the current servlet context object
Parameters:
servletContext - The servlet context to use
org.apache.struts2
Class StrutsConstants
java.lang.Object
org.apache.struts2.StrutsConstants
This class provides a central location for framework configuration keys used to retrieve
and store Struts configuration settings.
Field Summary
static String STRUTS_ACTION_EXTENSION
The URL extension to use to determine if the request is meant
for a Struts action
static String STRUTS_ACTIONPROXYFACTORY
static String STRUTS_ALWAYS_SELECT_FULL_NAMESPACE
static String STRUTS_CONFIGURATION
The org.apache.struts2.config.Configuration implementation
class
static String STRUTS_CONFIGURATION_XML_RELOAD
Whether to reload the XML configuration or not
static String STRUTS_CONTINUATIONS_PACKAGE
The package containing actions that use Rife continuations
static String STRUTS_CUSTOM_I18N_RESOURCES
Location of additional localization properties files to load
static String STRUTS_CUSTOM_PROPERTIES
Location of additional configuration properties files to load
static String STRUTS_DEVMODE
Whether Struts is in development mode or not
static String STRUTS_DISPATCHER_PARAMETERSWORKAROUND
Whether to use a Servlet request parameter workaround
necessary for some versions of WebLogic
static String STRUTS_ENABLE_DYNAMIC_METHOD_INVOCATION
Allows one to disable dynamic method invocation from the URL
static String STRUTS_ENABLE_SLASHES_IN_ACTION_NAMES
Whether slashes in action names are allowed or not
static String STRUTS_FREEMARKER_MANAGER_CLASSNAME
The org.apache.struts2.views.freemarker.FreemarkerManager
implementation class
static String STRUTS_FREEMARKER_WRAPPER_ALT_MAP
static String STRUTS_I18N_ENCODING
The encoding to use for localization messages
static String STRUTS_I18N_RELOAD
Whether the localization messages should automatically be
reloaded
static String STRUTS_LOCALE
The default locale for the Struts application
static String STRUTS_MAPPER_CLASS
The org.apache.struts2.dispatcher.mapper.ActionMapper
implementation class
static String STRUTS_MAPPER_COMPOSITE
Prefix used by CompositeActionMapper to identify its
containing ActionMapper class.
static String STRUTS_MULTIPART_MAXSIZE
The maximize size of a multipart request (file upload)
static String STRUTS_MULTIPART_PARSER
The org.apache.struts2.dispatcher.multipart.MultiPartRequest
parser implementation for a multipart request (file upload)
static String STRUTS_MULTIPART_SAVEDIR
The directory to use for storing uploaded files
static String STRUTS_OBJECTFACTORY
The com.opensymphony.xwork2.ObjectFactory implementation
class
static String STRUTS_OBJECTFACTORY_SPRING_AUTOWIRE
Whether Spring should autoWire or not
static String STRUTS_OBJECTFACTORY_SPRING_USE_CLASS_CACHE
Whether Spring should use its class cache or not
static String STRUTS_OBJECTTYPEDETERMINER
The com.opensymphony.xwork2.util.ObjectTypeDeterminer
implementation class
static String STRUTS_SERVE_STATIC_BROWSER_CACHE
If static content served by the Struts filter should set browser
caching header properties or not
static String STRUTS_SERVE_STATIC_CONTENT
Whether the Struts filter should serve static content or not
static String STRUTS_TAG_ALTSYNTAX
Whether to use the alterative syntax for the tags or not
static String STRUTS_UI_TEMPLATEDIR
The directory containing UI templates
static String STRUTS_UI_THEME
The default UI template theme
static String STRUTS_URL_HTTP_PORT
The HTTP port used by Struts URLs
static String STRUTS_URL_HTTPS_PORT
The HTTPS port used by Struts URLs
static String STRUTS_URL_INCLUDEPARAMS
The default includeParams method to generate Struts URLs
static String STRUTS_VELOCITY_CONFIGFILE
The Velocity configuration file path
static String STRUTS_VELOCITY_CONTEXTS
List of Velocity context names
static String STRUTS_VELOCITY_MANAGER_CLASSNAME
org.apache.struts2.views.velocity.VelocityManager
implementation class
static String STRUTS_VELOCITY_TOOLBOXLOCATION
The location of the Velocity toolbox
static String STRUTS_XSLT_NOCACHE
Whether or not XSLT templates should not be cached
static String STRUTS_XWORKCONVERTER
The name of the xwork converter implementation
Constructor Summary
StrutsConstants()
Method Summary
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll,
toString, wait, wait, wait
Field Detail
STRUTS_DEVMODE
public static final String STRUTS_DEVMODE
Whether Struts is in development mode or not
See Also:
Constant Field Values
STRUTS_I18N_RELOAD
public static final String STRUTS_I18N_RELOAD
Whether the localization messages should automatically be reloaded
See Also:
Constant Field Values
STRUTS_I18N_ENCODING
public static final String STRUTS_I18N_ENCODING
The encoding to use for localization messages
See Also:
Constant Field Values
STRUTS_CONFIGURATION_XML_RELOAD
public static final String STRUTS_CONFIGURATION_XML_RELOAD
Whether to reload the XML configuration or not
See Also:
Constant Field Values
STRUTS_ACTION_EXTENSION
public static final String STRUTS_ACTION_EXTENSION
The URL extension to use to determine if the request is meant for a Struts action
See Also:
Constant Field Values
STRUTS_TAG_ALTSYNTAX
public static final String STRUTS_TAG_ALTSYNTAX
Whether to use the alterative syntax for the tags or not
See Also:
Constant Field Values
STRUTS_URL_HTTP_PORT
public static final String STRUTS_URL_HTTP_PORT
The HTTP port used by Struts URLs
See Also:
Constant Field Values
STRUTS_URL_HTTPS_PORT
public static final String STRUTS_URL_HTTPS_PORT
The HTTPS port used by Struts URLs
See Also:
Constant Field Values
STRUTS_URL_INCLUDEPARAMS
public static final String STRUTS_URL_INCLUDEPARAMS
The default includeParams method to generate Struts URLs
See Also:
Constant Field Values
STRUTS_OBJECTFACTORY
public static final String STRUTS_OBJECTFACTORY
The com.opensymphony.xwork2.ObjectFactory implementation class
See Also:
Constant Field Values
STRUTS_OBJECTTYPEDETERMINER
public static final String STRUTS_OBJECTTYPEDETERMINER
The com.opensymphony.xwork2.util.ObjectTypeDeterminer implementation
class
See Also:
Constant Field Values
STRUTS_CONTINUATIONS_PACKAGE
public static final String STRUTS_CONTINUATIONS_PACKAGE
The package containing actions that use Rife continuations
See Also:
Constant Field Values
STRUTS_CONFIGURATION
public static final String STRUTS_CONFIGURATION
The org.apache.struts2.config.Configuration implementation class
See Also:
Constant Field Values
STRUTS_LOCALE
public static final String STRUTS_LOCALE
The default locale for the Struts application
See Also:
Constant Field Values
STRUTS_DISPATCHER_PARAMETERSWORKAROUND
public static final String STRUTS_DISPATCHER_PARAMETERSWORKAROUND
Whether to use a Servlet request parameter workaround necessary for some
versions of WebLogic
See Also:
Constant Field Values
STRUTS_FREEMARKER_MANAGER_CLASSNAME
public static final String STRUTS_FREEMARKER_MANAGER_CLASSNAME
The org.apache.struts2.views.freemarker.FreemarkerManager implementation
class
See Also:
Constant Field Values
STRUTS_VELOCITY_MANAGER_CLASSNAME
public static final String STRUTS_VELOCITY_MANAGER_CLASSNAME
org.apache.struts2.views.velocity.VelocityManager implementation class
See Also:
Constant Field Values
STRUTS_VELOCITY_CONFIGFILE
public static final String STRUTS_VELOCITY_CONFIGFILE
The Velocity configuration file path
See Also:
Constant Field Values
STRUTS_VELOCITY_TOOLBOXLOCATION
public static final String STRUTS_VELOCITY_TOOLBOXLOCATION
The location of the Velocity toolbox
See Also:
Constant Field Values
STRUTS_VELOCITY_CONTEXTS
public static final String STRUTS_VELOCITY_CONTEXTS
List of Velocity context names
See Also:
Constant Field Values
STRUTS_UI_TEMPLATEDIR
public static final String STRUTS_UI_TEMPLATEDIR
The directory containing UI templates
See Also:
Constant Field Values
STRUTS_UI_THEME
public static final String STRUTS_UI_THEME
The default UI template theme
See Also:
Constant Field Values
STRUTS_MULTIPART_MAXSIZE
public static final String STRUTS_MULTIPART_MAXSIZE
The maximize size of a multipart request (file upload)
See Also:
Constant Field Values
STRUTS_MULTIPART_SAVEDIR
public static final String STRUTS_MULTIPART_SAVEDIR
The directory to use for storing uploaded files
See Also:
Constant Field Values
STRUTS_MULTIPART_PARSER
public static final String STRUTS_MULTIPART_PARSER
The org.apache.struts2.dispatcher.multipart.MultiPartRequest parser
implementation for a multipart request (file upload)
See Also:
Constant Field Values
STRUTS_OBJECTFACTORY_SPRING_AUTOWIRE
public static final String STRUTS_OBJECTFACTORY_SPRING_AUTOWIRE
Whether Spring should autoWire or not
See Also:
Constant Field Values
STRUTS_OBJECTFACTORY_SPRING_USE_CLASS_CACHE
public static final String STRUTS_OBJECTFACTORY_SPRING_USE_CLASS_CACHE
Whether Spring should use its class cache or not
See Also:
Constant Field Values
STRUTS_XSLT_NOCACHE
public static final String STRUTS_XSLT_NOCACHE
Whether or not XSLT templates should not be cached
See Also:
Constant Field Values
STRUTS_CUSTOM_PROPERTIES
public static final String STRUTS_CUSTOM_PROPERTIES
Location of additional configuration properties files to load
See Also:
Constant Field Values
STRUTS_CUSTOM_I18N_RESOURCES
public static final String STRUTS_CUSTOM_I18N_RESOURCES
Location of additional localization properties files to load
See Also:
Constant Field Values
STRUTS_MAPPER_CLASS
public static final String STRUTS_MAPPER_CLASS
The org.apache.struts2.dispatcher.mapper.ActionMapper implementation class
See Also:
Constant Field Values
STRUTS_SERVE_STATIC_CONTENT
public static final String STRUTS_SERVE_STATIC_CONTENT
Whether the Struts filter should serve static content or not
See Also:
Constant Field Values
STRUTS_SERVE_STATIC_BROWSER_CACHE
public static final String STRUTS_SERVE_STATIC_BROWSER_CACHE
If static content served by the Struts filter should set browser caching header
properties or not
See Also:
Constant Field Values
STRUTS_ENABLE_DYNAMIC_METHOD_INVOCATION
public static final String STRUTS_ENABLE_DYNAMIC_METHOD_INVOCATION
Allows one to disable dynamic method invocation from the URL
See Also:
Constant Field Values
STRUTS_ENABLE_SLASHES_IN_ACTION_NAMES
public static final String STRUTS_ENABLE_SLASHES_IN_ACTION_NAMES
Whether slashes in action names are allowed or not
See Also:
Constant Field Values
STRUTS_MAPPER_COMPOSITE
public static final String STRUTS_MAPPER_COMPOSITE
Prefix used by CompositeActionMapper to identify its containing ActionMapper
class.
See Also:
Constant Field Values
STRUTS_ACTIONPROXYFACTORY
public static final String STRUTS_ACTIONPROXYFACTORY
See Also:
Constant Field Values
STRUTS_FREEMARKER_WRAPPER_ALT_MAP
public static final String STRUTS_FREEMARKER_WRAPPER_ALT_MAP
See Also:
Constant Field Values
STRUTS_XWORKCONVERTER
public static final String STRUTS_XWORKCONVERTER
The name of the xwork converter implementation
See Also:
Constant Field Values
STRUTS_ALWAYS_SELECT_FULL_NAMESPACE
public static final String STRUTS_ALWAYS_SELECT_FULL_NAMESPACE
See Also:
Constant Field Values
Constructor Detail
StrutsConstants
public StrutsConstants()
org.apache.struts2
Class StrutsTestCase
java.lang.Object
junit.framework.Assert
junit.framework.TestCase
com.opensymphony.xwork2.XWorkTestCase
org.apache.struts2.StrutsTestCase
All Implemented Interfaces:
junit.framework.Test
Field Summary
Fields inherited from class com.opensymphony.xwork2.XWorkTestCase
actionProxyFactory, configuration, configurationManager, container
Constructor Summary
StrutsTestCase()
Method Summary
protected initDispatcher(Map<String,String> params)
Dispatcher
protected setUp()
void Sets
up the configuration settings, XWork configuration, and
message resources
protected tearDown()
void
Methods inherited from class com.opensymphony.xwork2.XWorkTestCase
loadConfigurationProviders
Methods inherited from class junit.framework.TestCase
countTestCases, createResult, getName, run, run, runBare, runTest,
setName, toString
Methods inherited from class junit.framework.Assert
assertEquals, assertEquals, assertEquals, assertEquals, assertEquals,
assertEquals, assertEquals, assertEquals, assertEquals, assertEquals,
assertEquals, assertEquals, assertEquals, assertEquals, assertEquals,
assertEquals, assertEquals, assertEquals, assertEquals, assertEquals,
assertFalse, assertFalse, assertNotNull, assertNotNull, assertNotSame,
assertNotSame, assertNull, assertNull, assertSame, assertSame,
assertTrue, assertTrue, fail, fail
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait,
wait, wait
Constructor Detail
StrutsTestCase
public StrutsTestCase()
Method Detail
setUp
protected void setUp()
throws Exception
Sets up the configuration settings, XWork configuration, and message resources
Overrides:
setUp in class XWorkTestCase
Throws:
Exception
initDispatcher
protected Dispatcher initDispatcher(Map<String,String> params)
tearDown
protected void tearDown()
throws Exception
Overrides:
tearDown in class XWorkTestCase
Throws:
Exception
org.apache.struts2
Class TestNGStrutsTestCase
java.lang.Object
com.opensymphony.xwork2.TestNGXWorkTestCase
org.apache.struts2.TestNGStrutsTestCase
Base test class for TestNG unit tests. Provides common Struts variables and performs
Struts setup and teardown processes
Field Summary
Fields inherited from class com.opensymphony.xwork2.TestNGXWorkTestCase
actionProxyFactory, configuration, configurationManager, container
Constructor Summary
TestNGStrutsTestCase()
Method Summary
protected initDispatcher(Map<String,String> params)
Dispatcher
protected setUp()
void
protected tearDown()
void
Methods inherited from class com.opensymphony.xwork2.TestNGXWorkTestCase
loadConfigurationProviders
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll,
toString, wait, wait, wait
Constructor Detail
TestNGStrutsTestCase
public TestNGStrutsTestCase()
Method Detail
setUp
protected void setUp()
throws Exception
Overrides:
setUp in class TestNGXWorkTestCase
Throws:
Exception
initDispatcher
protected Dispatcher initDispatcher(Map<String,String> params)
tearDown
protected void tearDown()
throws Exception
Overrides:
tearDown in class TestNGXWorkTestCase
Throws:
Exception
org.apache.struts2
Class StrutsException
java.lang.Object
java.lang.Throwable
java.lang.Exception
java.lang.RuntimeException
com.opensymphony.xwork2.XWorkException
org.apache.struts2.StrutsException
All Implemented Interfaces:
Locatable, Serializable
See Also:
Serialized Form
Field Summary
private serialVersionUID
static long
Constructor Summary
StrutsException()
Constructs a StrutsException with no detail message.
StrutsException(String s)
Constructs a StrutsException with the specified detail message.
StrutsException(String s, Object target)
Constructs a StrutsException with the specified detail message and target.
StrutsException(String s, Throwable cause)
Constructs a StrutsException with the specified detail message and exception
cause.
StrutsException(String s, Throwable cause, Object target)
Constructs a StrutsException with the specified detail message, cause, and
target
StrutsException(Throwable cause)
Constructs a StrutsException with the root cause
StrutsException(Throwable cause, Object target)
Constructs a StrutsException with the root cause and target
Method Summary
Methods inherited from class com.opensymphony.xwork2.XWorkException
getLocation, getThrowable, toString
Methods inherited from class java.lang.Throwable
fillInStackTrace, getCause, getLocalizedMessage, getMessage,
getStackTrace, initCause, printStackTrace, printStackTrace,
printStackTrace, setStackTrace
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait,
wait, wait
Methods inherited from interface
com.opensymphony.xwork2.util.location.Locatable
getLocation
Field Detail
serialVersionUID
private static final long serialVersionUID
See Also:
Constant Field Values
Constructor Detail
StrutsException
public StrutsException()
Constructs a StrutsException with no detail message.
StrutsException
public StrutsException(String s)
Constructs a StrutsException with the specified detail message.
Parameters:
s - the detail message.
StrutsException
public StrutsException(String s,
Object target)
Constructs a StrutsException with the specified detail message and target.
Parameters:
s - the detail message.
target - the target of the exception.
StrutsException
public StrutsException(Throwable cause)
Constructs a StrutsException with the root cause
Parameters:
cause - The wrapped exception
StrutsException
public StrutsException(Throwable cause,
Object target)
Constructs a StrutsException with the root cause and target
Parameters:
cause - The wrapped exception
target - The target of the exception
StrutsException
public StrutsException(String s,
Throwable cause)
Constructs a StrutsException with the specified detail message and exception
cause.
Parameters:
s - the detail message.
cause - the wrapped exception
StrutsException
public StrutsException(String s,
Throwable cause,
Object target)
Constructs a StrutsException with the specified detail message, cause, and
target
Parameters:
s - the detail message.
cause - The wrapped exception
target - The target of the exception
Package org.apache.struts2.components
Interface Summary
Tags can implement this to support nested param tags
Param.UnnamedParametric
without the name attribute.
RemoteUICallBean
URL.ExtraParameterProvide
r
Class Summary
AbstractRemoteCallUIBea
TODO: Document AbstractRemoteCallUIBean.
n
ActionComponent
Render action errors if they exists the specific layout of
ActionError
the rendering depends on the theme itself.
Render action messages if they exists, specific rendering
ActionMessage
layout depends on the theme itself.
A tag that creates a HTML <a href='' /> that when clicked
calls a URL remote XMLHttpRequest call via the dojo
framework.
Examples
Renders a tree node within a tree widget with AJAX
support.
TreeNode
Either of the following combinations should be used
depending on if the tree is to be constrcted dynamically
or statically.
UIBean is the standard superclass of all Struts UI
UIBean
componentns.
Create a Select component with buttons to move the
UpDownSelect
elements in the select component up and down.
URL
org.apache.struts2.components
Interface Param.UnnamedParametric
All Known Implementing Classes:
AppendIterator, FieldError, MergeIterator, Text
Enclosing class:
Param
Tags can implement this to support nested param tags without the name attribute.
The TextTag uses this approach. For unnamed parameters an example is given in the
class javadoc for ParamTag.
Method Summary
void addParameter(Object value)
Adds the given value as a parameter to the outer tag.
Method Detail
addParameter
void addParameter(Object value)
Adds the given value as a parameter to the outer tag.
Parameters:
value - the value
org.apache.struts2.components
Interface RemoteUICallBean
All Known Implementing Classes:
AbstractRemoteCallUIBean, Anchor, Div, Submit
Method Summary
void setAfterLoading(String afterLoading)
void setBeforeLoading(String beforeLoading)
void setErrorText(String errorText)
void setExecuteScripts(String executeScripts)
void setFormFilter(String formFilter)
void setFormId(String formId)
void setHandler(String handler)
void setHref(String href)
void setIndicator(String indicator)
void setListenTopics(String topics)
void setLoadingText(String loadingText)
void setNotifyTopics(String topics)
void setShowErrorTransportText(String showError)
void setShowLoadingText(String showLoadingText)
Method Detail
setListenTopics
void setListenTopics(String topics)
setNotifyTopics
void setNotifyTopics(String topics)
setHref
void setHref(String href)
setErrorText
void setErrorText(String errorText)
setAfterLoading
void setAfterLoading(String afterLoading)
setBeforeLoading
void setBeforeLoading(String beforeLoading)
setExecuteScripts
void setExecuteScripts(String executeScripts)
setLoadingText
void setLoadingText(String loadingText)
setHandler
void setHandler(String handler)
setFormFilter
void setFormFilter(String formFilter)
setFormId
void setFormId(String formId)
setShowErrorTransportText
void setShowErrorTransportText(String showError)
setShowLoadingText
void setShowLoadingText(String showLoadingText)
setIndicator
void setIndicator(String indicator)
org.apache.struts2.components
Interface URL.ExtraParameterProvider
Enclosing class:
URL
Method Summary
Map getExtraParameters()
Method Detail
getExtraParameters
Map getExtraParameters()
org.apache.struts2.components
Class AbstractRemoteCallUIBean
java.lang.Object
org.apache.struts2.components.Component
org.apache.struts2.components.UIBean
org.apache.struts2.components.ClosingUIBean
org.apache.struts2.components.AbstractRemoteCallUIBean
All Implemented Interfaces:
RemoteUICallBean
Direct Known Subclasses:
Anchor, Div
Version:
$Revision: 508280 $ $Date: 2007-02-15 21:07:56 -0500 (Thu, 15 Feb 2007) $
Author:
$Author: musachy $
Field Summary
protected afterLoading
String
protected beforeLoading
String
protected errorText
String
protected executeScripts
String
protected formFilter
String
protected formId
String
protected handler
String
protected href
String
protected indicator
String
protected listenTopics
String
protected loadingText
String
protected notifyTopics
String
protected showErrorTransportText
String
protected showLoadingText
String
Fields inherited from class org.apache.struts2.components.ClosingUIBean
openTemplate
Fields inherited from class org.apache.struts2.components.UIBean
accesskey, cssClass, cssStyle, defaultTemplateDir, defaultUITheme,
disabled, key, label, labelPosition, name, onblur, onchange, onclick,
ondblclick, onfocus, onkeydown, onkeypress, onkeyup, onmousedown,
onmousemove, onmouseout, onmouseover, onmouseup, onselect, request,
required, requiredposition, response, tabindex, template, templateDir,
templateEngineManager, templateSuffix, theme, title, tooltip,
tooltipConfig, value
Fields inherited from class org.apache.struts2.components.Component
actionMapper, COMPONENT_STACK, id, parameters, stack
Constructor Summary
AbstractRemoteCallUIBean(ValueStack stack, HttpServletRequest request,
HttpServletResponse response)
Method Summary
void evaluateExtraParams()
void setAfterLoading(String afterLoading)
void setBeforeLoading(String beforeLoading)
void setErrorText(String errorText)
void setExecuteScripts(String executeScripts)
void setFormFilter(String formFilter)
void setFormId(String formId)
void setHandler(String handler)
void setHref(String href)
void setIndicator(String indicator)
void setListenTopics(String listenTopics)
void setLoadingText(String loadingText)
void setNotifyTopics(String notifyTopics)
void setShowErrorTransportText(String showError)
void setShowLoadingText(String showLoadingText)
Methods inherited from class org.apache.struts2.components.ClosingUIBean
getDefaultOpenTemplate, setOpenTemplate, start
Methods inherited from class org.apache.struts2.components.UIBean
addFormParameter, buildTemplateName, enableAncestorFormCustomOnsubmit,
end, escape, evaluateNameValue, evaluateParams, getDefaultTemplate,
getTemplate, getTemplateDir, getTheme, getTooltipConfig,
getValueClassType, mergeTemplate, populateComponentHtmlId,
setAccesskey, setCssClass, setCssStyle, setDefaultTemplateDir,
setDefaultUITheme, setDisabled, setKey, setLabel, setLabelposition,
setName, setOnblur, setOnchange, setOnclick, setOndblclick, setOnfocus,
setOnkeydown, setOnkeypress, setOnkeyup, setOnmousedown,
setOnmousemove, setOnmouseout, setOnmouseover, setOnmouseup,
setOnselect, setRequired, setRequiredposition, setTabindex,
setTemplate, setTemplateDir, setTemplateEngineManager, setTheme,
setTitle, setTooltip, setTooltipConfig, setValue
Methods inherited from class org.apache.struts2.components.Component
addAllParameters, addParameter, altSyntax, copyParams,
determineActionURL, determineNamespace, end, fieldError, findAncestor,
findString, findString, findValue, findValue, findValue,
getComponentStack, getId, getParameters, getStack, popComponentStack,
setActionMapper, setId, toString, usesBody
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll,
toString, wait, wait, wait
Field Detail
href
protected String href
errorText
protected String errorText
afterLoading
protected String afterLoading
beforeLoading
protected String beforeLoading
executeScripts
protected String executeScripts
loadingText
protected String loadingText
listenTopics
protected String listenTopics
handler
protected String handler
formId
protected String formId
formFilter
protected String formFilter
notifyTopics
protected String notifyTopics
showErrorTransportText
protected String showErrorTransportText
indicator
protected String indicator
showLoadingText
protected String showLoadingText
Constructor Detail
AbstractRemoteCallUIBean
public AbstractRemoteCallUIBean(ValueStack stack,
HttpServletRequest request,
HttpServletResponse response)
Method Detail
evaluateExtraParams
public void evaluateExtraParams()
Overrides:
evaluateExtraParams in class UIBean
setListenTopics
public void setListenTopics(String listenTopics)
Specified by:
setListenTopics in interface RemoteUICallBean
setHref
public void setHref(String href)
Specified by:
setHref in interface RemoteUICallBean
setErrorText
public void setErrorText(String errorText)
Specified by:
setErrorText in interface RemoteUICallBean
setAfterLoading
public void setAfterLoading(String afterLoading)
Specified by:
setAfterLoading in interface RemoteUICallBean
setBeforeLoading
public void setBeforeLoading(String beforeLoading)
Specified by:
setBeforeLoading in interface RemoteUICallBean
setExecuteScripts
public void setExecuteScripts(String executeScripts)
Specified by:
setExecuteScripts in interface RemoteUICallBean
setLoadingText
public void setLoadingText(String loadingText)
Specified by:
setLoadingText in interface RemoteUICallBean
setHandler
public void setHandler(String handler)
Specified by:
setHandler in interface RemoteUICallBean
setFormFilter
public void setFormFilter(String formFilter)
Specified by:
setFormFilter in interface RemoteUICallBean
setFormId
public void setFormId(String formId)
Specified by:
setFormId in interface RemoteUICallBean
setNotifyTopics
public void setNotifyTopics(String notifyTopics)
Specified by:
setNotifyTopics in interface RemoteUICallBean
setShowErrorTransportText
public void setShowErrorTransportText(String showError)
Specified by:
setShowErrorTransportText in interface RemoteUICallBean
org.apache.struts2.components
Class ActionComponent
java.lang.Object
org.apache.struts2.components.Component
org.apache.struts2.components.ActionComponent
This tag enables developers to call actions directly from a JSP page by specifying the
action name and an optional namespace. The body content of the tag is used to render the
results from the Action. Any result processor defined for this action in struts.xml will be
ignored, unless the executeResult parameter is specified.
id (String) - the id (if specified) to put the action under stack's context.
name* (String) - name of the action to be executed (without the extension suffix
eg. .action)
namespace (String) - default to the namespace where this action tag is invoked
executeResult (Boolean) - default is false. Decides wheather the result of this
action is to be executed or not
ignoreContextParams (Boolean) - default to false. Decides wheather the request
parameters are to be included when the action is invoked
....
success.jsp
success.jsp
....
The following action tag will execute result and include it in this page
The following action tag will do the same as above, but invokes method
specialMethod in action
The following action tag will not execute result, but put a String in
request scope
under an id "stringByAction" which will be retrieved using
property tag
Field Summary
protected actionProxyFactory
ActionProxyFactory
protected req
HttpServletRequest
protected res
HttpServletResponse
Fields inherited from class org.apache.struts2.components.Component
actionMapper, COMPONENT_STACK, id, parameters, stack
Constructor Summary
ActionComponent(ValueStack stack, HttpServletRequest req,
HttpServletResponse res)
Method Summary
private createExtraContext()
Map
void setActionProxyFactory(ActionProxyFactory actionProxyFactor
y)
void setExecuteResult(boolean executeResult)
void setFlush(boolean flush)
void setIgnoreContextParams(boolean ignoreContextParams)
void setName(String name)
void setNamespace(String namespace)
Methods inherited from class org.apache.struts2.components.Component
addAllParameters, addParameter, altSyntax, copyParams,
determineActionURL, determineNamespace, end, fieldError, findAncestor,
findString, findString, findValue, findValue, findValue,
getComponentStack, getId, getParameters, getStack, popComponentStack,
setActionMapper, setId, start, toString, usesBody
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll,
toString, wait, wait, wait
Field Detail
LOG
private static final Log LOG
res
protected HttpServletResponse res
req
protected HttpServletRequest req
actionProxyFactory
protected ActionProxyFactory actionProxyFactory
proxy
protected ActionProxy proxy
name
protected String name
namespace
protected String namespace
executeResult
protected boolean executeResult
ignoreContextParams
protected boolean ignoreContextParams
flush
protected boolean flush
Constructor Detail
ActionComponent
public ActionComponent(ValueStack stack,
HttpServletRequest req,
HttpServletResponse res)
Method Detail
setActionProxyFactory
public void setActionProxyFactory(ActionProxyFactory actionProxyFactory)
Parameters:
actionProxyFactory - the actionProxyFactory to set
end
public boolean end(Writer writer,
String body)
Description copied from class: Component
Callback for the end tag of this component. Should the body be evaluated again?
Overrides:
end in class Component
Parameters:
writer - the output writer.
body - the rendered body.
Returns:
true if the body should be evaluated again
createExtraContext
private Map createExtraContext()
getProxy
public ActionProxy getProxy()
executeAction
private void executeAction()
Execute the requested action. If no namespace is provided, we'll attempt to derive
a namespace using buildNamespace(). The ActionProxy and the namespace will
be saved into the instance variables proxy and namespace respectively.
See Also:
TagUtils.buildNamespace(org.apache.struts2.dispatcher.mapper.Actio
nMapper, com.opensymphony.xwork2.util.ValueStack,
javax.servlet.http.HttpServletRequest)
setName
public void setName(String name)
setNamespace
public void setNamespace(String namespace)
setExecuteResult
public void setExecuteResult(boolean executeResult)
setIgnoreContextParams
public void setIgnoreContextParams(boolean ignoreContextParams)
setFlush
public void setFlush(boolean flush)
setIndicator
public void setIndicator(String indicator)
Specified by:
setIndicator in interface RemoteUICallBean
setShowLoadingText
public void setShowLoadingText(String showLoadingText)
Specified by:
setShowLoadingText in interface RemoteUICallBean
org.apache.struts2.components
Class ActionError
java.lang.Object
org.apache.struts2.components.Component
org.apache.struts2.components.UIBean
org.apache.struts2.components.ActionError
Render action errors if they exists the specific layout of the rendering depends on the
theme itself.
Examples
<s:actionerror />
<s:form .... >>
....
</s:form>
Field Summary
static String TEMPLATE
Fields inherited from class org.apache.struts2.components.UIBean
accesskey, cssClass, cssStyle, defaultTemplateDir, defaultUITheme,
disabled, key, label, labelPosition, name, onblur, onchange, onclick,
ondblclick, onfocus, onkeydown, onkeypress, onkeyup, onmousedown,
onmousemove, onmouseout, onmouseover, onmouseup, onselect, request,
required, requiredposition, response, tabindex, template, templateDir,
templateEngineManager, templateSuffix, theme, title, tooltip,
tooltipConfig, value
Fields inherited from class org.apache.struts2.components.Component
actionMapper, COMPONENT_STACK, id, parameters, stack
Constructor Summary
ActionError(ValueStack stack, HttpServletRequest request,
HttpServletResponse response)
Method Summary
protected getDefaultTemplate()
String A contract that requireseach concrete UI Tag to specify which
template should be used as a default.
Methods inherited from class org.apache.struts2.components.UIBean
addFormParameter, buildTemplateName, enableAncestorFormCustomOnsubmit,
end, escape, evaluateExtraParams, evaluateNameValue, evaluateParams,
getTemplate, getTemplateDir, getTheme, getTooltipConfig,
getValueClassType, mergeTemplate, populateComponentHtmlId,
setAccesskey, setCssClass, setCssStyle, setDefaultTemplateDir,
setDefaultUITheme, setDisabled, setKey, setLabel, setLabelposition,
setName, setOnblur, setOnchange, setOnclick, setOndblclick, setOnfocus,
setOnkeydown, setOnkeypress, setOnkeyup, setOnmousedown,
setOnmousemove, setOnmouseout, setOnmouseover, setOnmouseup,
setOnselect, setRequired, setRequiredposition, setTabindex,
setTemplate, setTemplateDir, setTemplateEngineManager, setTheme,
setTitle, setTooltip, setTooltipConfig, setValue
Methods inherited from class org.apache.struts2.components.Component
addAllParameters, addParameter, altSyntax, copyParams,
determineActionURL, determineNamespace, end, fieldError, findAncestor,
findString, findString, findValue, findValue, findValue,
getComponentStack, getId, getParameters, getStack, popComponentStack,
setActionMapper, setId, start, toString, usesBody
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll,
toString, wait, wait, wait
Field Detail
TEMPLATE
public static final String TEMPLATE
See Also:
Constant Field Values
Constructor Detail
ActionError
public ActionError(ValueStack stack,
HttpServletRequest request,
HttpServletResponse response)
Method Detail
getDefaultTemplate
protected String getDefaultTemplate()
Description copied from class: UIBean
A contract that requires each concrete UI Tag to specify which template should be
used as a default. For example, the CheckboxTab might return "checkbox.vm"
while the RadioTag might return "radio.vm". This value not begin with a '/' unless
you intend to make the path absolute rather than relative to the current theme.
Specified by:
getDefaultTemplate in class UIBean
Returns:
The name of the template to be used as the default.
org.apache.struts2.components
Class ActionMessage
java.lang.Object
org.apache.struts2.components.Component
org.apache.struts2.components.UIBean
org.apache.struts2.components.ActionMessage
Render action messages if they exists, specific rendering layout depends on the theme
itself.
Examples
<s:actionmessage />
<s:form .... >
....
</s:form>
Field Summary
private TEMPLATE
static String
Fields inherited from class org.apache.struts2.components.UIBean
accesskey, cssClass, cssStyle, defaultTemplateDir, defaultUITheme,
disabled, key, label, labelPosition, name, onblur, onchange, onclick,
ondblclick, onfocus, onkeydown, onkeypress, onkeyup, onmousedown,
onmousemove, onmouseout, onmouseover, onmouseup, onselect, request,
required, requiredposition, response, tabindex, template, templateDir,
templateEngineManager, templateSuffix, theme, title, tooltip,
tooltipConfig, value
Fields inherited from class org.apache.struts2.components.Component
actionMapper, COMPONENT_STACK, id, parameters, stack
Constructor Summary
ActionMessage(ValueStack stack, HttpServletRequest request,
HttpServletResponse response)
Method Summary
protected getDefaultTemplate()
String A contract that requireseach concrete UI Tag to specify which
template should be used as a default.
Methods inherited from class org.apache.struts2.components.UIBean
addFormParameter, buildTemplateName, enableAncestorFormCustomOnsubmit,
end, escape, evaluateExtraParams, evaluateNameValue, evaluateParams,
getTemplate, getTemplateDir, getTheme, getTooltipConfig,
getValueClassType, mergeTemplate, populateComponentHtmlId,
setAccesskey, setCssClass, setCssStyle, setDefaultTemplateDir,
setDefaultUITheme, setDisabled, setKey, setLabel, setLabelposition,
setName, setOnblur, setOnchange, setOnclick, setOndblclick, setOnfocus,
setOnkeydown, setOnkeypress, setOnkeyup, setOnmousedown,
setOnmousemove, setOnmouseout, setOnmouseover, setOnmouseup,
setOnselect, setRequired, setRequiredposition, setTabindex,
setTemplate, setTemplateDir, setTemplateEngineManager, setTheme,
setTitle, setTooltip, setTooltipConfig, setValue
Methods inherited from class org.apache.struts2.components.Component
addAllParameters, addParameter, altSyntax, copyParams,
determineActionURL, determineNamespace, end, fieldError, findAncestor,
findString, findString, findValue, findValue, findValue,
getComponentStack, getId, getParameters, getStack, popComponentStack,
setActionMapper, setId, start, toString, usesBody
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll,
toString, wait, wait, wait
Field Detail
TEMPLATE
private static final String TEMPLATE
See Also:
Constant Field Values
Constructor Detail
ActionMessage
public ActionMessage(ValueStack stack,
HttpServletRequest request,
HttpServletResponse response)
Method Detail
getDefaultTemplate
protected String getDefaultTemplate()
Description copied from class: UIBean
A contract that requires each concrete UI Tag to specify which template should be
used as a default. For example, the CheckboxTab might return "checkbox.vm"
while the RadioTag might return "radio.vm". This value not begin with a '/' unless
you intend to make the path absolute rather than relative to the current theme.
Specified by:
getDefaultTemplate in class UIBean
Returns:
The name of the template to be used as the default.
org.apache.struts2.components
Class Anchor
java.lang.Object
org.apache.struts2.components.Component
org.apache.struts2.components.UIBean
org.apache.struts2.components.ClosingUIBean
org.apache.struts2.components.AbstractRemoteCallUIBean
org.apache.struts2.components.Anchor
All Implemented Interfaces:
RemoteUICallBean
A tag that creates a HTML <a href='' /> that when clicked calls a URL remote
XMLHttpRequest call via the dojo framework.
href
errorText
listenTopics
notifyTopics
executeScripts
loadingText
listenTopics
handler
formId
formFilter
targets
showErrorTransportText
targets
indicator
'targets' is a list of element ids whose content will be updated with the text returned from
request.
'errorText' is the text that will be displayed when there is an error making the request.
'executeScripts' if set to true will execute javascript sections in the returned text.
'loadingText' is the text that will be displayed on the 'targets' elements while making the
request.
'handler' is the name of the function that will take care of making the AJAX request.
Dojo's widget and dom node are passed as parameters).
'formId' is the id of the html form whose fields will be seralized and passed as parameters
in the request.
'formFilter' is the name of a function which will be used to filter the fields that will be
seralized. This function takes as a parameter the element and returns true if the element
should be included.
'listenTopics' comma separated list of topics names, that will trigger a request 'indicator'
element to be shown while the request executing 'showErrorTransportText': whether
errors should be displayed (on 'targets')
Examples
Results in
<a dojoType="BindAnchor" executeScripts="true" id="link1"
href="/DoIt.action?id=1" errorText="An error ocurred"></a>
Field Summary
static String COMPONENT_NAME
static String OPEN_TEMPLATE
protected targets
String
static String TEMPLATE
Fields inherited from class
org.apache.struts2.components.AbstractRemoteCallUIBean
afterLoading, beforeLoading, errorText, executeScripts, formFilter,
formId, handler, href, indicator, listenTopics, loadingText,
notifyTopics, showErrorTransportText, showLoadingText
Fields inherited from class org.apache.struts2.components.ClosingUIBean
openTemplate
Fields inherited from class org.apache.struts2.components.UIBean
accesskey, cssClass, cssStyle, defaultTemplateDir, defaultUITheme,
disabled, key, label, labelPosition, name, onblur, onchange, onclick,
ondblclick, onfocus, onkeydown, onkeypress, onkeyup, onmousedown,
onmousemove, onmouseout, onmouseover, onmouseup, onselect, request,
required, requiredposition, response, tabindex, template, templateDir,
templateEngineManager, templateSuffix, theme, title, tooltip,
tooltipConfig, value
Fields inherited from class org.apache.struts2.components.Component
actionMapper, COMPONENT_STACK, id, parameters, stack
Constructor Summary
Anchor(ValueStack stack, HttpServletRequest request,
HttpServletResponse response)
Method Summary
void evaluateExtraParams()
String getDefaultOpenTemplate()
protected getDefaultTemplate()
String A contract that requires each concrete UI Tag to specify which
template should be used as a default.
void setAfterLoading(String afterLoading)
void setBeforeLoading(String beforeLoading)
void setTargets(String targets)
Methods inherited from class
org.apache.struts2.components.AbstractRemoteCallUIBean
setErrorText, setExecuteScripts, setFormFilter, setFormId, setHandler,
setHref, setIndicator, setListenTopics, setLoadingText,
setNotifyTopics, setShowErrorTransportText, setShowLoadingText
Methods inherited from class org.apache.struts2.components.ClosingUIBean
setOpenTemplate, start
Methods inherited from class org.apache.struts2.components.UIBean
addFormParameter, buildTemplateName, enableAncestorFormCustomOnsubmit,
end, escape, evaluateNameValue, evaluateParams, getTemplate,
getTemplateDir, getTheme, getTooltipConfig, getValueClassType,
mergeTemplate, populateComponentHtmlId, setAccesskey, setCssClass,
setCssStyle, setDefaultTemplateDir, setDefaultUITheme, setDisabled,
setKey, setLabel, setLabelposition, setName, setOnblur, setOnchange,
setOnclick, setOndblclick, setOnfocus, setOnkeydown, setOnkeypress,
setOnkeyup, setOnmousedown, setOnmousemove, setOnmouseout,
setOnmouseover, setOnmouseup, setOnselect, setRequired,
setRequiredposition, setTabindex, setTemplate, setTemplateDir,
setTemplateEngineManager, setTheme, setTitle, setTooltip,
setTooltipConfig, setValue
Methods inherited from class org.apache.struts2.components.Component
addAllParameters, addParameter, altSyntax, copyParams,
determineActionURL, determineNamespace, end, fieldError, findAncestor,
findString, findString, findValue, findValue, findValue,
getComponentStack, getId, getParameters, getStack, popComponentStack,
setActionMapper, setId, toString, usesBody
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll,
toString, wait, wait, wait
Field Detail
OPEN_TEMPLATE
public static final String OPEN_TEMPLATE
See Also:
Constant Field Values
TEMPLATE
public static final String TEMPLATE
See Also:
Constant Field Values
COMPONENT_NAME
public static final String COMPONENT_NAME
targets
protected String targets
Constructor Detail
Anchor
public Anchor(ValueStack stack,
HttpServletRequest request,
HttpServletResponse response)
Method Detail
getDefaultOpenTemplate
public String getDefaultOpenTemplate()
Specified by:
getDefaultOpenTemplate in class ClosingUIBean
getDefaultTemplate
protected String getDefaultTemplate()
Description copied from class: UIBean
A contract that requires each concrete UI Tag to specify which template should be
used as a default. For example, the CheckboxTab might return "checkbox.vm"
while the RadioTag might return "radio.vm". This value not begin with a '/' unless
you intend to make the path absolute rather than relative to the current theme.
Specified by:
getDefaultTemplate in class UIBean
Returns:
The name of the template to be used as the default.
evaluateExtraParams
public void evaluateExtraParams()
Overrides:
evaluateExtraParams in class AbstractRemoteCallUIBean
setTargets
public void setTargets(String targets)
setAfterLoading
public void setAfterLoading(String afterLoading)
Specified by:
setAfterLoading in interface RemoteUICallBean
Overrides:
setAfterLoading in class AbstractRemoteCallUIBean
setBeforeLoading
public void setBeforeLoading(String beforeLoading)
Specified by:
setBeforeLoading in interface RemoteUICallBean
Overrides:
setBeforeLoading in class AbstractRemoteCallUIBean
org.apache.struts2.components
Class AppendIterator
java.lang.Object
org.apache.struts2.components.Component
org.apache.struts2.components.AppendIterator
All Implemented Interfaces:
Param.UnnamedParametric
id (String) - the id of which if supplied will have the resultant appended iterator
stored under in the stack's context
Field Summary
private static Log _log
private List _parameters
private appendIteratorFilter
AppendIteratorFilter
Fields inherited from class org.apache.struts2.components.Component
actionMapper, COMPONENT_STACK, id, parameters, stack
Constructor Summary
AppendIterator(ValueStack stack)
Method Summary
void addParameter(Object value)
Adds the given value as a parameter to the outer tag.
boolean end(Writer writer, String body)
Callback for the end tag of this component.
void setId(String id)
boolean start(Writer writer)
Callback for the start tag of this component.
Methods inherited from class org.apache.struts2.components.Component
addAllParameters, addParameter, altSyntax, copyParams,
determineActionURL, determineNamespace, end, fieldError, findAncestor,
findString, findString, findValue, findValue, findValue,
getComponentStack, getId, getParameters, getStack, popComponentStack,
setActionMapper, toString, usesBody
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll,
toString, wait, wait, wait
Field Detail
_log
private static final Log _log
appendIteratorFilter
private AppendIteratorFilter appendIteratorFilter
_parameters
private List _parameters
Constructor Detail
AppendIterator
public AppendIterator(ValueStack stack)
Method Detail
start
public boolean start(Writer writer)
Description copied from class: Component
Callback for the start tag of this component. Should the body be evaluated?
Overrides:
start in class Component
Parameters:
writer - the output writer.
Returns:
true if the body should be evaluated
end
public boolean end(Writer writer,
String body)
Description copied from class: Component
Callback for the end tag of this component. Should the body be evaluated again?
Overrides:
end in class Component
Parameters:
writer - the output writer.
body - the rendered body.
Returns:
true if the body should be evaluated again
addParameter
public void addParameter(Object value)
Description copied from interface: Param.UnnamedParametric
Adds the given value as a parameter to the outer tag.
Specified by:
addParameter in interface Param.UnnamedParametric
Parameters:
value - the value
setId
public void setId(String id)
Overrides:
setId in class Component
org.apache.struts2.components
Class Autocompleter
java.lang.Object
org.apache.struts2.components.Component
org.apache.struts2.components.UIBean
org.apache.struts2.components.TextField
org.apache.struts2.components.ComboBox
org.apache.struts2.components.Autocompleter
The autocomplete tag is a combobox that can autocomplete text entered on the input box.
When used on the "simple" theme, the autocompleter can be used like the ComboBox.
When used on the "ajax" theme, the list can be retieved from an action. This action must
return a JSON list in the format:
[
["Text 1","Value1"],
["Text 2","Value2"],
["Text 3","Value3"]
]
'formId' is the id of the html form whose fields will be seralized and passed as parameters
in the request.
'formFilter' is the name of a function which will be used to filter the fields that will be
seralized. This function takes as a parameter the element and returns true if the element
should be included.
'listenTopics' comma separated list of topics names, that will trigger a request 'indicator'
element to be shown while the request executing 'showErrorTransportText': whether
errors should be displayed (on 'targets')
'showDownError' show or hide the down arrow button 'searchType' how the search must
be performed, options are: "startstring", "startword" and "substring"
'keyName' name of the field to which the selected key will be assigned
'iconPath' path of icon used for the dropdown 'templateCssPath' path to css file used to
customize Dojo's widget 'notifyTopics' comma separated list of topics names, that will be
published. Three parameters are passed:
Field Summary
protected autoComplete
String
private COMPONENT_NAME
static String
protected delay
String
protected disabled
String
protected dropdownHeight
String
protected dropdownWidth
String
protected forceValidOption
String
protected formFilter
String
protected formId
String
protected href
String
protected iconPath
String
protected indicator
String
protected keyName
String
protected listenTopics
String
protected loadMinimumCount
String
protected loadOnTextChange
String
protected notifyTopics
String
protected searchType
String
protected showDownArrow
String
static String TEMPLATE
protected templateCssPath
String
Fields inherited from class org.apache.struts2.components.ComboBox
emptyOption, headerKey, headerValue, list, listKey, listValue
Fields inherited from class org.apache.struts2.components.TextField
maxlength, readonly, size
Fields inherited from class org.apache.struts2.components.UIBean
accesskey, cssClass, cssStyle, defaultTemplateDir, defaultUITheme, key,
label, labelPosition, name, onblur, onchange, onclick, ondblclick,
onfocus, onkeydown, onkeypress, onkeyup, onmousedown, onmousemove,
onmouseout, onmouseover, onmouseup, onselect, request, required,
requiredposition, response, tabindex, template, templateDir,
templateEngineManager, templateSuffix, theme, title, tooltip,
tooltipConfig, value
Fields inherited from class org.apache.struts2.components.Component
actionMapper, COMPONENT_STACK, id, parameters, stack
Constructor Summary
Autocompleter(ValueStack stack, HttpServletRequest request,
HttpServletResponse response)
Method Summary
void evaluateExtraParams()
protected findListValue()
Object
String getComponentName()
protected getDefaultTemplate()
String A contract that requireseach concrete UI Tag to specify which
template should be used as a default.
void setAutoComplete(String autoComplete)
void setDelay(String searchDelay)
void setDisabled(String disabled)
void setDropdownHeight(String height)
void setDropdownWidth(String width)
void setForceValidOption(String forceValidOption)
void setFormFilter(String formFilter)
void setFormId(String formId)
void setHref(String href)
void setIconPath(String iconPath)
void setIndicator(String indicator)
void setKeyName(String keyName)
void setList(String list)
void setListenTopics(String listenTopics)
void setLoadMinimumCount(String loadMinimumCount)
void setLoadOnTextChange(String loadOnType)
void setNotifyTopics(String onValueChangedPublishTopic)
void setSearchType(String searchType)
void setShowDownArrow(String showDownArrow)
void setTemplateCssPath(String templateCssPath)
Methods inherited from class org.apache.struts2.components.ComboBox
setEmptyOption, setHeaderKey, setHeaderValue, setListKey, setListValue
Methods inherited from class org.apache.struts2.components.TextField
setMaxlength, setMaxLength, setReadonly, setSize
Methods inherited from class org.apache.struts2.components.UIBean
addFormParameter, buildTemplateName, enableAncestorFormCustomOnsubmit,
end, escape, evaluateNameValue, evaluateParams, getTemplate,
getTemplateDir, getTheme, getTooltipConfig, getValueClassType,
mergeTemplate, populateComponentHtmlId, setAccesskey, setCssClass,
setCssStyle, setDefaultTemplateDir, setDefaultUITheme, setKey,
setLabel, setLabelposition, setName, setOnblur, setOnchange,
setOnclick, setOndblclick, setOnfocus, setOnkeydown, setOnkeypress,
setOnkeyup, setOnmousedown, setOnmousemove, setOnmouseout,
setOnmouseover, setOnmouseup, setOnselect, setRequired,
setRequiredposition, setTabindex, setTemplate, setTemplateDir,
setTemplateEngineManager, setTheme, setTitle, setTooltip,
setTooltipConfig, setValue
Methods inherited from class org.apache.struts2.components.Component
addAllParameters, addParameter, altSyntax, copyParams,
determineActionURL, determineNamespace, end, fieldError, findAncestor,
findString, findString, findValue, findValue, findValue,
getComponentStack, getId, getParameters, getStack, popComponentStack,
setActionMapper, setId, start, toString, usesBody
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll,
toString, wait, wait, wait
Field Detail
TEMPLATE
public static final String TEMPLATE
See Also:
Constant Field Values
COMPONENT_NAME
private static final String COMPONENT_NAME
forceValidOption
protected String forceValidOption
searchType
protected String searchType
autoComplete
protected String autoComplete
delay
protected String delay
disabled
protected String disabled
href
protected String href
dropdownWidth
protected String dropdownWidth
dropdownHeight
protected String dropdownHeight
formId
protected String formId
formFilter
protected String formFilter
listenTopics
protected String listenTopics
notifyTopics
protected String notifyTopics
indicator
protected String indicator
loadOnTextChange
protected String loadOnTextChange
loadMinimumCount
protected String loadMinimumCount
showDownArrow
protected String showDownArrow
templateCssPath
protected String templateCssPath
iconPath
protected String iconPath
keyName
protected String keyName
Constructor Detail
Autocompleter
public Autocompleter(ValueStack stack,
HttpServletRequest request,
HttpServletResponse response)
Method Detail
getDefaultTemplate
protected String getDefaultTemplate()
Description copied from class: UIBean
A contract that requires each concrete UI Tag to specify which template should be
used as a default. For example, the CheckboxTab might return "checkbox.vm"
while the RadioTag might return "radio.vm". This value not begin with a '/' unless
you intend to make the path absolute rather than relative to the current theme.
Overrides:
getDefaultTemplate in class ComboBox
Returns:
The name of the template to be used as the default.
getComponentName
public String getComponentName()
evaluateExtraParams
public void evaluateExtraParams()
Overrides:
evaluateExtraParams in class ComboBox
findListValue
protected Object findListValue()
Overrides:
findListValue in class ComboBox
setAutoComplete
public void setAutoComplete(String autoComplete)
setDisabled
public void setDisabled(String disabled)
Overrides:
setDisabled in class UIBean
setForceValidOption
public void setForceValidOption(String forceValidOption)
setHref
public void setHref(String href)
setDelay
public void setDelay(String searchDelay)
setSearchType
public void setSearchType(String searchType)
setDropdownHeight
public void setDropdownHeight(String height)
setDropdownWidth
public void setDropdownWidth(String width)
setFormFilter
public void setFormFilter(String formFilter)
setFormId
public void setFormId(String formId)
setListenTopics
public void setListenTopics(String listenTopics)
setNotifyTopics
public void
setNotifyTopics(String onValueChangedPublishTopic)
setIndicator
public void setIndicator(String indicator)
setLoadMinimumCount
public void setLoadMinimumCount(String loadMinimumCount)
setLoadOnTextChange
public void setLoadOnTextChange(String loadOnType)
setShowDownArrow
public void setShowDownArrow(String showDownArrow)
setList
public void setList(String list)
Overrides:
setList in class ComboBox
setTemplateCssPath
public void setTemplateCssPath(String templateCssPath)
setIconPath
public void setIconPath(String iconPath)
setKeyName
public void setKeyName(String keyName)
org.apache.struts2.components
Class Bean
java.lang.Object
org.apache.struts2.components.Component
org.apache.struts2.components.Bean
Instantiates a class that conforms to the JavaBeans specification. This tag has a body
which can contain a number of Param elements to set any mutator methods on that class.
If the id attribute is set on the BeanTag, it will place the instantiated bean into the stack's
Context.
id - the stack's context id (if supplied) that the created bean will be store under
name* - the class name of the bean to be instantiated (must respect JavaBean
specification)
Examples:
[/s:bean]
This example instantiates a bean called SimpleCounter and sets the foo property
(setFoo('BAR')). The SimpleCounter object is then pushed onto the Valuestack, which
means that we can call its accessor methods (getFoo()) with the Property tag and get their
values.
In the above example, the id has been set to a value of counter. This means that the
SimpleCounter class will be placed into the stack's context. You can access the
SimpleCounter class using a Struts tag:
In the property tag example, the # tells Ognl to search the context for the SimpleCounter
class which has an id(key) of counter
See Also:
Param
Field Summary
protected bean
Object
protected log
static Log
protected name
String
protected objectFactory
ObjectFactory
Fields inherited from class org.apache.struts2.components.Component
actionMapper, COMPONENT_STACK, id, parameters, stack
Constructor Summary
Bean(ValueStack stack)
Method Summary
void addParameter(String key, Object value)
Add's the given key and value to this components own parameter.
boolean end(Writer writer, String body)
Callback for the end tag of this component.
void setName(String name)
void setObjectFactory(ObjectFactory objectFactory)
boolean start(Writer writer)
Callback for the start tag of this component.
Methods inherited from class org.apache.struts2.components.Component
addAllParameters, altSyntax, copyParams, determineActionURL,
determineNamespace, end, fieldError, findAncestor, findString,
findString, findValue, findValue, findValue, getComponentStack, getId,
getParameters, getStack, popComponentStack, setActionMapper, setId,
toString, usesBody
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll,
toString, wait, wait, wait
Field Detail
log
protected static Log log
bean
protected Object bean
name
protected String name
objectFactory
protected ObjectFactory objectFactory
Constructor Detail
Bean
public Bean(ValueStack stack)
Method Detail
setObjectFactory
public void setObjectFactory(ObjectFactory objectFactory)
start
public boolean start(Writer writer)
Description copied from class: Component
Callback for the start tag of this component. Should the body be evaluated?
Overrides:
start in class Component
Parameters:
writer - the output writer.
Returns:
true if the body should be evaluated
end
public boolean end(Writer writer,
String body)
Description copied from class: Component
Callback for the end tag of this component. Should the body be evaluated again?
Overrides:
end in class Component
Parameters:
writer - the output writer.
body - the rendered body.
Returns:
true if the body should be evaluated again
addParameter
public void addParameter(String key,
Object value)
Description copied from class: Component
Add's the given key and value to this components own parameter.
If the provided key is null nothing happends. If the provided value is null any
existing parameter with the given key name is removed.
Overrides:
addParameter in class Component
Parameters:
key - the key of the new parameter to add.
value - the value assoicated with the key.
setName
public void setName(String name)
org.apache.struts2.components
Class Checkbox
java.lang.Object
org.apache.struts2.components.Component
org.apache.struts2.components.UIBean
org.apache.struts2.components.Checkbox
Renders an HTML input element of type checkbox, populated by the specified property
from the ValueStack.
Examples
JSP:
<s:checkbox label="checkbox test" name="checkboxField1"
value="aBoolean" fieldValue="true"/>
Velocity:
#tag( Checkbox "label=checkbox test" "name=checkboxField1"
"value=aBoolean" )
Field Summary
protected fieldValue
String
static String TEMPLATE
Fields inherited from class org.apache.struts2.components.UIBean
accesskey, cssClass, cssStyle, defaultTemplateDir, defaultUITheme,
disabled, key, label, labelPosition, name, onblur, onchange, onclick,
ondblclick, onfocus, onkeydown, onkeypress, onkeyup, onmousedown,
onmousemove, onmouseout, onmouseover, onmouseup, onselect, request,
required, requiredposition, response, tabindex, template, templateDir,
templateEngineManager, templateSuffix, theme, title, tooltip,
tooltipConfig, value
Fields inherited from class org.apache.struts2.components.Component
actionMapper, COMPONENT_STACK, id, parameters, stack
Constructor Summary
Checkbox(ValueStack stack, HttpServletRequest request,
HttpServletResponse response)
Method Summary
protected evaluateExtraParams()
void
protected getDefaultTemplate()
String A contract that requireseach concrete UI Tag to specify which
template should be used as a default.
protected getValueClassType()
Class
void setFieldValue(String fieldValue)
Methods inherited from class org.apache.struts2.components.UIBean
addFormParameter, buildTemplateName, enableAncestorFormCustomOnsubmit,
end, escape, evaluateNameValue, evaluateParams, getTemplate,
getTemplateDir, getTheme, getTooltipConfig, mergeTemplate,
populateComponentHtmlId, setAccesskey, setCssClass, setCssStyle,
setDefaultTemplateDir, setDefaultUITheme, setDisabled, setKey,
setLabel, setLabelposition, setName, setOnblur, setOnchange,
setOnclick, setOndblclick, setOnfocus, setOnkeydown, setOnkeypress,
setOnkeyup, setOnmousedown, setOnmousemove, setOnmouseout,
setOnmouseover, setOnmouseup, setOnselect, setRequired,
setRequiredposition, setTabindex, setTemplate, setTemplateDir,
setTemplateEngineManager, setTheme, setTitle, setTooltip,
setTooltipConfig, setValue
Methods inherited from class org.apache.struts2.components.Component
addAllParameters, addParameter, altSyntax, copyParams,
determineActionURL, determineNamespace, end, fieldError, findAncestor,
findString, findString, findValue, findValue, findValue,
getComponentStack, getId, getParameters, getStack, popComponentStack,
setActionMapper, setId, start, toString, usesBody
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll,
toString, wait, wait, wait
Field Detail
TEMPLATE
public static final String TEMPLATE
See Also:
Constant Field Values
fieldValue
protected String fieldValue
Constructor Detail
Checkbox
public Checkbox(ValueStack stack,
HttpServletRequest request,
HttpServletResponse response)
Method Detail
getDefaultTemplate
protected String getDefaultTemplate()
Description copied from class: UIBean
A contract that requires each concrete UI Tag to specify which template should be
used as a default. For example, the CheckboxTab might return "checkbox.vm"
while the RadioTag might return "radio.vm". This value not begin with a '/' unless
you intend to make the path absolute rather than relative to the current theme.
Specified by:
getDefaultTemplate in class UIBean
Returns:
The name of the template to be used as the default.
evaluateExtraParams
protected void evaluateExtraParams()
Overrides:
evaluateExtraParams in class UIBean
getValueClassType
protected Class getValueClassType()
Overrides:
getValueClassType in class UIBean
setFieldValue
public void setFieldValue(String fieldValue)
org.apache.struts2.components
Class CheckboxList
java.lang.Object
org.apache.struts2.components.Component
org.apache.struts2.components.UIBean
org.apache.struts2.components.ListUIBean
org.apache.struts2.components.CheckboxList
Creates a series of checkboxes from a list. Setup is like <s:select /> or <s:radio />, but
creates checkbox tags.
Examples
Field Summary
static String TEMPLATE
Fields inherited from class org.apache.struts2.components.ListUIBean
list, listKey, listValue, throwExceptionOnNullValueAttribute
Fields inherited from class org.apache.struts2.components.UIBean
accesskey, cssClass, cssStyle, defaultTemplateDir, defaultUITheme,
disabled, key, label, labelPosition, name, onblur, onchange, onclick,
ondblclick, onfocus, onkeydown, onkeypress, onkeyup, onmousedown,
onmousemove, onmouseout, onmouseover, onmouseup, onselect, request,
required, requiredposition, response, tabindex, template, templateDir,
templateEngineManager, templateSuffix, theme, title, tooltip,
tooltipConfig, value
Fields inherited from class org.apache.struts2.components.Component
actionMapper, COMPONENT_STACK, id, parameters, stack
Constructor Summary
CheckboxList(ValueStack stack, HttpServletRequest request,
HttpServletResponse response)
Method Summary
protected getDefaultTemplate()
String A contract that requireseach concrete UI Tag to specify which
template should be used as a default.
Methods inherited from class org.apache.struts2.components.ListUIBean
contains, evaluateExtraParams, getValueClassType, setList, setListKey,
setListValue, setThrowExceptionOnNullValueAttribute
Methods inherited from class org.apache.struts2.components.UIBean
addFormParameter, buildTemplateName, enableAncestorFormCustomOnsubmit,
end, escape, evaluateNameValue, evaluateParams, getTemplate,
getTemplateDir, getTheme, getTooltipConfig, mergeTemplate,
populateComponentHtmlId, setAccesskey, setCssClass, setCssStyle,
setDefaultTemplateDir, setDefaultUITheme, setDisabled, setKey,
setLabel, setLabelposition, setName, setOnblur, setOnchange,
setOnclick, setOndblclick, setOnfocus, setOnkeydown, setOnkeypress,
setOnkeyup, setOnmousedown, setOnmousemove, setOnmouseout,
setOnmouseover, setOnmouseup, setOnselect, setRequired,
setRequiredposition, setTabindex, setTemplate, setTemplateDir,
setTemplateEngineManager, setTheme, setTitle, setTooltip,
setTooltipConfig, setValue
Methods inherited from class org.apache.struts2.components.Component
addAllParameters, addParameter, altSyntax, copyParams,
determineActionURL, determineNamespace, end, fieldError, findAncestor,
findString, findString, findValue, findValue, findValue,
getComponentStack, getId, getParameters, getStack, popComponentStack,
setActionMapper, setId, start, toString, usesBody
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll,
toString, wait, wait, wait
Field Detail
TEMPLATE
public static final String TEMPLATE
See Also:
Constant Field Values
Constructor Detail
CheckboxList
public CheckboxList(ValueStack stack,
HttpServletRequest request,
HttpServletResponse response)
Method Detail
getDefaultTemplate
protected String getDefaultTemplate()
Description copied from class: UIBean
A contract that requires each concrete UI Tag to specify which template should be
used as a default. For example, the CheckboxTab might return "checkbox.vm"
while the RadioTag might return "radio.vm". This value not begin with a '/' unless
you intend to make the path absolute rather than relative to the current theme.
Specified by:
getDefaultTemplate in class UIBean
Returns:
The name of the template to be used as the default.
org.apache.struts2.components
Class ClosingUIBean
java.lang.Object
org.apache.struts2.components.Component
org.apache.struts2.components.UIBean
org.apache.struts2.components.ClosingUIBean
Direct Known Subclasses:
AbstractRemoteCallUIBean, Form, TabbedPanel, Tree, TreeNode
Field Summary
private LOG
static Log
(package openTemplate
private)
String
Fields inherited from class org.apache.struts2.components.UIBean
accesskey, cssClass, cssStyle, defaultTemplateDir, defaultUITheme,
disabled, key, label, labelPosition, name, onblur, onchange, onclick,
ondblclick, onfocus, onkeydown, onkeypress, onkeyup, onmousedown,
onmousemove, onmouseout, onmouseover, onmouseup, onselect, request,
required, requiredposition, response, tabindex, template, templateDir,
templateEngineManager, templateSuffix, theme, title, tooltip,
tooltipConfig, value
Fields inherited from class org.apache.struts2.components.Component
actionMapper, COMPONENT_STACK, id, parameters, stack
Constructor Summary
protected ClosingUIBean(ValueStack stack, HttpServletRequest request,
HttpServletResponse response)
Method Summary
abstract getDefaultOpenTemplate()
String
void setOpenTemplate(String openTemplate)
boolean start(Writer writer)
Callback for the start tag of this component.
Methods inherited from class org.apache.struts2.components.UIBean
addFormParameter, buildTemplateName, enableAncestorFormCustomOnsubmit,
end, escape, evaluateExtraParams, evaluateNameValue, evaluateParams,
getDefaultTemplate, getTemplate, getTemplateDir, getTheme,
getTooltipConfig, getValueClassType, mergeTemplate,
populateComponentHtmlId, setAccesskey, setCssClass, setCssStyle,
setDefaultTemplateDir, setDefaultUITheme, setDisabled, setKey,
setLabel, setLabelposition, setName, setOnblur, setOnchange,
setOnclick, setOndblclick, setOnfocus, setOnkeydown, setOnkeypress,
setOnkeyup, setOnmousedown, setOnmousemove, setOnmouseout,
setOnmouseover, setOnmouseup, setOnselect, setRequired,
setRequiredposition, setTabindex, setTemplate, setTemplateDir,
setTemplateEngineManager, setTheme, setTitle, setTooltip,
setTooltipConfig, setValue
Methods inherited from class org.apache.struts2.components.Component
addAllParameters, addParameter, altSyntax, copyParams,
determineActionURL, determineNamespace, end, fieldError, findAncestor,
findString, findString, findValue, findValue, findValue,
getComponentStack, getId, getParameters, getStack, popComponentStack,
setActionMapper, setId, toString, usesBody
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll,
toString, wait, wait, wait
Field Detail
LOG
private static final Log LOG
openTemplate
String openTemplate
Constructor Detail
ClosingUIBean
protected ClosingUIBean(ValueStack stack,
HttpServletRequest request,
HttpServletResponse response)
Method Detail
getDefaultOpenTemplate
public abstract String getDefaultOpenTemplate()
setOpenTemplate
public void setOpenTemplate(String openTemplate)
start
public boolean start(Writer writer)
Description copied from class: Component
Callback for the start tag of this component. Should the body be evaluated?
Overrides:
start in class Component
Parameters:
writer - the output writer.
Returns:
true if the body should be evaluated
org.apache.struts2.components
Class ComboBox
java.lang.Object
org.apache.struts2.components.Component
org.apache.struts2.components.UIBean
org.apache.struts2.components.TextField
org.apache.struts2.components.ComboBox
Direct Known Subclasses:
Autocompleter
The combo box is basically an HTML INPUT of type text and HTML SELECT grouped
together to give you a combo box functionality. You can place text in the INPUT control
by using the SELECT control or type it in directly in the text field.
In this example, the SELECT will be populated from id=year attribute. Counter is itself
an Iterator. It will span from first to last. The population is done via javascript, and
requires that this tag be surrounded by a <form>.
Note that unlike the <s:select/> tag, there is no ability to define the individual <option>
tags' id attribute or content separately. Each of these is simply populated from the
toString() method of the list item. Presumably this is because the select box isn't intended
to actually submit useful data, but to assist the user in filling out the text field.
Examples
JSP:
<-- Example One -->
<s:bean name="struts.util.Counter" id="year">
<s:param name="first" value="text('firstBirthYear')"/>
<s:param name="last" value="2000"/>
Velocity:
#tag( ComboBox "label=Birth year" "size=6" "maxlength=4"
"name=birthYear" "list=#year" )
Field Summary
protected emptyOption
String
protected headerKey
String
protected headerValue
String
protected list
String
protected listKey
String
protected listValue
String
static String TEMPLATE
Fields inherited from class org.apache.struts2.components.TextField
maxlength, readonly, size
Fields inherited from class org.apache.struts2.components.UIBean
accesskey, cssClass, cssStyle, defaultTemplateDir, defaultUITheme,
disabled, key, label, labelPosition, name, onblur, onchange, onclick,
ondblclick, onfocus, onkeydown, onkeypress, onkeyup, onmousedown,
onmousemove, onmouseout, onmouseover, onmouseup, onselect, request,
required, requiredposition, response, tabindex, template, templateDir,
templateEngineManager, templateSuffix, theme, title, tooltip,
tooltipConfig, value
Fields inherited from class org.apache.struts2.components.Component
actionMapper, COMPONENT_STACK, id, parameters, stack
Constructor Summary
ComboBox(ValueStack stack, HttpServletRequest request,
HttpServletResponse response)
Method Summary
void evaluateExtraParams()
protected findListValue()
Object
protected getDefaultTemplate()
String A contract that requireseach concrete UI Tag to specify which
template should be used as a default.
void setEmptyOption(String emptyOption)
void setHeaderKey(String headerKey)
void setHeaderValue(String headerValue)
void setList(String list)
void setListKey(String listKey)
void setListValue(String listValue)
Methods inherited from class org.apache.struts2.components.TextField
setMaxlength, setMaxLength, setReadonly, setSize
Methods inherited from class org.apache.struts2.components.UIBean
addFormParameter, buildTemplateName, enableAncestorFormCustomOnsubmit,
end, escape, evaluateNameValue, evaluateParams, getTemplate,
getTemplateDir, getTheme, getTooltipConfig, getValueClassType,
mergeTemplate, populateComponentHtmlId, setAccesskey, setCssClass,
setCssStyle, setDefaultTemplateDir, setDefaultUITheme, setDisabled,
setKey, setLabel, setLabelposition, setName, setOnblur, setOnchange,
setOnclick, setOndblclick, setOnfocus, setOnkeydown, setOnkeypress,
setOnkeyup, setOnmousedown, setOnmousemove, setOnmouseout,
setOnmouseover, setOnmouseup, setOnselect, setRequired,
setRequiredposition, setTabindex, setTemplate, setTemplateDir,
setTemplateEngineManager, setTheme, setTitle, setTooltip,
setTooltipConfig, setValue
Methods inherited from class org.apache.struts2.components.Component
addAllParameters, addParameter, altSyntax, copyParams,
determineActionURL, determineNamespace, end, fieldError, findAncestor,
findString, findString, findValue, findValue, findValue,
getComponentStack, getId, getParameters, getStack, popComponentStack,
setActionMapper, setId, start, toString, usesBody
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll,
toString, wait, wait, wait
Field Detail
TEMPLATE
public static final String TEMPLATE
See Also:
Constant Field Values
list
protected String list
listKey
protected String listKey
listValue
protected String listValue
headerKey
protected String headerKey
headerValue
protected String headerValue
emptyOption
protected String emptyOption
Constructor Detail
ComboBox
public ComboBox(ValueStack stack,
HttpServletRequest request,
HttpServletResponse response)
Method Detail
getDefaultTemplate
protected String getDefaultTemplate()
Description copied from class: UIBean
A contract that requires each concrete UI Tag to specify which template should be
used as a default. For example, the CheckboxTab might return "checkbox.vm"
while the RadioTag might return "radio.vm". This value not begin with a '/' unless
you intend to make the path absolute rather than relative to the current theme.
Overrides:
getDefaultTemplate in class TextField
Returns:
The name of the template to be used as the default.
evaluateExtraParams
public void evaluateExtraParams()
Overrides:
evaluateExtraParams in class TextField
findListValue
protected Object findListValue()
setList
public void setList(String list)
setEmptyOption
public void setEmptyOption(String emptyOption)
setHeaderKey
public void setHeaderKey(String headerKey)
setHeaderValue
public void setHeaderValue(String headerValue)
setListKey
public void setListKey(String listKey)
setListValue
public void setListValue(String listValue)
org.apache.struts2.components
Class Component
java.lang.Object
org.apache.struts2.components.Component
Direct Known Subclasses:
ActionComponent, AppendIterator, Bean, Date, Else, ElseIf, I18n, If, Include,
IteratorComponent, MergeIterator, OptGroup, Param, Property, Push, Set, Text,
UIBean, URL
Field Summary
protected actionMapper
ActionMapper
static String COMPONENT_STACK
protected id
String
protected parameters
Map
protected stack
ValueStack
Constructor Summary
Component(ValueStack stack)
Constructor.
Method Summary
void addAllParameters(Map params)
Add's all the given parameters to this componenets own
parameters.
void addParameter(String key, Object value)
Add's the given key and value to this components own
parameter.
boolean altSyntax()
Is the altSyntax enabled? [TRUE]
protected findValue(String expr)
Object Finds a value from the OGNL stack based on the given
expression.
protected findValue(String expr, Class toType)
Object Evaluates the OGNL stack to find an Object of the given
type.
protected findValue(String expr, String field, String errorMsg)
Object Evaluates the OGNL stack to find an Object value.
Field Detail
COMPONENT_STACK
public static final String COMPONENT_STACK
See Also:
Constant Field Values
stack
protected ValueStack stack
parameters
protected Map parameters
id
protected String id
actionMapper
protected ActionMapper actionMapper
Constructor Detail
Component
public Component(ValueStack stack)
Constructor.
Parameters:
stack - OGNL value stack.
Method Detail
getComponentName
private String getComponentName()
Get's the name of this component.
Returns:
the name of this component.
setActionMapper
public void setActionMapper(ActionMapper mapper)
getStack
public ValueStack getStack()
Get's the OGNL value stack assoicated with this component.
Returns:
the OGNL value stack assoicated with this component.
getComponentStack
public Stack getComponentStack()
Get's the component stack of this component.
Returns:
the component stack of this component, never null.
start
public boolean start(Writer writer)
Callback for the start tag of this component. Should the body be evaluated?
Parameters:
writer - the output writer.
Returns:
true if the body should be evaluated
end
public boolean end(Writer writer,
String body)
Callback for the end tag of this component. Should the body be evaluated again?
Parameters:
writer - the output writer.
body - the rendered body.
Returns:
true if the body should be evaluated again
end
protected boolean end(Writer writer,
String body,
boolean popComponentStack)
Callback for the start tag of this component. Should the body be evaluated again?
Parameters:
writer - the output writer.
body - the rendered body.
popComponentStack - should the component stack be popped?
Returns:
true if the body should be evaluated again
popComponentStack
protected void popComponentStack()
Pops the component stack.
findAncestor
protected Component findAncestor(Class clazz)
Finds the nearest ancestor of this component stack.
Parameters:
clazz - the class to look for, or if assignable from.
Returns:
the component if found, null if not.
findString
protected String findString(String expr)
Evaluates the OGNL stack to find a String value.
Parameters:
expr - OGNL expression.
Returns:
the String value found.
findString
protected String findString(String expr,
String field,
String errorMsg)
Evaluates the OGNL stack to find a String value.
Parameters:
expr - OGNL expression.
field - field name used when throwing RuntimeException.
errorMsg - error message used when throwing RuntimeException.
Returns:
the String value found.
Throws:
StrutsException - is thrown in case of expression is null.
fieldError
protected StrutsException fieldError(String field,
String errorMsg,
Exception e)
Constructs?a RuntimeException based on the given information.
Parameters:
field - field name used when throwing RuntimeException.
errorMsg - error message used when throwing RuntimeException.
e - the caused exception, can be null.
Returns:
the constructed StrutsException.
findValue
protected Object findValue(String expr)
Finds a value from the OGNL stack based on the given expression. Will always
evaluate expr against stack except when expr is null. If altsyntax (%{...}) is
applied, simply strip it off.
Parameters:
expr - the expression. Returns null if expr is null.
Returns:
the value, null if not found.
altSyntax
public boolean altSyntax()
Is the altSyntax enabled? [TRUE]
findValue
protected Object findValue(String expr,
String field,
String errorMsg)
Evaluates the OGNL stack to find an Object value.
Function just like findValue(String) except that if the given expression is null
a error is logged and a RuntimeException is thrown constructed with a messaged
based on the given field and errorMsg paramter.
Parameters:
expr - OGNL expression.
field - field name used when throwing RuntimeException.
errorMsg - error message used when throwing RuntimeException.
Returns:
the Object found, is never null.
Throws:
StrutsException - is thrown in case of not found in the OGNL stack, or
expression is null.
findValue
protected Object findValue(String expr,
Class toType)
Evaluates the OGNL stack to find an Object of the given type. Will evaluate expr
the portion wrapped with altSyntax (%{...}) against stack when altSyntax is on,
else the whole expr is evaluated against the stack.
This method only supports the altSyntax. So this should be set to true.
Parameters:
expr - OGNL expression.
toType - the type expected to find.
Returns:
the Object found, or null if not found.
determineActionURL
protected String determineActionURL(String action,
String namespace,
String method,
HttpServletRequest req,
HttpServletResponse res,
Map parameters,
String scheme,
boolean includeContext,
boolean encodeResult)
Renders an action URL by consulting the ActionMapper.
Parameters:
action - the action
namespace - the namespace
method - the method
req - HTTP request
res - HTTP response
parameters - parameters
scheme - http or https
includeContext - should the context path be included or not
encodeResult - should the url be encoded
Returns:
the action url.
determineNamespace
protected String determineNamespace(String namespace,
ValueStack stack,
HttpServletRequest req)
Determines the namespace of the current page being renderdd. Useful for Form,
URL, and href generations.
Parameters:
namespace - the namespace
stack - OGNL value stack
req - HTTP request
Returns:
the namepsace of the current page being rendered, is never null.
copyParams
public void copyParams(Map params)
Pushes this component's parameter Map as well as the component itself on to the
stack and then copies the supplied parameters over. Because the component's
parameter Map is pushed before the component itself, any key-value pair that
can't be assigned to componet will be set in the parameters Map.
Parameters:
params - the parameters to copy.
toString
protected String toString(Throwable t)
Constructs a string representation of the given exception.
Parameters:
t - the exception
Returns:
the exception as a string.
getParameters
public Map getParameters()
Get's the parameters.
Returns:
the parameters. Is never null.
addAllParameters
public void addAllParameters(Map params)
Add's all the given parameters to this componenets own parameters.
Parameters:
params - the parameters to add.
addParameter
public void addParameter(String key,
Object value)
Add's the given key and value to this components own parameter.
If the provided key is null nothing happends. If the provided value is null any
existing parameter with the given key name is removed.
Parameters:
key - the key of the new parameter to add.
value - the value assoicated with the key.
getId
public String getId()
Get's the id for referencing element.
Returns:
the id for referencing element.
setId
public void setId(String id)
usesBody
public boolean usesBody()
Overwrite to set if body shold be used.
Returns:
always false for this component.
org.apache.struts2.components
Class Date
java.lang.Object
org.apache.struts2.components.Component
org.apache.struts2.components.Date
The date tag will allow you to format a Date in a quick and easy way. You can specify a
custom format (eg. "dd/MM/yyyy hh:mm"), you can generate easy readable notations
(like "in 2 hours, 14 minutes"), or you can just fall back on a predefined format with
key 'struts.date.format' in your properties file. If that key is not defined, it will finally fall
back to the default DateFormat.MEDIUM formatting. Note: If the requested Date object
isn't found on the stack, a blank will be returned.
Following how the date component will work, depending on the value of nice attribute
(which by default is false) and the format attribute.
Condition 2: With nice attribute as false and format attribute is specified eg.
dd/MM/yyyyy
Examples
Field Summary
private DATETAG_DEFAULT_DAYS
static String
private DATETAG_DEFAULT_FUTURE
static String
private DATETAG_DEFAULT_HOURS
static String
private DATETAG_DEFAULT_MINUTES
static String
private DATETAG_DEFAULT_PAST
static String
private DATETAG_DEFAULT_SECONDS
static String
private DATETAG_DEFAULT_YEARS
static String
static String DATETAG_PROPERTY
Property name to fall back when no format is specified
static String DATETAG_PROPERTY_DAYS
Property name that defines the days notation (default:
{0,choice,1#one day|1<{0} days}{1,choice,0#|1#, one hour|1<, {1}
hours})
static String DATETAG_PROPERTY_FUTURE
Property name that defines the future notation (default: in {0})
static String DATETAG_PROPERTY_HOURS
Property name that defines the hours notation (default:
{0,choice,1#one hour|1<{0} hours}{1,choice,0#|1#, one minute|1<,
{1} minutes})
static String DATETAG_PROPERTY_MINUTES
Property name that defines the minutes notation (default:
{0,choice,1#one minute|1<{0} minutes})
static String DATETAG_PROPERTY_PAST
Property name that defines the past notation (default: {0} ago)
static String DATETAG_PROPERTY_SECONDS
Property name that defines the seconds notation (default: in
instant)
static String DATETAG_PROPERTY_YEARS
Property name that defines the years notation (default:
{0,choice,1#one year|1<{0} years}{1,choice,0#|1#, one day|1<, {1}
days})
private format
String
private LOG
static Log
private name
String
private nice
boolean
Fields inherited from class org.apache.struts2.components.Component
actionMapper, COMPONENT_STACK, id, parameters, stack
Constructor Summary
Date(ValueStack stack)
Method Summary
boolean end(Writer writer, String body)
Callback for the end tag of this component.
private findProviderInStack()
TextProvider
Field Detail
LOG
private static final Log LOG
DATETAG_PROPERTY
public static final String DATETAG_PROPERTY
Property name to fall back when no format is specified
See Also:
Constant Field Values
DATETAG_PROPERTY_PAST
public static final String DATETAG_PROPERTY_PAST
Property name that defines the past notation (default: {0} ago)
See Also:
Constant Field Values
DATETAG_DEFAULT_PAST
private static final String DATETAG_DEFAULT_PAST
See Also:
Constant Field Values
DATETAG_PROPERTY_FUTURE
public static final String DATETAG_PROPERTY_FUTURE
Property name that defines the future notation (default: in {0})
See Also:
Constant Field Values
DATETAG_DEFAULT_FUTURE
private static final String DATETAG_DEFAULT_FUTURE
See Also:
Constant Field Values
DATETAG_PROPERTY_SECONDS
public static final String DATETAG_PROPERTY_SECONDS
Property name that defines the seconds notation (default: in instant)
See Also:
Constant Field Values
DATETAG_DEFAULT_SECONDS
private static final String DATETAG_DEFAULT_SECONDS
See Also:
Constant Field Values
DATETAG_PROPERTY_MINUTES
public static final String DATETAG_PROPERTY_MINUTES
Property name that defines the minutes notation (default: {0,choice,1#one minute|
1<{0} minutes})
See Also:
Constant Field Values
DATETAG_DEFAULT_MINUTES
private static final String DATETAG_DEFAULT_MINUTES
See Also:
Constant Field Values
DATETAG_PROPERTY_HOURS
public static final String DATETAG_PROPERTY_HOURS
Property name that defines the hours notation (default: {0,choice,1#one hour|
1<{0} hours}{1,choice,0#|1#, one minute|1<, {1} minutes})
See Also:
Constant Field Values
DATETAG_DEFAULT_HOURS
private static final String DATETAG_DEFAULT_HOURS
See Also:
Constant Field Values
DATETAG_PROPERTY_DAYS
public static final String DATETAG_PROPERTY_DAYS
Property name that defines the days notation (default: {0,choice,1#one day|1<{0}
days}{1,choice,0#|1#, one hour|1<, {1} hours})
See Also:
Constant Field Values
DATETAG_DEFAULT_DAYS
private static final String DATETAG_DEFAULT_DAYS
See Also:
Constant Field Values
DATETAG_PROPERTY_YEARS
public static final String DATETAG_PROPERTY_YEARS
Property name that defines the years notation (default: {0,choice,1#one year|
1<{0} years}{1,choice,0#|1#, one day|1<, {1} days})
See Also:
Constant Field Values
DATETAG_DEFAULT_YEARS
private static final String DATETAG_DEFAULT_YEARS
See Also:
Constant Field Values
name
private String name
format
private String format
nice
private boolean nice
Constructor Detail
Date
public Date(ValueStack stack)
Method Detail
findProviderInStack
private TextProvider findProviderInStack()
formatTime
public String formatTime(TextProvider tp,
Date date)
Calculates the difference in time from now to the given date, and outputs it nicely.
An example:
Now = 2006/03/12 13:38:00, date = 2006/03/12 15:50:00 will output "in 1 hour,
12 minutes".
Parameters:
tp - text provider
date - the date
Returns:
the date nicely
end
public boolean end(Writer writer,
String body)
Description copied from class: Component
Callback for the end tag of this component. Should the body be evaluated again?
Overrides:
end in class Component
Parameters:
writer - the output writer.
body - the rendered body.
Returns:
true if the body should be evaluated again
setFormat
public void setFormat(String format)
setNice
public void setNice(boolean nice)
getName
public String getName()
Returns:
Returns the name.
setName
public void setName(String name)
getFormat
public String getFormat()
Returns:
Returns the format.
isNice
public boolean isNice()
Returns:
Returns the nice.
org.apache.struts2.components
Class DateTimePicker
java.lang.Object
org.apache.struts2.components.Component
org.apache.struts2.components.UIBean
org.apache.struts2.components.DateTimePicker
Dates attributes passed in the `RFC 3339` format: Renders date/time picker element.
Format supported by this component are:-
Format Description
#dd Display day in two digits format
#d Try to display day in one digit format, if cannot use 2 digit format
#MM Display month in two digits format
#M Try to display month in one digits format, if cannot use 2 digit format
#yyyy Display year in four digits format
#yy Display the last two digits of the yaer
#y Display the last digits of the year
Examples
Example 1:
<s:datetimepicker name="order.date" label="Order Date" />
Example 2:
<s:datetimepicker name="delivery.date" label="Delivery Date"
format="#yyyy-#MM-#dd" />
Field Summary
protected String adjustWeeks
protected String dayWidth
protected String displayFormat
protected String displayWeeks
protected String endDate
protected String formatLength
protected String iconPath
protected String language
protected static Log LOG
private RFC3339_FORMAT
static SimpleDateForma
t
protected String startDate
protected String staticDisplay
static String TEMPLATE
protected String templateCssPath
protected String toggleDuration
protected String toggleType
protected String type
protected String weekStartsOn
Fields inherited from class org.apache.struts2.components.UIBean
accesskey, cssClass, cssStyle, defaultTemplateDir, defaultUITheme,
disabled, key, label, labelPosition, name, onblur, onchange, onclick,
ondblclick, onfocus, onkeydown, onkeypress, onkeyup, onmousedown,
onmousemove, onmouseout, onmouseover, onmouseup, onselect, request,
required, requiredposition, response, tabindex, template, templateDir,
templateEngineManager, templateSuffix, theme, title, tooltip,
tooltipConfig, value
Fields inherited from class org.apache.struts2.components.Component
actionMapper, COMPONENT_STACK, id, parameters, stack
Constructor Summary
DateTimePicker(ValueStack stack, HttpServletRequest request,
HttpServletResponse response)
Method Summary
void evaluateParams()
private format(Object obj)
String
protected getDefaultTemplate()
String A contract that requireseach concrete UI Tag to specify which
template should be used as a default.
void setAdjustWeeks(String adjustWeeks)
void setDayWidth(String dayWidth)
void setDisplayFormat(String displayFormat)
void setDisplayWeeks(String displayWeeks)
void setEndDate(String endDate)
void setFormatLength(String formatLength)
void setIconPath(String iconPath)
void setLanguage(String language)
void setStartDate(String startDate)
void setStaticDisplay(String staticDisplay)
void setTemplateCssPath(String templateCssPath)
void setToggleDuration(String toggleDuration)
void setToggleType(String toggleType)
void setType(String type)
void setWeekStartsOn(String weekStartsOn)
Methods inherited from class org.apache.struts2.components.UIBean
addFormParameter, buildTemplateName, enableAncestorFormCustomOnsubmit,
end, escape, evaluateExtraParams, evaluateNameValue, getTemplate,
getTemplateDir, getTheme, getTooltipConfig, getValueClassType,
mergeTemplate, populateComponentHtmlId, setAccesskey, setCssClass,
setCssStyle, setDefaultTemplateDir, setDefaultUITheme, setDisabled,
setKey, setLabel, setLabelposition, setName, setOnblur, setOnchange,
setOnclick, setOndblclick, setOnfocus, setOnkeydown, setOnkeypress,
setOnkeyup, setOnmousedown, setOnmousemove, setOnmouseout,
setOnmouseover, setOnmouseup, setOnselect, setRequired,
setRequiredposition, setTabindex, setTemplate, setTemplateDir,
setTemplateEngineManager, setTheme, setTitle, setTooltip,
setTooltipConfig, setValue
Methods inherited from class org.apache.struts2.components.Component
addAllParameters, addParameter, altSyntax, copyParams,
determineActionURL, determineNamespace, end, fieldError, findAncestor,
findString, findString, findValue, findValue, findValue,
getComponentStack, getId, getParameters, getStack, popComponentStack,
setActionMapper, setId, start, toString, usesBody
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll,
toString, wait, wait, wait
Field Detail
TEMPLATE
public static final String TEMPLATE
See Also:
Constant Field Values
RFC3339_FORMAT
private static final SimpleDateFormat RFC3339_FORMAT
LOG
protected static final Log LOG
iconPath
protected String iconPath
formatLength
protected String formatLength
displayFormat
protected String displayFormat
toggleType
protected String toggleType
toggleDuration
protected String toggleDuration
type
protected String type
displayWeeks
protected String displayWeeks
adjustWeeks
protected String adjustWeeks
startDate
protected String startDate
endDate
protected String endDate
weekStartsOn
protected String weekStartsOn
staticDisplay
protected String staticDisplay
dayWidth
protected String dayWidth
language
protected String language
templateCssPath
protected String templateCssPath
Constructor Detail
DateTimePicker
public DateTimePicker(ValueStack stack,
HttpServletRequest request,
HttpServletResponse response)
Method Detail
getDefaultTemplate
protected String getDefaultTemplate()
Description copied from class: UIBean
A contract that requires each concrete UI Tag to specify which template should be
used as a default. For example, the CheckboxTab might return "checkbox.vm"
while the RadioTag might return "radio.vm". This value not begin with a '/' unless
you intend to make the path absolute rather than relative to the current theme.
Specified by:
getDefaultTemplate in class UIBean
Returns:
The name of the template to be used as the default.
evaluateParams
public void evaluateParams()
Overrides:
evaluateParams in class UIBean
setAdjustWeeks
public void setAdjustWeeks(String adjustWeeks)
setDayWidth
public void setDayWidth(String dayWidth)
setDisplayWeeks
public void setDisplayWeeks(String displayWeeks)
setEndDate
public void setEndDate(String endDate)
setStartDate
public void setStartDate(String startDate)
setStaticDisplay
public void setStaticDisplay(String staticDisplay)
setWeekStartsOn
public void setWeekStartsOn(String weekStartsOn)
setLanguage
public void setLanguage(String language)
setDisplayFormat
public void setDisplayFormat(String displayFormat)
setFormatLength
public void setFormatLength(String formatLength)
setIconPath
public void setIconPath(String iconPath)
setToggleDuration
public void setToggleDuration(String toggleDuration)
setType
public void setType(String type)
setToggleType
public void setToggleType(String toggleType)
setTemplateCssPath
public void setTemplateCssPath(String templateCssPath)
format
private String format(Object obj)
org.apache.struts2.components
Class Debug
java.lang.Object
org.apache.struts2.components.Component
org.apache.struts2.components.UIBean
org.apache.struts2.components.Debug
Field Summary
static String TEMPLATE
Fields inherited from class org.apache.struts2.components.UIBean
accesskey, cssClass, cssStyle, defaultTemplateDir, defaultUITheme,
disabled, key, label, labelPosition, name, onblur, onchange, onclick,
ondblclick, onfocus, onkeydown, onkeypress, onkeyup, onmousedown,
onmousemove, onmouseout, onmouseover, onmouseup, onselect, request,
required, requiredposition, response, tabindex, template, templateDir,
templateEngineManager, templateSuffix, theme, title, tooltip,
tooltipConfig, value
Fields inherited from class org.apache.struts2.components.Component
actionMapper, COMPONENT_STACK, id, parameters, stack
Constructor Summary
Debug(ValueStack stack, HttpServletRequest request,
HttpServletResponse response)
Method Summary
protected getDefaultTemplate()
String A contract that requireseach concrete UI Tag to specify which
template should be used as a default.
boolean start(Writer writer)
Callback for the start tag of this component.
Methods inherited from class org.apache.struts2.components.UIBean
addFormParameter, buildTemplateName, enableAncestorFormCustomOnsubmit,
end, escape, evaluateExtraParams, evaluateNameValue, evaluateParams,
getTemplate, getTemplateDir, getTheme, getTooltipConfig,
getValueClassType, mergeTemplate, populateComponentHtmlId,
setAccesskey, setCssClass, setCssStyle, setDefaultTemplateDir,
setDefaultUITheme, setDisabled, setKey, setLabel, setLabelposition,
setName, setOnblur, setOnchange, setOnclick, setOndblclick, setOnfocus,
setOnkeydown, setOnkeypress, setOnkeyup, setOnmousedown,
setOnmousemove, setOnmouseout, setOnmouseover, setOnmouseup,
setOnselect, setRequired, setRequiredposition, setTabindex,
setTemplate, setTemplateDir, setTemplateEngineManager, setTheme,
setTitle, setTooltip, setTooltipConfig, setValue
Methods inherited from class org.apache.struts2.components.Component
addAllParameters, addParameter, altSyntax, copyParams,
determineActionURL, determineNamespace, end, fieldError, findAncestor,
findString, findString, findValue, findValue, findValue,
getComponentStack, getId, getParameters, getStack, popComponentStack,
setActionMapper, setId, toString, usesBody
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll,
toString, wait, wait, wait
Field Detail
TEMPLATE
public static final String TEMPLATE
See Also:
Constant Field Values
Constructor Detail
Debug
public Debug(ValueStack stack,
HttpServletRequest request,
HttpServletResponse response)
Method Detail
getDefaultTemplate
protected String getDefaultTemplate()
Description copied from class: UIBean
A contract that requires each concrete UI Tag to specify which template should be
used as a default. For example, the CheckboxTab might return "checkbox.vm"
while the RadioTag might return "radio.vm". This value not begin with a '/' unless
you intend to make the path absolute rather than relative to the current theme.
Specified by:
getDefaultTemplate in class UIBean
Returns:
The name of the template to be used as the default.
start
public boolean start(Writer writer)
Description copied from class: Component
Callback for the start tag of this component. Should the body be evaluated?
Overrides:
start in class Component
Parameters:
writer - the output writer.
Returns:
true if the body should be evaluated
org.apache.struts2.components
Class Div
java.lang.Object
org.apache.struts2.components.Component
org.apache.struts2.components.UIBean
org.apache.struts2.components.ClosingUIBean
org.apache.struts2.components.AbstractRemoteCallUIBean
org.apache.struts2.components.Div
All Implemented Interfaces:
RemoteUICallBean
public class Div
extends AbstractRemoteCallUIBean
The div tag when used on the ajax theme, provides a remote call from the current page to
update a section of content without having to refresh the entire page.
It creates a HTML <DIV /> that obtains it's content via a remote XMLHttpRequest call
via the dojo framework.
'targets' is a list of element ids whose content will be updated with the text returned from
request.
'errorText' is the text that will be displayed when there is an error making the request.
'executeScripts' if set to true will execute javascript sections in the returned text.
'loadingText' is the text that will be displayed on the 'targets' elements while making the
request.
'handler' is the name of the function that will take care of making the AJAX request.
Dojo's widget and dom node are passed as parameters).
'formId' is the id of the html form whose fields will be seralized and passed as parameters
in the request.
'formFilter' is the name of a function which will be used to filter the fields that will be
seralized. This function takes as a parameter the element and returns true if the element
should be included.
Examples
Field Summary
protected autoStart
String
static String COMPONENT_NAME
protected delay
String
protected refreshOnShow
String
protected startTimerListenTopics
String
protected stopTimerListenTopics
String
static String TEMPLATE
static String TEMPLATE_CLOSE
protected updateFreq
String
Fields inherited from class
org.apache.struts2.components.AbstractRemoteCallUIBean
afterLoading, beforeLoading, errorText, executeScripts, formFilter,
formId, handler, href, indicator, listenTopics, loadingText,
notifyTopics, showErrorTransportText, showLoadingText
Fields inherited from class org.apache.struts2.components.ClosingUIBean
openTemplate
Fields inherited from class org.apache.struts2.components.UIBean
accesskey, cssClass, cssStyle, defaultTemplateDir, defaultUITheme,
disabled, key, label, labelPosition, name, onblur, onchange, onclick,
ondblclick, onfocus, onkeydown, onkeypress, onkeyup, onmousedown,
onmousemove, onmouseout, onmouseover, onmouseup, onselect, request,
required, requiredposition, response, tabindex, template, templateDir,
templateEngineManager, templateSuffix, theme, title, tooltip,
tooltipConfig, value
Fields inherited from class org.apache.struts2.components.Component
actionMapper, COMPONENT_STACK, id, parameters, stack
Constructor Summary
Div(ValueStack stack, HttpServletRequest request,
HttpServletResponse response)
Method Summary
void evaluateExtraParams()
String getDefaultOpenTemplate()
protected getDefaultTemplate()
String A contract that requires
each concrete UI Tag to specify which
template should be used as a default.
void setAfterLoading(String afterLoading)
void setAutoStart(String autoStart)
void setDelay(String delay)
void setRefreshOnShow(String refreshOnShow)
void setStartTimerListenTopics(String startTimerListenTopic)
void setStopTimerListenTopics(String stopTimerListenTopic)
void setUpdateFreq(String updateInterval)
Methods inherited from class
org.apache.struts2.components.AbstractRemoteCallUIBean
setBeforeLoading, setErrorText, setExecuteScripts, setFormFilter,
setFormId, setHandler, setHref, setIndicator, setListenTopics,
setLoadingText, setNotifyTopics, setShowErrorTransportText,
setShowLoadingText
Methods inherited from class org.apache.struts2.components.ClosingUIBean
setOpenTemplate, start
Methods inherited from class org.apache.struts2.components.UIBean
addFormParameter, buildTemplateName, enableAncestorFormCustomOnsubmit,
end, escape, evaluateNameValue, evaluateParams, getTemplate,
getTemplateDir, getTheme, getTooltipConfig, getValueClassType,
mergeTemplate, populateComponentHtmlId, setAccesskey, setCssClass,
setCssStyle, setDefaultTemplateDir, setDefaultUITheme, setDisabled,
setKey, setLabel, setLabelposition, setName, setOnblur, setOnchange,
setOnclick, setOndblclick, setOnfocus, setOnkeydown, setOnkeypress,
setOnkeyup, setOnmousedown, setOnmousemove, setOnmouseout,
setOnmouseover, setOnmouseup, setOnselect, setRequired,
setRequiredposition, setTabindex, setTemplate, setTemplateDir,
setTemplateEngineManager, setTheme, setTitle, setTooltip,
setTooltipConfig, setValue
Methods inherited from class org.apache.struts2.components.Component
addAllParameters, addParameter, altSyntax, copyParams,
determineActionURL, determineNamespace, end, fieldError, findAncestor,
findString, findString, findValue, findValue, findValue,
getComponentStack, getId, getParameters, getStack, popComponentStack,
setActionMapper, setId, toString, usesBody
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll,
toString, wait, wait, wait
Field Detail
TEMPLATE
public static final String TEMPLATE
See Also:
Constant Field Values
TEMPLATE_CLOSE
public static final String TEMPLATE_CLOSE
See Also:
Constant Field Values
COMPONENT_NAME
public static final String COMPONENT_NAME
updateFreq
protected String updateFreq
autoStart
protected String autoStart
delay
protected String delay
startTimerListenTopics
protected String startTimerListenTopics
stopTimerListenTopics
protected String stopTimerListenTopics
refreshOnShow
protected String refreshOnShow
Constructor Detail
Div
public Div(ValueStack stack,
HttpServletRequest request,
HttpServletResponse response)
Method Detail
getDefaultOpenTemplate
public String getDefaultOpenTemplate()
Specified by:
getDefaultOpenTemplate in class ClosingUIBean
getDefaultTemplate
protected String getDefaultTemplate()
Description copied from class: UIBean
A contract that requires each concrete UI Tag to specify which template should be
used as a default. For example, the CheckboxTab might return "checkbox.vm"
while the RadioTag might return "radio.vm". This value not begin with a '/' unless
you intend to make the path absolute rather than relative to the current theme.
Specified by:
getDefaultTemplate in class UIBean
Returns:
The name of the template to be used as the default.
evaluateExtraParams
public void evaluateExtraParams()
Overrides:
evaluateExtraParams in class AbstractRemoteCallUIBean
setAutoStart
public void setAutoStart(String autoStart)
setDelay
public void setDelay(String delay)
setUpdateFreq
public void setUpdateFreq(String updateInterval)
setStartTimerListenTopics
public void setStartTimerListenTopics(String startTimerListenTopic)
setStopTimerListenTopics
public void setStopTimerListenTopics(String stopTimerListenTopic)
setRefreshOnShow
public void setRefreshOnShow(String refreshOnShow)
setAfterLoading
public void setAfterLoading(String afterLoading)
Specified by:
setAfterLoading in interface RemoteUICallBean
Overrides:
setAfterLoading in class AbstractRemoteCallUIBean
org.apache.struts2.components
Class DoubleListUIBean
java.lang.Object
org.apache.struts2.components.Component
org.apache.struts2.components.UIBean
org.apache.struts2.components.ListUIBean
org.apache.struts2.components.DoubleListUIBean
Direct Known Subclasses:
DoubleSelect, OptionTransferSelect
Field Summary
protected doubleAccesskey
String
protected doubleCssClass
String
protected doubleCssStyle
String
protected doubleDisabled
String
protected doubleEmptyOption
String
protected doubleHeaderKey
String
protected doubleHeaderValue
String
protected doubleId
String
protected doubleList
String
protected doubleListKey
String
protected doubleListValue
String
protected doubleMultiple
String
protected doubleName
String
protected doubleOnblur
String
protected doubleOnchange
String
protected doubleOnclick
String
protected doubleOndblclick
String
protected doubleOnfocus
String
protected doubleOnkeydown
String
protected doubleOnkeypress
String
protected doubleOnkeyup
String
protected doubleOnmousedown
String
protected doubleOnmousemove
String
protected doubleOnmouseout
String
protected doubleOnmouseover
String
protected doubleOnmouseup
String
protected doubleOnselect
String
protected doubleSize
String
protected doubleValue
String
protected emptyOption
String
protected formName
String
protected headerKey
String
protected headerValue
String
protected multiple
String
protected size
String
Fields inherited from class org.apache.struts2.components.ListUIBean
list, listKey, listValue, throwExceptionOnNullValueAttribute
Fields inherited from class org.apache.struts2.components.UIBean
accesskey, cssClass, cssStyle, defaultTemplateDir, defaultUITheme,
disabled, key, label, labelPosition, name, onblur, onchange, onclick,
ondblclick, onfocus, onkeydown, onkeypress, onkeyup, onmousedown,
onmousemove, onmouseout, onmouseover, onmouseup, onselect, request,
required, requiredposition, response, tabindex, template, templateDir,
templateEngineManager, templateSuffix, theme, title, tooltip,
tooltipConfig, value
Fields inherited from class org.apache.struts2.components.Component
actionMapper, COMPONENT_STACK, id, parameters, stack
Constructor Summary
DoubleListUIBean(ValueStack stack, HttpServletRequest request,
HttpServletResponse response)
Method Summary
void evaluateExtraParams()
String getDoubleCssClass()
String getDoubleCssStyle()
String getDoubleDisabled()
String getDoubleEmptyOption()
String getDoubleHeaderKey()
String getDoubleHeaderValue()
String getDoubleId()
String getDoubleList()
String getDoubleListKey()
String getDoubleListValue()
String getDoubleMultiple()
String getDoubleName()
String getDoubleOnblur()
String getDoubleOnchange()
String getDoubleOnclick()
String getDoubleOndblclick()
String getDoubleOnfocus()
String getDoubleOnkeydown()
String getDoubleOnkeypress()
String getDoubleOnkeyup()
String getDoubleOnmousedown()
String getDoubleOnmousemove()
String getDoubleOnmouseout()
String getDoubleOnmouseover()
String getDoubleOnmouseup()
String getDoubleOnselect()
String getDoubleSize()
String getDoubleValue()
String getFormName()
void setDoubleAccesskey(String doubleAccesskey)
void setDoubleCssClass(String doubleCssClass)
void setDoubleCssStyle(String doubleCssStyle)
void setDoubleDisabled(String doubleDisabled)
void setDoubleEmptyOption(String doubleEmptyOption)
void setDoubleHeaderKey(String doubleHeaderKey)
void setDoubleHeaderValue(String doubleHeaderValue)
void setDoubleId(String doubleId)
void setDoubleList(String doubleList)
void setDoubleListKey(String doubleListKey)
void setDoubleListValue(String doubleListValue)
void setDoubleMultiple(String doubleMultiple)
void setDoubleName(String doubleName)
void setDoubleOnblur(String doubleOnblur)
void setDoubleOnchange(String doubleOnchange)
void setDoubleOnclick(String doubleOnclick)
void setDoubleOndblclick(String doubleOndblclick)
void setDoubleOnfocus(String doubleOnfocus)
void setDoubleOnkeydown(String doubleOnkeydown)
void setDoubleOnkeypress(String doubleOnkeypress)
void setDoubleOnkeyup(String doubleOnkeyup)
void setDoubleOnmousedown(String doubleOnmousedown)
void setDoubleOnmousemove(String doubleOnmousemove)
void setDoubleOnmouseout(String doubleOnmouseout)
void setDoubleOnmouseover(String doubleOnmouseover)
void setDoubleOnmouseup(String doubleOnmouseup)
void setDoubleOnselect(String doubleOnselect)
void setDoubleSize(String doubleSize)
void setDoubleValue(String doubleValue)
void setEmptyOption(String emptyOption)
void setFormName(String formName)
void setHeaderKey(String headerKey)
void setHeaderValue(String headerValue)
void setMultiple(String multiple)
void setSize(String size)
Methods inherited from class org.apache.struts2.components.ListUIBean
contains, getValueClassType, setList, setListKey, setListValue,
setThrowExceptionOnNullValueAttribute
Methods inherited from class org.apache.struts2.components.UIBean
addFormParameter, buildTemplateName, enableAncestorFormCustomOnsubmit,
end, escape, evaluateNameValue, evaluateParams, getDefaultTemplate,
getTemplate, getTemplateDir, getTheme, getTooltipConfig, mergeTemplate,
populateComponentHtmlId, setAccesskey, setCssClass, setCssStyle,
setDefaultTemplateDir, setDefaultUITheme, setDisabled, setKey,
setLabel, setLabelposition, setName, setOnblur, setOnchange,
setOnclick, setOndblclick, setOnfocus, setOnkeydown, setOnkeypress,
setOnkeyup, setOnmousedown, setOnmousemove, setOnmouseout,
setOnmouseover, setOnmouseup, setOnselect, setRequired,
setRequiredposition, setTabindex, setTemplate, setTemplateDir,
setTemplateEngineManager, setTheme, setTitle, setTooltip,
setTooltipConfig, setValue
Methods inherited from class org.apache.struts2.components.Component
addAllParameters, addParameter, altSyntax, copyParams,
determineActionURL, determineNamespace, end, fieldError, findAncestor,
findString, findString, findValue, findValue, findValue,
getComponentStack, getId, getParameters, getStack, popComponentStack,
setActionMapper, setId, start, toString, usesBody
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll,
toString, wait, wait, wait
Field Detail
emptyOption
protected String emptyOption
headerKey
protected String headerKey
headerValue
protected String headerValue
multiple
protected String multiple
size
protected String size
doubleList
protected String doubleList
doubleListKey
protected String doubleListKey
doubleListValue
protected String doubleListValue
doubleName
protected String doubleName
doubleValue
protected String doubleValue
formName
protected String formName
doubleId
protected String doubleId
doubleDisabled
protected String doubleDisabled
doubleMultiple
protected String doubleMultiple
doubleSize
protected String doubleSize
doubleHeaderKey
protected String doubleHeaderKey
doubleHeaderValue
protected String doubleHeaderValue
doubleEmptyOption
protected String doubleEmptyOption
doubleCssClass
protected String doubleCssClass
doubleCssStyle
protected String doubleCssStyle
doubleOnclick
protected String doubleOnclick
doubleOndblclick
protected String doubleOndblclick
doubleOnmousedown
protected String doubleOnmousedown
doubleOnmouseup
protected String doubleOnmouseup
doubleOnmouseover
protected String doubleOnmouseover
doubleOnmousemove
protected String doubleOnmousemove
doubleOnmouseout
protected String doubleOnmouseout
doubleOnfocus
protected String doubleOnfocus
doubleOnblur
protected String doubleOnblur
doubleOnkeypress
protected String doubleOnkeypress
doubleOnkeydown
protected String doubleOnkeydown
doubleOnkeyup
protected String doubleOnkeyup
doubleOnselect
protected String doubleOnselect
doubleOnchange
protected String doubleOnchange
doubleAccesskey
protected String doubleAccesskey
Constructor Detail
DoubleListUIBean
public DoubleListUIBean(ValueStack stack,
HttpServletRequest request,
HttpServletResponse response)
Method Detail
evaluateExtraParams
public void evaluateExtraParams()
Overrides:
evaluateExtraParams in class ListUIBean
setDoubleList
public void setDoubleList(String doubleList)
setDoubleListKey
public void setDoubleListKey(String doubleListKey)
setDoubleListValue
public void setDoubleListValue(String doubleListValue)
setDoubleName
public void setDoubleName(String doubleName)
setDoubleValue
public void setDoubleValue(String doubleValue)
setFormName
public void setFormName(String formName)
getFormName
public String getFormName()
setDoubleCssClass
public void setDoubleCssClass(String doubleCssClass)
getDoubleCssClass
public String getDoubleCssClass()
setDoubleCssStyle
public void setDoubleCssStyle(String doubleCssStyle)
getDoubleCssStyle
public String getDoubleCssStyle()
setDoubleHeaderKey
public void setDoubleHeaderKey(String doubleHeaderKey)
getDoubleHeaderKey
public String getDoubleHeaderKey()
setDoubleHeaderValue
public void setDoubleHeaderValue(String doubleHeaderValue)
getDoubleHeaderValue
public String getDoubleHeaderValue()
setDoubleEmptyOption
public void setDoubleEmptyOption(String doubleEmptyOption)
getDoubleEmptyOption
public String getDoubleEmptyOption()
getDoubleDisabled
public String getDoubleDisabled()
setDoubleDisabled
public void setDoubleDisabled(String doubleDisabled)
getDoubleId
public String getDoubleId()
setDoubleId
public void setDoubleId(String doubleId)
getDoubleMultiple
public String getDoubleMultiple()
setDoubleMultiple
public void setDoubleMultiple(String doubleMultiple)
getDoubleOnblur
public String getDoubleOnblur()
setDoubleOnblur
public void setDoubleOnblur(String doubleOnblur)
getDoubleOnchange
public String getDoubleOnchange()
setDoubleOnchange
public void setDoubleOnchange(String doubleOnchange)
getDoubleOnclick
public String getDoubleOnclick()
setDoubleOnclick
public void setDoubleOnclick(String doubleOnclick)
getDoubleOndblclick
public String getDoubleOndblclick()
setDoubleOndblclick
public void setDoubleOndblclick(String doubleOndblclick)
getDoubleOnfocus
public String getDoubleOnfocus()
setDoubleOnfocus
public void setDoubleOnfocus(String doubleOnfocus)
getDoubleOnkeydown
public String getDoubleOnkeydown()
setDoubleOnkeydown
public void setDoubleOnkeydown(String doubleOnkeydown)
getDoubleOnkeypress
public String getDoubleOnkeypress()
setDoubleOnkeypress
public void setDoubleOnkeypress(String doubleOnkeypress)
getDoubleOnkeyup
public String getDoubleOnkeyup()
setDoubleOnkeyup
public void setDoubleOnkeyup(String doubleOnkeyup)
getDoubleOnmousedown
public String getDoubleOnmousedown()
setDoubleOnmousedown
public void setDoubleOnmousedown(String doubleOnmousedown)
getDoubleOnmousemove
public String getDoubleOnmousemove()
setDoubleOnmousemove
public void setDoubleOnmousemove(String doubleOnmousemove)
getDoubleOnmouseout
public String getDoubleOnmouseout()
setDoubleOnmouseout
public void setDoubleOnmouseout(String doubleOnmouseout)
getDoubleOnmouseover
public String getDoubleOnmouseover()
setDoubleOnmouseover
public void setDoubleOnmouseover(String doubleOnmouseover)
getDoubleOnmouseup
public String getDoubleOnmouseup()
setDoubleOnmouseup
public void setDoubleOnmouseup(String doubleOnmouseup)
getDoubleOnselect
public String getDoubleOnselect()
setDoubleOnselect
public void setDoubleOnselect(String doubleOnselect)
getDoubleSize
public String getDoubleSize()
setDoubleSize
public void setDoubleSize(String doubleSize)
getDoubleList
public String getDoubleList()
getDoubleListKey
public String getDoubleListKey()
getDoubleListValue
public String getDoubleListValue()
getDoubleName
public String getDoubleName()
getDoubleValue
public String getDoubleValue()
setEmptyOption
public void setEmptyOption(String emptyOption)
setHeaderKey
public void setHeaderKey(String headerKey)
setHeaderValue
public void setHeaderValue(String headerValue)
setMultiple
public void setMultiple(String multiple)
setSize
public void setSize(String size)
setDoubleAccesskey
public void setDoubleAccesskey(String doubleAccesskey)
org.apache.struts2.components
Class DoubleSelect
java.lang.Object
org.apache.struts2.components.Component
org.apache.struts2.components.UIBean
org.apache.struts2.components.ListUIBean
org.apache.struts2.components.DoubleListUIBean
org.apache.struts2.components.DoubleSelect
Renders two HTML select elements with second one changing displayed values
depending on selected entry of first one.
Examples
Field Summary
static String TEMPLATE
Fields inherited from class org.apache.struts2.components.DoubleListUIBean
doubleAccesskey, doubleCssClass, doubleCssStyle, doubleDisabled,
doubleEmptyOption, doubleHeaderKey, doubleHeaderValue, doubleId,
doubleList, doubleListKey, doubleListValue, doubleMultiple, doubleName,
doubleOnblur, doubleOnchange, doubleOnclick, doubleOndblclick,
doubleOnfocus, doubleOnkeydown, doubleOnkeypress, doubleOnkeyup,
doubleOnmousedown, doubleOnmousemove, doubleOnmouseout,
doubleOnmouseover, doubleOnmouseup, doubleOnselect, doubleSize,
doubleValue, emptyOption, formName, headerKey, headerValue, multiple,
size
Fields inherited from class org.apache.struts2.components.ListUIBean
list, listKey, listValue, throwExceptionOnNullValueAttribute
Fields inherited from class org.apache.struts2.components.UIBean
accesskey, cssClass, cssStyle, defaultTemplateDir, defaultUITheme,
disabled, key, label, labelPosition, name, onblur, onchange, onclick,
ondblclick, onfocus, onkeydown, onkeypress, onkeyup, onmousedown,
onmousemove, onmouseout, onmouseover, onmouseup, onselect, request,
required, requiredposition, response, tabindex, template, templateDir,
templateEngineManager, templateSuffix, theme, title, tooltip,
tooltipConfig, value
Fields inherited from class org.apache.struts2.components.Component
actionMapper, COMPONENT_STACK, id, parameters, stack
Constructor Summary
DoubleSelect(ValueStack stack, HttpServletRequest request,
HttpServletResponse response)
Method Summary
void evaluateExtraParams()
protected getDefaultTemplate()
String A contract that requires
each concrete UI Tag to specify which
template should be used as a default.
Methods inherited from class org.apache.struts2.components.DoubleListUIBean
getDoubleCssClass, getDoubleCssStyle, getDoubleDisabled,
getDoubleEmptyOption, getDoubleHeaderKey, getDoubleHeaderValue,
getDoubleId, getDoubleList, getDoubleListKey, getDoubleListValue,
getDoubleMultiple, getDoubleName, getDoubleOnblur, getDoubleOnchange,
getDoubleOnclick, getDoubleOndblclick, getDoubleOnfocus,
getDoubleOnkeydown, getDoubleOnkeypress, getDoubleOnkeyup,
getDoubleOnmousedown, getDoubleOnmousemove, getDoubleOnmouseout,
getDoubleOnmouseover, getDoubleOnmouseup, getDoubleOnselect,
getDoubleSize, getDoubleValue, getFormName, setDoubleAccesskey,
setDoubleCssClass, setDoubleCssStyle, setDoubleDisabled,
setDoubleEmptyOption, setDoubleHeaderKey, setDoubleHeaderValue,
setDoubleId, setDoubleList, setDoubleListKey, setDoubleListValue,
setDoubleMultiple, setDoubleName, setDoubleOnblur, setDoubleOnchange,
setDoubleOnclick, setDoubleOndblclick, setDoubleOnfocus,
setDoubleOnkeydown, setDoubleOnkeypress, setDoubleOnkeyup,
setDoubleOnmousedown, setDoubleOnmousemove, setDoubleOnmouseout,
setDoubleOnmouseover, setDoubleOnmouseup, setDoubleOnselect,
setDoubleSize, setDoubleValue, setEmptyOption, setFormName,
setHeaderKey, setHeaderValue, setMultiple, setSize
Methods inherited from class org.apache.struts2.components.ListUIBean
contains, getValueClassType, setList, setListKey, setListValue,
setThrowExceptionOnNullValueAttribute
Methods inherited from class org.apache.struts2.components.UIBean
addFormParameter, buildTemplateName, enableAncestorFormCustomOnsubmit,
end, escape, evaluateNameValue, evaluateParams, getTemplate,
getTemplateDir, getTheme, getTooltipConfig, mergeTemplate,
populateComponentHtmlId, setAccesskey, setCssClass, setCssStyle,
setDefaultTemplateDir, setDefaultUITheme, setDisabled, setKey,
setLabel, setLabelposition, setName, setOnblur, setOnchange,
setOnclick, setOndblclick, setOnfocus, setOnkeydown, setOnkeypress,
setOnkeyup, setOnmousedown, setOnmousemove, setOnmouseout,
setOnmouseover, setOnmouseup, setOnselect, setRequired,
setRequiredposition, setTabindex, setTemplate, setTemplateDir,
setTemplateEngineManager, setTheme, setTitle, setTooltip,
setTooltipConfig, setValue
Methods inherited from class org.apache.struts2.components.Component
addAllParameters, addParameter, altSyntax, copyParams,
determineActionURL, determineNamespace, end, fieldError, findAncestor,
findString, findString, findValue, findValue, findValue,
getComponentStack, getId, getParameters, getStack, popComponentStack,
setActionMapper, setId, start, toString, usesBody
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll,
toString, wait, wait, wait
Field Detail
TEMPLATE
public static final String TEMPLATE
See Also:
Constant Field Values
Constructor Detail
DoubleSelect
public DoubleSelect(ValueStack stack,
HttpServletRequest request,
HttpServletResponse response)
Method Detail
getDefaultTemplate
protected String getDefaultTemplate()
Description copied from class: UIBean
A contract that requires each concrete UI Tag to specify which template should be
used as a default. For example, the CheckboxTab might return "checkbox.vm"
while the RadioTag might return "radio.vm". This value not begin with a '/' unless
you intend to make the path absolute rather than relative to the current theme.
Specified by:
getDefaultTemplate in class UIBean
Returns:
The name of the template to be used as the default.
evaluateExtraParams
public void evaluateExtraParams()
Overrides:
evaluateExtraParams in class DoubleListUIBean
org.apache.struts2.components
Class Else
java.lang.Object
org.apache.struts2.components.Component
org.apache.struts2.components.Else
Perform basic condition flow. 'If' tag could be used by itself or with 'Else If' Tag and/or
single/multiple 'Else' Tag.
no params
<s:if test="%{false}">
<div>Will Not Be Executed</div>
</s:if>
<s:elseif test="%{true}">
<div>Will Be Executed</div>
</s:elseif>
<s:else>
<div>Will Not Be Executed</div>
</s:else>
Field Summary
Fields inherited from class org.apache.struts2.components.Component
actionMapper, COMPONENT_STACK, id, parameters, stack
Constructor Summary
Else(ValueStack stack)
Method Summary
boolean start(Writer writer)
Callback for the start tag of this component.
Methods inherited from class org.apache.struts2.components.Component
addAllParameters, addParameter, altSyntax, copyParams,
determineActionURL, determineNamespace, end, end, fieldError,
findAncestor, findString, findString, findValue, findValue, findValue,
getComponentStack, getId, getParameters, getStack, popComponentStack,
setActionMapper, setId, toString, usesBody
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll,
toString, wait, wait, wait
Constructor Detail
Else
public Else(ValueStack stack)
Method Detail
start
public boolean start(Writer writer)
Description copied from class: Component
Callback for the start tag of this component. Should the body be evaluated?
Overrides:
start in class Component
Parameters:
writer - the output writer.
Returns:
true if the body should be evaluated
org.apache.struts2.components
Class ElseIf
java.lang.Object
org.apache.struts2.components.Component
org.apache.struts2.components.ElseIf
Perform basic condition flow. 'If' tag could be used by itself or with 'Else If' Tag and/or
single/multiple 'Else' Tag.
<s:if test="%{false}">
<div>Will Not Be Executed</div>
</s:if>
<s:elseif test="%{true}">
<div>Will Be Executed</div>
</s:elseif>
<s:else>
<div>Will Not Be Executed</div>
</s:else>
Field Summary
protected answer
Boolean
protected test
String
Fields inherited from class org.apache.struts2.components.Component
actionMapper, COMPONENT_STACK, id, parameters, stack
Constructor Summary
ElseIf(ValueStack stack)
Method Summary
boolean end(Writer writer, String body)
Callback for the end tag of this component.
void setTest(String test)
boolean start(Writer writer)
Callback for the start tag of this component.
Methods inherited from class org.apache.struts2.components.Component
addAllParameters, addParameter, altSyntax, copyParams,
determineActionURL, determineNamespace, end, fieldError, findAncestor,
findString, findString, findValue, findValue, findValue,
getComponentStack, getId, getParameters, getStack, popComponentStack,
setActionMapper, setId, toString, usesBody
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll,
toString, wait, wait, wait
Field Detail
answer
protected Boolean answer
test
protected String test
Constructor Detail
ElseIf
public ElseIf(ValueStack stack)
Method Detail
start
public boolean start(Writer writer)
Description copied from class: Component
Callback for the start tag of this component. Should the body be evaluated?
Overrides:
start in class Component
Parameters:
writer - the output writer.
Returns:
true if the body should be evaluated
end
public boolean end(Writer writer,
String body)
Description copied from class: Component
Callback for the end tag of this component. Should the body be evaluated again?
Overrides:
end in class Component
Parameters:
writer - the output writer.
body - the rendered body.
Returns:
true if the body should be evaluated again
setTest
public void setTest(String test)