178
Struts 2 Core 2.0.6 API Struts Packages org.apache.struts2 Main Struts interfaces and classes. org.apache.struts2.components org.apache.struts2.components.ta ble org.apache.struts2.components.ta ble.renderer JSP UI tags for rendering table output in HTML. org.apache.struts2.components.te mplate org.apache.struts2.config Classes for Struts configuration and property handling. org.apache.struts2.dispatcher Classes for action dispatching in Struts (the Controller part of MVC). org.apache.struts2.dispatcher.ma pper org.apache.struts2.dispatcher.mu ltipart Classes to help dispatch multipart HTTP requests. org.apache.struts2.impl org.apache.struts2.interceptor Web specific interceptor classes. org.apache.struts2.interceptor.d ebugging org.apache.struts2.interceptor.v alidation org.apache.struts2.portlet

Struts 2 Core 2

Embed Size (px)

Citation preview

Struts 2 Core 2.0.6 APIStruts Packagesorg.apache.struts2 org.apache.struts2.components org.apache.struts2.components.table org.apache.struts2.components.table.renderer org.apache.struts2.components.template org.apache.struts2.config org.apache.struts2.dispatcher org.apache.struts2.dispatcher.mapper org.apache.struts2.dispatcher.multipart org.apache.struts2.impl org.apache.struts2.interceptor 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 org.apache.struts2.validators org.apache.struts2.views org.apache.struts2.views.annotations Miscellaneous helper classes. Web specific interceptor classes. Classes to help dispatch multipart HTTP requests. Classes for Struts configuration and property handling. Classes for action dispatching in Struts (the Controller part of MVC). JSP UI tags for rendering table output in HTML. Main Struts interfaces and classes.

org.apache.struts2.views.freemarker org.apache.struts2.views.freemarker.tags org.apache.struts2.views.jsp org.apache.struts2.views.jsp.iterator org.apache.struts2.views.jsp.ui org.apache.struts2.views.jsp.ui.table org.apache.struts2.views.util org.apache.struts2.views.velocity org.apache.struts2.views.velocity.components

Classes for views using FreeMarker. Struts's JSP tag library. Struts's JSP tag library for iterator handling. Struts' JSP UI tags. JSP UI tags for modeling tables. Miscellaneous helper classes for all views. Classes for views using Velocity. The new xslt view supports an extensible Java XML adapter framework that makes it easy to customize the XML rendering of objects and to incorporate structured XML text and arbitarary DOM fragments into the output.

org.apache.struts2.views.xslt

XWork Packagescom.opensymphony.xwork2 com.opensymphony.xwork2.config com.opensymphony.xwork2.config.entities com.opensymphony.xwork2.config.impl com.opensymphony.xwork2.config.providers Main Xwork interfaces and classes. Configuration core classes. Configuration entity classes. Configuration implementation classes. Configuration provider classes. Type conversion meta data classes. Guice (pronounced "juice"). Guice util classes. Interceptor classes.

com.opensymphony.xwork2.conversion.annotations Type conversion annotations. com.opensymphony.xwork2.conversion.metadata com.opensymphony.xwork2.inject com.opensymphony.xwork2.inject.util com.opensymphony.xwork2.interceptor

com.opensymphony.xwork2.interceptor.annotations Interceptor annotations. com.opensymphony.xwork2.mock com.opensymphony.xwork2.spring com.opensymphony.xwork2.spring.interceptor com.opensymphony.xwork2.util com.opensymphony.xwork2.util.location com.opensymphony.xwork2.util.profiling com.opensymphony.xwork2.validator com.opensymphony.xwork2.validator.annotations com.opensymphony.xwork2.validator.metadata com.opensymphony.xwork2.validator.validators XWork specific mock classes. Spring ObjectFactory classes. Spring specific interceptor classes. XWork util classes. Classes and utilities used to track location information. Classes to enable profiling of action execution. XWork validation subsystem. Validator annotations. Validator meta data classes. XWork default validator classes.

Package org.apache.struts2Main Struts interfaces and classes. See: Description

Interface SummaryStrutsStatics Constants used by Struts.

Class SummaryRequestUtils ServletActionContext StrutsConstants StrutsTestCase Request handling utility class. Web-specific context information for actions. This class provides a central location for framework configuration keys used to retrieve and store Struts configuration settings. Base test case for JUnit testing Struts.

TestNGStrutsTestCase Base test class for TestNG unit tests.

Exception SummaryStrutsException A generic runtime exception that optionally contains Location information

Package org.apache.struts2 DescriptionMain Struts interfaces and classes.org.apache.struts2

Interface StrutsStaticsAll Known Implementing Classes: FilterDispatcher, FilterDispatcherCompatWeblogic61, FreemarkerResult, Jsr168Dispatcher, PlainTextResult, PortletFreemarkerResult, PortletPreferencesInterceptor, PortletResult, PortletVelocityResult, PreparatorServlet, ServletActionContext, ServletActionRedirectResult, ServletConfigInterceptor, ServletDispatcherResult, ServletRedirectResult, StreamResult, StrutsResultSupport, VelocityResultpublic interface StrutsStatics

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);

orActionContext context = ActionContext.getContext(); HttpServletRequest request = (HttpServletRequest)context.get(HTTP_REQUEST);

Field Summarystatic 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 DetailHTTP_REQUESTstatic final String HTTP_REQUEST

Constant for the HTTP request object. See Also: Constant Field Values

HTTP_RESPONSEstatic final String HTTP_RESPONSE

Constant for the HTTP response object. See Also: Constant Field Values

SERVLET_DISPATCHERstatic final String SERVLET_DISPATCHER Constant for an HTTP request dispatcher.

See Also: Constant Field Values

SERVLET_CONTEXTstatic final String SERVLET_CONTEXT Constant for the servlet context object.

See Also: Constant Field Values

PAGE_CONTEXTstatic final String PAGE_CONTEXT Constant for the JSP page context.

See Also: Constant Field Values

STRUTS_PORTLET_CONTEXTstatic final String STRUTS_PORTLET_CONTEXT

Constant for the PortletContext object See Also: Constant Field Values

org.apache.struts2

Class RequestUtilsjava.lang.Object org.apache.struts2.RequestUtils public class RequestUtils extends Object

Request handling utility class.

Constructor SummaryRequestUtils()

Method Summarystatic String getServletPath(HttpServletRequest request)

Retrieves the current request servlet path. Methods inherited from class java.lang.Objectclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Constructor DetailRequestUtilspublic RequestUtils()

Method DetailgetServletPathpublic 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 pathorg.apache.struts2

Class ServletActionContextjava.lang.Object com.opensymphony.xwork2.ActionContext

org.apache.struts2.ServletActionContext

All Implemented Interfaces: Serializable, StrutsStaticspublic class ServletActionContext extends ActionContext implements StrutsStatics

Web-specific context information for actions. This class subclasses ActionContext which provides access to things like the action name, value stack, etc. This class adds access to web objects like servlet parameters, request attributes and things like the HTTP session. See Also: Serialized Form

Field Summarystatic String ACTION_MAPPING private serialVersionUID static long static String STRUTS_VALUESTACK_KEY

Fields inherited from class com.opensymphony.xwork2.ActionContextACTION_INVOCATION, ACTION_NAME, APPLICATION, CONVERSION_ERRORS, LOCALE, PARAMETERS, SESSION, TYPE_CONVERTER, VALUE_STACK

Fields inherited from interface org.apache.struts2.StrutsStaticsHTTP_REQUEST, HTTP_RESPONSE, PAGE_CONTEXT, SERVLET_CONTEXT, SERVLET_DISPATCHER, STRUTS_PORTLET_CONTEXT

Constructor Summaryprivate ServletActionContext(Map context)

Method Summarystatic ActionContext getActionContext(HttpServletRequest req)

Gets the current action contextstatic ActionMapping getActionMapping()

Gets the action mapping for this context

static PageContext getPageContext()

Returns the HTTP page context.static HttpServletRequest getRequest()

Gets the HTTP servlet request object.static HttpServletResponse getResponse()

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 requeststatic 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 servletContext)

Sets the current servlet context object Methods inherited from class com.opensymphony.xwork2.ActionContextget, 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.Objectclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Field DetailserialVersionUIDprivate static final long serialVersionUID

See Also: Constant Field Values

STRUTS_VALUESTACK_KEYpublic static final String STRUTS_VALUESTACK_KEY

See Also: Constant Field Values

ACTION_MAPPINGpublic static final String ACTION_MAPPING

See Also: Constant Field Values

Constructor DetailServletActionContextprivate ServletActionContext(Map context)

Method DetailgetActionContextpublic static ActionContext getActionContext(HttpServletRequest req)

Gets the current action context Parameters: req - The request Returns: The current action context

getValueStackpublic static ValueStack getValueStack(HttpServletRequest req)

Gets the current value stack for this request Parameters: req - The request Returns: The value stack

getActionMappingpublic static ActionMapping getActionMapping()

Gets the action mapping for this context Returns: The action mapping

getPageContextpublic static PageContext getPageContext()

Returns the HTTP page context. Returns: the HTTP page context.

setRequestpublic static void setRequest(HttpServletRequest request)

Sets the HTTP servlet request object. Parameters: request - the HTTP servlet request object.

getRequestpublic static HttpServletRequest getRequest()

Gets the HTTP servlet request object. Returns: the HTTP servlet request object.

setResponsepublic static void setResponse(HttpServletResponse response)

Sets the HTTP servlet response object. Parameters: response - the HTTP servlet response object.

getResponsepublic static HttpServletResponse getResponse()

Gets the HTTP servlet response object. Returns: the HTTP servlet response object.

getServletContextpublic static ServletContext getServletContext()

Gets the servlet context. Returns: the servlet context.

setServletContextpublic static void setServletContext(ServletContext servletContext)

Sets the current servlet context object Parameters: servletContext - The servlet context to useorg.apache.struts2

Class StrutsConstantsjava.lang.Object org.apache.struts2.StrutsConstants public final class StrutsConstants extends Object

This class provides a central location for framework configuration keys used to retrieve and store Struts configuration settings.

Field Summarystatic 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 classstatic String STRUTS_CONFIGURATION_XML_RELOAD

Whether to reload the XML configuration or notstatic String STRUTS_CONTINUATIONS_PACKAGE

The package containing actions that use Rife continuationsstatic String STRUTS_CUSTOM_I18N_RESOURCES

Location of additional localization properties files to loadstatic String STRUTS_CUSTOM_PROPERTIES

Location of additional configuration properties files to loadstatic String STRUTS_DEVMODE

Whether Struts is in development mode or notstatic String STRUTS_DISPATCHER_PARAMETERSWORKAROUND

Whether to use a Servlet request parameter workaround necessary for some versions of WebLogicstatic String STRUTS_ENABLE_DYNAMIC_METHOD_INVOCATION

Allows one to disable dynamic method invocation from the URLstatic String STRUTS_ENABLE_SLASHES_IN_ACTION_NAMES

Whether slashes in action names are allowed or notstatic String STRUTS_FREEMARKER_MANAGER_CLASSNAME

The org.apache.struts2.views.freemarker.FreemarkerManager implementation classstatic String STRUTS_FREEMARKER_WRAPPER_ALT_MAP static String STRUTS_I18N_ENCODING

The encoding to use for localization messagesstatic String STRUTS_I18N_RELOAD

Whether the localization messages should automatically be reloadedstatic String STRUTS_LOCALE

The default locale for the Struts applicationstatic String STRUTS_MAPPER_CLASS

The org.apache.struts2.dispatcher.mapper.ActionMapper implementation classstatic 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 filesstatic String STRUTS_OBJECTFACTORY

The com.opensymphony.xwork2.ObjectFactory implementation classstatic String STRUTS_OBJECTFACTORY_SPRING_AUTOWIRE

Whether Spring should autoWire or notstatic String STRUTS_OBJECTFACTORY_SPRING_USE_CLASS_CACHE

Whether Spring should use its class cache or notstatic String STRUTS_OBJECTTYPEDETERMINER

The com.opensymphony.xwork2.util.ObjectTypeDeterminer implementation classstatic String STRUTS_SERVE_STATIC_BROWSER_CACHE

If static content served by the Struts filter should set browser caching header properties or notstatic String STRUTS_SERVE_STATIC_CONTENT

Whether the Struts filter should serve static content or notstatic String STRUTS_TAG_ALTSYNTAX

Whether to use the alterative syntax for the tags or notstatic String STRUTS_UI_TEMPLATEDIR

The directory containing UI templatesstatic String STRUTS_UI_THEME

The default UI template themestatic String STRUTS_URL_HTTP_PORT

The HTTP port used by Struts URLsstatic String STRUTS_URL_HTTPS_PORT

The HTTPS port used by Struts URLsstatic String STRUTS_URL_INCLUDEPARAMS

The default includeParams method to generate Struts URLsstatic String STRUTS_VELOCITY_CONFIGFILE

The Velocity configuration file pathstatic String STRUTS_VELOCITY_CONTEXTS

List of Velocity context namesstatic String STRUTS_VELOCITY_MANAGER_CLASSNAME

org.apache.struts2.views.velocity.VelocityManager implementation classstatic String STRUTS_VELOCITY_TOOLBOXLOCATION

The location of the Velocity toolboxstatic String STRUTS_XSLT_NOCACHE

Whether or not XSLT templates should not be cachedstatic String STRUTS_XWORKCONVERTER

The name of the xwork converter implementation

Constructor SummaryStrutsConstants()

Method SummaryMethods inherited from class java.lang.Objectclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Field DetailSTRUTS_DEVMODEpublic static final String STRUTS_DEVMODE

Whether Struts is in development mode or not See Also: Constant Field Values

STRUTS_I18N_RELOADpublic static final String STRUTS_I18N_RELOAD

Whether the localization messages should automatically be reloaded See Also: Constant Field Values

STRUTS_I18N_ENCODINGpublic static final String STRUTS_I18N_ENCODING

The encoding to use for localization messages See Also: Constant Field Values

STRUTS_CONFIGURATION_XML_RELOADpublic static final String STRUTS_CONFIGURATION_XML_RELOAD

Whether to reload the XML configuration or not See Also: Constant Field Values

STRUTS_ACTION_EXTENSIONpublic 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_ALTSYNTAXpublic 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_PORTpublic static final String STRUTS_URL_HTTP_PORT

The HTTP port used by Struts URLs See Also: Constant Field Values

STRUTS_URL_HTTPS_PORTpublic static final String STRUTS_URL_HTTPS_PORT

The HTTPS port used by Struts URLs See Also: Constant Field Values

STRUTS_URL_INCLUDEPARAMSpublic static final String STRUTS_URL_INCLUDEPARAMS

The default includeParams method to generate Struts URLs See Also: Constant Field Values

STRUTS_OBJECTFACTORYpublic static final String STRUTS_OBJECTFACTORY

The com.opensymphony.xwork2.ObjectFactory implementation class See Also: Constant Field Values

STRUTS_OBJECTTYPEDETERMINERpublic static final String STRUTS_OBJECTTYPEDETERMINER

The com.opensymphony.xwork2.util.ObjectTypeDeterminer implementation class

See Also: Constant Field Values

STRUTS_CONTINUATIONS_PACKAGEpublic static final String STRUTS_CONTINUATIONS_PACKAGE

The package containing actions that use Rife continuations See Also: Constant Field Values

STRUTS_CONFIGURATIONpublic static final String STRUTS_CONFIGURATION

The org.apache.struts2.config.Configuration implementation class See Also: Constant Field Values

STRUTS_LOCALEpublic static final String STRUTS_LOCALE

The default locale for the Struts application See Also: Constant Field Values

STRUTS_DISPATCHER_PARAMETERSWORKAROUNDpublic 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_CLASSNAMEpublic static final String STRUTS_FREEMARKER_MANAGER_CLASSNAME

The org.apache.struts2.views.freemarker.FreemarkerManager implementation class See Also: Constant Field Values

STRUTS_VELOCITY_MANAGER_CLASSNAMEpublic static final String STRUTS_VELOCITY_MANAGER_CLASSNAME

org.apache.struts2.views.velocity.VelocityManager implementation class See Also: Constant Field Values

STRUTS_VELOCITY_CONFIGFILEpublic static final String STRUTS_VELOCITY_CONFIGFILE

The Velocity configuration file path See Also: Constant Field Values

STRUTS_VELOCITY_TOOLBOXLOCATIONpublic static final String STRUTS_VELOCITY_TOOLBOXLOCATION

The location of the Velocity toolbox See Also: Constant Field Values

STRUTS_VELOCITY_CONTEXTSpublic static final String STRUTS_VELOCITY_CONTEXTS

List of Velocity context names See Also: Constant Field Values

STRUTS_UI_TEMPLATEDIRpublic static final String STRUTS_UI_TEMPLATEDIR

The directory containing UI templates See Also: Constant Field Values

STRUTS_UI_THEMEpublic static final String STRUTS_UI_THEME

The default UI template theme See Also: Constant Field Values

STRUTS_MULTIPART_MAXSIZEpublic static final String STRUTS_MULTIPART_MAXSIZE

The maximize size of a multipart request (file upload) See Also: Constant Field Values

STRUTS_MULTIPART_SAVEDIRpublic static final String STRUTS_MULTIPART_SAVEDIR

The directory to use for storing uploaded files See Also: Constant Field Values

STRUTS_MULTIPART_PARSERpublic 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_AUTOWIREpublic static final String STRUTS_OBJECTFACTORY_SPRING_AUTOWIRE

Whether Spring should autoWire or not

See Also: Constant Field Values

STRUTS_OBJECTFACTORY_SPRING_USE_CLASS_CACHEpublic 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_NOCACHEpublic static final String STRUTS_XSLT_NOCACHE

Whether or not XSLT templates should not be cached See Also: Constant Field Values

STRUTS_CUSTOM_PROPERTIESpublic static final String STRUTS_CUSTOM_PROPERTIES

Location of additional configuration properties files to load See Also: Constant Field Values

STRUTS_CUSTOM_I18N_RESOURCESpublic static final String STRUTS_CUSTOM_I18N_RESOURCES

Location of additional localization properties files to load See Also: Constant Field Values

STRUTS_MAPPER_CLASSpublic static final String STRUTS_MAPPER_CLASS

The org.apache.struts2.dispatcher.mapper.ActionMapper implementation class See Also: Constant Field Values

STRUTS_SERVE_STATIC_CONTENTpublic 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_CACHEpublic 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_INVOCATIONpublic 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_NAMESpublic 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_COMPOSITEpublic static final String STRUTS_MAPPER_COMPOSITE Prefix used by CompositeActionMapper to identify its

containing ActionMapper

class. See Also: Constant Field Values

STRUTS_ACTIONPROXYFACTORYpublic static final String STRUTS_ACTIONPROXYFACTORY

See Also: Constant Field Values

STRUTS_FREEMARKER_WRAPPER_ALT_MAPpublic static final String STRUTS_FREEMARKER_WRAPPER_ALT_MAP

See Also: Constant Field Values

STRUTS_XWORKCONVERTERpublic static final String STRUTS_XWORKCONVERTER

The name of the xwork converter implementation See Also: Constant Field Values

STRUTS_ALWAYS_SELECT_FULL_NAMESPACEpublic static final String STRUTS_ALWAYS_SELECT_FULL_NAMESPACE

See Also: Constant Field Values

Constructor DetailStrutsConstantspublic StrutsConstants()

org.apache.struts2

Class StrutsTestCasejava.lang.Object junit.framework.Assert junit.framework.TestCase com.opensymphony.xwork2.XWorkTestCase org.apache.struts2.StrutsTestCase

All Implemented Interfaces: junit.framework.Testpublic abstract class StrutsTestCase extends XWorkTestCase

Base test case for JUnit testing Struts.

Field SummaryFields inherited from class com.opensymphony.xwork2.XWorkTestCaseactionProxyFactory, configuration, configurationManager, container

Constructor SummaryStrutsTestCase()

Method Summaryprotected initDispatcher(Map 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.XWorkTestCaseloadConfigurationProviders

Methods inherited from class junit.framework.TestCasecountTestCases, createResult, getName, run, run, runBare, runTest, setName, toString

Methods inherited from class junit.framework.AssertassertEquals, 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.Objectclone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait

Constructor DetailStrutsTestCasepublic StrutsTestCase()

Method DetailsetUpprotected void setUp() throws Exception

Sets up the configuration settings, XWork configuration, and message resources Overrides: setUp in class XWorkTestCase Throws:Exception

initDispatcherprotected Dispatcher initDispatcher(Map params)

tearDownprotected void tearDown() throws Exception

Overrides: tearDown in class XWorkTestCase Throws:Exception org.apache.struts2

Class TestNGStrutsTestCasejava.lang.Object com.opensymphony.xwork2.TestNGXWorkTestCase org.apache.struts2.TestNGStrutsTestCase

public class TestNGStrutsTestCase extends TestNGXWorkTestCase

Base test class for TestNG unit tests. Provides common Struts variables and performs Struts setup and teardown processes

Field SummaryFields inherited from class com.opensymphony.xwork2.TestNGXWorkTestCaseactionProxyFactory, configuration, configurationManager, container

Constructor SummaryTestNGStrutsTestCase()

Method Summaryprotected initDispatcher(Map params) Dispatcher protected setUp() void protected tearDown() void

Methods inherited from class com.opensymphony.xwork2.TestNGXWorkTestCaseloadConfigurationProviders

Methods inherited from class java.lang.Objectclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Constructor DetailTestNGStrutsTestCasepublic TestNGStrutsTestCase()

Method Detail

setUpprotected void setUp() throws Exception

Overrides: setUp in class TestNGXWorkTestCase Throws:Exception

initDispatcherprotected Dispatcher initDispatcher(Map params)

tearDownprotected void tearDown() throws Exception

Overrides: tearDown in class TestNGXWorkTestCase Throws:Exception org.apache.struts2

Class StrutsExceptionjava.lang.Object java.lang.Throwable java.lang.Exception java.lang.RuntimeException com.opensymphony.xwork2.XWorkException org.apache.struts2.StrutsException

All Implemented Interfaces: Locatable, Serializablepublic class StrutsException extends XWorkException implements Locatable

A generic runtime exception that optionally contains Location information See Also: Serialized Form

Field Summaryprivate serialVersionUID static long

Constructor SummaryStrutsException() Constructs a StrutsException

with no detail message.

StrutsException(String s) Constructs a StrutsException

with the specified detail message. detail message and target. detail message and exception

StrutsException(String s, Object target) Constructs a StrutsException with the specified StrutsException(String s, Throwable cause) Constructs a StrutsException with the specified

cause.StrutsException(String s, Throwable cause, Object target) Constructs a StrutsException with the specified detail message,

cause, and

targetStrutsException(Throwable cause) Constructs a StrutsException with

the root cause target

StrutsException(Throwable cause, Object target) Constructs a StrutsException with the root cause and

Method SummaryMethods inherited from class com.opensymphony.xwork2.XWorkExceptiongetLocation, getThrowable, toString

Methods inherited from class java.lang.ThrowablefillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace

Methods inherited from class java.lang.Objectclone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait

Methods inherited from interface com.opensymphony.xwork2.util.location.LocatablegetLocation

Field DetailserialVersionUIDprivate static final long serialVersionUID

See Also: Constant Field Values

Constructor DetailStrutsExceptionpublic StrutsException() Constructs a StrutsException

with no detail message.

StrutsExceptionpublic StrutsException(String s) Constructs a StrutsException with

the specified detail message.

Parameters: s - the detail message.

StrutsExceptionpublic 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.

StrutsExceptionpublic StrutsException(Throwable cause) Constructs a StrutsException with the root cause

Parameters: cause - The wrapped exception

StrutsExceptionpublic 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

StrutsExceptionpublic 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

StrutsExceptionpublic StrutsException(String s,

Constructs target Parameters: s - the detail message. cause - The wrapped exception target - The target of the exception

Throwable cause, Object target) a StrutsException with the specified

detail message, cause, and

Package org.apache.struts2.components

Interface SummaryParam.UnnamedParametric RemoteUICallBean URL.ExtraParameterProvider Tags can implement this to support nested param tags without the name attribute.

Class SummaryAbstractRemoteCallUIBean TODO: Document AbstractRemoteCallUIBean. ActionComponent ActionError ActionMessage Render action errors if they exists the specific layout of the rendering depends on the theme itself. Render action messages if they exists, specific rendering layout depends on the theme itself. A tag that creates a HTML that when clicked calls a URL remote XMLHttpRequest call via the dojo framework. Anchor THE FOLLOWING IS ONLY VALID WHEN AJAX IS CONFIGURED href errorText listenTopics notifyTopics executeScripts loadingText listenTopics handler formId formFilter targets showErrorTransportText targets indicator 'resultDivId' Deprecated. The autocomplete tag is a combobox that can autocomplete text entered on the input box. Renders an HTML input element of type checkbox, populated by the specified property from the ValueStack.

AppendIterator Autocompleter Bean Checkbox

CheckboxList ClosingUIBean ComboBox Component Date DateTimePicker Debug Div DoubleListUIBean DoubleSelect Else ElseIf FieldError File Form FormButton GenericUIBean Head Hidden I18n If Include

Creates a series of checkboxes from a list. ClosingUIBean is the standard superclass for UI components such as div etc. The combo box is basically an HTML INPUT of type text and HTML SELECT grouped together to give you a combo box functionality. Base class to extend for UI components. Format Date object in different ways.

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. DoubleListUIBean is the standard superclass of all Struts double list handling components. Renders two HTML select elements with second one changing displayed values depending on selected entry of first one.

Render field errors if they exists. Renders an HTML file input element. Renders HTML an input form. The remote form allows the form to be submitted without the page being refreshed. FormButton. Renders an custom UI widget using the specified templates. Renders parts of the HEAD section for an HTML file. Renders an HTML input element of type hidden, populated by the specified property from the ValueStack. Gets a resource bundle and place it on the value stack.

Implementation of ServletOutputStream that stores all data Include.PageOutputStream written to it in a temporary buffer accessible from Include.PageOutputStream.getBuffer() . Include.PageResponse Simple wrapper to HTTPServletResponse that will allow getWriter() and getResponse() to be called as many times as needed without causing conflicts. Create a input transfer select component which is basically an text input and tag with buttons in the middle of them allowing text to be added to the transfer select. Renders an HTML LABEL that will allow you to output label:name combination that has the same format treatment as the rest of your UI controls. DoubleListUIBean is the standard superclass of all Struts list handling components. Create a optgroup component which needs to resides within a select tag. Create a option transfer select component which is basically two tag with buttons in the middle of them allowing options in each of the to be moved between themselves. Render an HTML input tag of type password. Used to get the property of a value, which will default to the top of the stack if none is specified. Render a radio button input field. Render a reset button. Render an HTML input tag of type select. Render a submit button. The tabbedpanel widget is primarily an AJAX component, where each tab can either be local content or remote content (refreshed each time the user selects that tab). Render a I18n text message.

InputTransferSelect IteratorComponent Label ListUIBean MergeIterator OptGroup

OptionTransferSelect Param Password Property Push Radio Reset Select Set Submit TabbedPanel Text

TextArea TextField Token

Render HTML textarea tag. Render an HTML input field of type text Stop double-submission of forms. Renders a tree widget with AJAX support.

Tree

The id attribute is normally specified, such that it could be looked up using javascript if necessary. 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 componentns. Create a Select component with buttons to move the elements in the select component up and down.

UIBean UpDownSelect URL

org.apache.struts2.components

Interface Param.UnnamedParametricAll Known Implementing Classes: AppendIterator, FieldError, MergeIterator, Text Enclosing class: Parampublic static interface Param.UnnamedParametric

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 Summaryvoid addParameter(Object value)

Adds the given value as a parameter to the outer tag.

Method Detail

addParametervoid addParameter(Object value)

Adds the given value as a parameter to the outer tag. Parameters: value - the valueorg.apache.struts2.components

Interface RemoteUICallBeanAll Known Implementing Classes: AbstractRemoteCallUIBean, Anchor, Div, Submitpublic interface RemoteUICallBean

Method Summaryvoid 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 DetailsetListenTopicsvoid setListenTopics(String topics)

setNotifyTopicsvoid setNotifyTopics(String topics)

setHrefvoid setHref(String href)

setErrorTextvoid setErrorText(String errorText)

setAfterLoadingvoid setAfterLoading(String afterLoading)

setBeforeLoadingvoid setBeforeLoading(String beforeLoading)

setExecuteScriptsvoid setExecuteScripts(String executeScripts)

setLoadingTextvoid setLoadingText(String loadingText)

setHandlervoid setHandler(String handler)

setFormFiltervoid setFormFilter(String formFilter)

setFormIdvoid setFormId(String formId)

setShowErrorTransportTextvoid setShowErrorTransportText(String showError)

setShowLoadingTextvoid setShowLoadingText(String showLoadingText)

setIndicatorvoid setIndicator(String indicator)

org.apache.struts2.components

Interface URL.ExtraParameterProviderEnclosing class: URLpublic static interface URL.ExtraParameterProvider

Method SummaryMap getExtraParameters()

Method DetailgetExtraParametersMap getExtraParameters() org.apache.struts2.components

Class AbstractRemoteCallUIBeanjava.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, Divpublic abstract class AbstractRemoteCallUIBean extends ClosingUIBean implements RemoteUICallBean

TODO: Document AbstractRemoteCallUIBean. Version: $Revision: 508280 $ $Date: 2007-02-15 21:07:56 -0500 (Thu, 15 Feb 2007) $ Author: $Author: musachy $

Field Summaryprotected 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.ClosingUIBeanopenTemplate

Fields inherited from class org.apache.struts2.components.UIBeanaccesskey, 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.ComponentactionMapper, COMPONENT_STACK, id, parameters, stack

Constructor Summary

AbstractRemoteCallUIBean(ValueStack stack, HttpServletRequest request, HttpServletResponse response)

Method Summaryvoid 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.ClosingUIBeangetDefaultOpenTemplate, setOpenTemplate, start

Methods inherited from class org.apache.struts2.components.UIBeanaddFormParameter, 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.ComponentaddAllParameters, 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.Objectclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Field Detailhrefprotected String href

errorTextprotected String errorText

afterLoadingprotected String afterLoading

beforeLoadingprotected String beforeLoading

executeScriptsprotected String executeScripts

loadingTextprotected String loadingText

listenTopicsprotected String listenTopics

handlerprotected String handler

formIdprotected String formId

formFilterprotected String formFilter

notifyTopicsprotected String notifyTopics

showErrorTransportTextprotected String showErrorTransportText

indicatorprotected String indicator

showLoadingTextprotected String showLoadingText

Constructor DetailAbstractRemoteCallUIBeanpublic AbstractRemoteCallUIBean(ValueStack stack, HttpServletRequest request, HttpServletResponse response)

Method DetailevaluateExtraParamspublic void evaluateExtraParams()

Overrides:evaluateExtraParams

in class UIBean

setListenTopicspublic void setListenTopics(String listenTopics)

Specified by:setListenTopics

in interface RemoteUICallBean

setHrefpublic void setHref(String href)

Specified by: setHref in interface RemoteUICallBean

setErrorTextpublic void setErrorText(String errorText)

Specified by:setErrorText

in interface RemoteUICallBean

setAfterLoadingpublic void setAfterLoading(String afterLoading)

Specified by:setAfterLoading

in interface RemoteUICallBean

setBeforeLoadingpublic void setBeforeLoading(String beforeLoading)

Specified by:setBeforeLoading

in interface RemoteUICallBean

setExecuteScriptspublic void setExecuteScripts(String executeScripts)

Specified by:setExecuteScripts

in interface RemoteUICallBean

setLoadingTextpublic void setLoadingText(String loadingText)

Specified by:setLoadingText

in interface RemoteUICallBean

setHandlerpublic void setHandler(String handler)

Specified by: setHandler in interface RemoteUICallBean

setFormFilterpublic void setFormFilter(String formFilter)

Specified by:setFormFilter

in interface RemoteUICallBean

setFormIdpublic void setFormId(String formId)

Specified by: setFormId in interface RemoteUICallBean

setNotifyTopicspublic void setNotifyTopics(String notifyTopics)

Specified by:setNotifyTopics

in interface RemoteUICallBean

setShowErrorTransportTextpublic void setShowErrorTransportText(String showError)

Specified by:setShowErrorTransportText

in interface RemoteUICallBean

org.apache.struts2.components

Class ActionComponentjava.lang.Object org.apache.struts2.components.Component org.apache.struts2.components.ActionComponent public class ActionComponent extends Component

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

public class ActionTagAction extends ActionSupport { public String execute() throws Exception { return "done"; } public String doDefault() throws Exception { ServletActionContext.getRequest().setAttribute("stringByAction", "This is a String put in by the action's doDefault()"); return "done"; } }

....

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 Summaryprotected actionProxyFactory ActionProxyFactory protected protected protected boolean executeResult boolean flush boolean ignoreContextParams

private static Log LOG protected String name

protected

String namespace

protected proxy ActionProxy protected req HttpServletRequest protected res HttpServletResponse

Fields inherited from class org.apache.struts2.components.ComponentactionMapper, COMPONENT_STACK, id, parameters, stack

Constructor SummaryActionComponent(ValueStack stack, HttpServletRequest req, HttpServletResponse res)

Method Summaryprivate Map createExtraContext() boolean end(Writer writer, String body)

Callback for the end tag of this component.private executeAction() void Execute the requested ActionProxy getProxy() void setActionProxyFactory(ActionProxyFactory actionProxyFactory) void setExecuteResult(boolean executeResult) void setFlush(boolean flush) void setIgnoreContextParams(boolean ignoreContextParams) void setName(String name) void setNamespace(String namespace)

action.

Methods inherited from class org.apache.struts2.components.ComponentaddAllParameters, 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.Objectclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Field DetailLOGprivate static final Log LOG

resprotected HttpServletResponse res

reqprotected HttpServletRequest req

actionProxyFactoryprotected ActionProxyFactory actionProxyFactory

proxyprotected ActionProxy proxy

nameprotected String name

namespaceprotected String namespace

executeResultprotected boolean executeResult

ignoreContextParamsprotected boolean ignoreContextParams

flushprotected boolean flush

Constructor DetailActionComponentpublic ActionComponent(ValueStack stack, HttpServletRequest req, HttpServletResponse res)

Method DetailsetActionProxyFactorypublic void setActionProxyFactory(ActionProxyFactory actionProxyFactory)

Parameters:actionProxyFactory

- the actionProxyFactory to set

endpublic 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? NOTE: will pop component stack. Overrides: end in class Component Parameters: writer - the output writer. body - the rendered body. Returns: true if the body should be evaluated again

createExtraContextprivate Map createExtraContext()

getProxypublic ActionProxy getProxy()

executeActionprivate 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.Acti onMapper, com.opensymphony.xwork2.util.ValueStack, javax.servlet.http.HttpServletRequest)

setNamepublic void setName(String name)

setNamespacepublic void setNamespace(String namespace)

setExecuteResultpublic void setExecuteResult(boolean executeResult)

setIgnoreContextParamspublic void setIgnoreContextParams(boolean ignoreContextParams)

setFlushpublic void setFlush(boolean flush)

setIndicatorpublic void setIndicator(String indicator)

Specified by:setIndicator

in interface RemoteUICallBean

setShowLoadingTextpublic void setShowLoadingText(String showLoadingText)

Specified by:setShowLoadingText

in interface RemoteUICallBean

org.apache.struts2.components

Class ActionErrorjava.lang.Object org.apache.struts2.components.Component org.apache.struts2.components.UIBean org.apache.struts2.components.ActionError public class ActionError extends UIBean

Render action errors if they exists the specific layout of the rendering depends on the theme itself. Examples

> ....

Field Summarystatic String TEMPLATE

Fields inherited from class org.apache.struts2.components.UIBeanaccesskey, 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.ComponentactionMapper, COMPONENT_STACK, id, parameters, stack

Constructor SummaryActionError(ValueStack stack, HttpServletRequest request, HttpServletResponse response)

Method Summaryprotected 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.UIBeanaddFormParameter, 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.ComponentaddAllParameters, 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.Objectclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Field DetailTEMPLATEpublic static final String TEMPLATE

See Also: Constant Field Values

Constructor DetailActionErrorpublic ActionError(ValueStack stack, HttpServletRequest request, HttpServletResponse response)

Method DetailgetDefaultTemplateprotected 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 ActionMessagejava.lang.Object org.apache.struts2.components.Component org.apache.struts2.components.UIBean

org.apache.struts2.components.ActionMessage public class ActionMessage extends UIBean

Render action messages if they exists, specific rendering layout depends on the theme itself. Examples ....

Field Summaryprivate TEMPLATE static String

Fields inherited from class org.apache.struts2.components.UIBeanaccesskey, 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.ComponentactionMapper, COMPONENT_STACK, id, parameters, stack

Constructor SummaryActionMessage(ValueStack stack, HttpServletRequest request, HttpServletResponse response)

Method Summaryprotected 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.UIBeanaddFormParameter, 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.ComponentaddAllParameters, 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.Objectclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Field DetailTEMPLATEprivate static final String TEMPLATE

See Also: Constant Field Values

Constructor DetailActionMessagepublic ActionMessage(ValueStack stack, HttpServletRequest request, HttpServletResponse response)

Method DetailgetDefaultTemplateprotected 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 Anchorjava.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: RemoteUICallBeanpublic class Anchor extends AbstractRemoteCallUIBean

A tag that creates a HTML that when clicked calls a URL remote XMLHttpRequest call via the dojo framework. THE FOLLOWING IS ONLY VALID WHEN AJAX IS CONFIGURED

href errorText listenTopics notifyTopics executeScripts loadingText listenTopics handler formId formFilter targets showErrorTransportText targets indicator

'resultDivId' Deprecated. Use targets. '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. 'onLoadJS' Deprecated. Use 'notifyTopics'. 'preInvokeJS' Deprecated. Use 'notifyTopics'. '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') 'showLoadingText' show loading text on targets 'notifyTopics' comma separated list of topics names, that will be published. Three parameters are passed:

data: html or json object when type='load' or type='error' type: 'before' before the request is made, 'load' when the request succeeds, or 'error' when it fails request: request javascript object, when type='load' or type='error'

Examples

Results in

Here is an example that uses the beforeLoading. This example is in altSyntax=true: A

Field Summarystatic String COMPONENT_NAME static String OPEN_TEMPLATE protected targets String static String TEMPLATE

Fields inherited from class org.apache.struts2.components.AbstractRemoteCallUIBeanafterLoading, beforeLoading, errorText, executeScripts, formFilter, formId, handler, href, indicator, listenTopics, loadingText, notifyTopics, showErrorTransportText, showLoadingText

Fields inherited from class org.apache.struts2.components.ClosingUIBeanopenTemplate

Fields inherited from class org.apache.struts2.components.UIBeanaccesskey, 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.ComponentactionMapper, COMPONENT_STACK, id, parameters, stack

Constructor Summary

Anchor(ValueStack stack, HttpServletRequest request, HttpServletResponse response)

Method Summaryvoid 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.AbstractRemoteCallUIBeansetErrorText, setExecuteScripts, setFormFilter, setFormId, setHandler, setHref, setIndicator, setListenTopics, setLoadingText, setNotifyTopics, setShowErrorTransportText, setShowLoadingText

Methods inherited from class org.apache.struts2.components.ClosingUIBeansetOpenTemplate, start

Methods inherited from class org.apache.struts2.components.UIBeanaddFormParameter, 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.ComponentaddAllParameters, 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.Objectclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Field DetailOPEN_TEMPLATEpublic static final String OPEN_TEMPLATE

See Also: Constant Field Values

TEMPLATEpublic static final String TEMPLATE

See Also: Constant Field Values

COMPONENT_NAMEpublic static final String COMPONENT_NAME

targetsprotected String targets

Constructor DetailAnchorpublic Anchor(ValueStack stack, HttpServletRequest request, HttpServletResponse response)

Method DetailgetDefaultOpenTemplatepublic String getDefaultOpenTemplate()

Specified by:getDefaultOpenTemplate

in class ClosingUIBean

getDefaultTemplateprotected 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.

evaluateExtraParamspublic void evaluateExtraParams()

Overrides:evaluateExtraParams

in class AbstractRemoteCallUIBean

setTargetspublic void setTargets(String targets)

setAfterLoadingpublic void setAfterLoading(String afterLoading)

Specified by:setAfterLoading

in interface RemoteUICallBean in class AbstractRemoteCallUIBean

Overrides:setAfterLoading

setBeforeLoadingpublic void setBeforeLoading(String beforeLoading)

Specified by:setBeforeLoading

in interface RemoteUICallBean in class AbstractRemoteCallUIBean

Overrides:setBeforeLoading org.apache.struts2.components

Class AppendIteratorjava.lang.Object org.apache.struts2.components.Component org.apache.struts2.components.AppendIterator

All Implemented Interfaces: Param.UnnamedParametricpublic class AppendIterator extends Component implements Param.UnnamedParametric

Component for AppendIteratorTag, which jobs is to append iterators to form an appended iterator whereby entries goes from one iterator to another after each respective iterator is exhausted of entries. For example, if there are 3 iterator appended (each iterator has 3 entries), the following will be how the appended iterator entries will be arranged: 1. 2. 3. 4. 5. 6. 7. 8. 9.

First Entry of the First Iterator Second Entry of the First Iterator Third Entry of the First Iterator First Entry of the Second Iterator Second Entry of the Second Iterator Third Entry of the Second Iterator First Entry of the Third Iterator Second Entry of the Third Iterator Third Entry of the Third ITerator id (String) - the id of which if supplied will have the resultant appended iterator stored under in the stack's context

public class AppendIteratorTagAction extends ActionSupport { private List myList1; private List myList2; private List myList3; public String execute() throws Exception { myList1 = new ArrayList(); myList1.add("1"); myList1.add("2"); myList1.add("3"); myList2 = new ArrayList(); myList2.add("a"); myList2.add("b"); myList2.add("c"); myList3 = new ArrayList(); myList3.add("A"); myList3.add("B"); myList3.add("C"); return "done"; } public List getMyList1() { return myList1; } public List getMyList2() { return myList2; } public List getMyList3() { return myList3; } } See Also: AppendIteratorFilter, AppendIteratorTag

Field Summaryprivate static Log _log private List _parameters

private appendIteratorFilter AppendIteratorFilter

Fields inherited from class org.apache.struts2.components.ComponentactionMapper, COMPONENT_STACK, id, parameters, stack

Constructor SummaryAppendIterator(ValueStack stack)

Method Summaryvoid 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.ComponentaddAllParameters, 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.Objectclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Field Detail_logprivate static final Log _log

appendIteratorFilterprivate AppendIteratorFilter appendIteratorFilter

_parametersprivate List _parameters

Constructor DetailAppendIteratorpublic AppendIterator(ValueStack stack)

Method Detailstartpublic 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

endpublic 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? NOTE: will pop component stack. Overrides: end in class Component Parameters: writer - the output writer. body - the rendered body. Returns: true if the body should be evaluated again

addParameterpublic 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

setIdpublic void setId(String id)

Overrides: setId in class Component

org.apache.struts2.components

Class Autocompleterjava.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 public class Autocompleter extends ComboBox

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"]

]

THE FOLLOWING IS ONLY VALID WHEN AJAX IS CONFIGURED

href errorText listenTopics notifyTopics listenTopics formId formFilter indicator loadOnTextChange loadMinimumCount showDownArrow searchType

'dropdownWidth' width in pixels of the drodpdown, same as autocompleter's width by default 'dropdownHeight' height in pixels of the drodown, 120 px by default 'forceValidOption' if invalid option is selected, clear autocompleter's text when focus is lost 'autoComplete', if true, make suggestions on the textbox

'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') 'loadOnTextChange' options will be reloaded everytime a character is typed on the textbox 'loadMinimumCount' minimum number of characters that will force the content to be loaded '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:

data: selected value when type='valuechanged' type: 'before' before the request is made, 'valuechanged' when selection changes, 'load' when the request succeeds, or 'error' when it fails request: request javascript object, when type='load' or type='error'

Field Summaryprotected 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.ComboBoxemptyOption, headerKey, headerValue, list, listKey, listValue

Fields inherited from class org.apache.struts2.components.TextFieldmaxlength, readonly, size

Fields inherited from class org.apache.struts2.components.UIBeanaccesskey, 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.ComponentactionMapper, COMPONENT_STACK, id, parameters, stack

Constructor SummaryAutocompleter(ValueStack stack, HttpServletRequest request, HttpServletResponse response)

Method Summaryvoid evaluateExtraParams() protected findListValue() Object String getComponentName() protected getDefaultTemplate() String A contract that requires

each 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.ComboBoxsetEmptyOption, setHeaderKey, setHeaderValue, setListKey, setListValue

Methods inherited from class org.apache.struts2.components.TextFieldsetMaxlength, setMaxLength, setReadonly, setSize

Methods inherited from class org.apache.struts2.components.UIBeanaddFormParameter, 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.ComponentaddAllParameters, 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.Objectclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Field DetailTEMPLATEpublic static final String TEMPLATE

See Also: Constant Field Values

COMPONENT_NAMEprivate static final String COMPONENT_NAME

forceValidOptionprotected String forceValidOption

searchTypeprotected String searchType

autoCompleteprotected String autoComplete

delayprotected String delay

disabledprotected String disabled

hrefprotected String href

dropdownWidthprotected String dropdownWidth

dropdownHeightprotected String dropdownHeight

formIdprotected String formId

formFilterprotected String formFilter

listenTopicsprotected String listenTopics

notifyTopicsprotected String notifyTopics

indicatorprotected String indicator

loadOnTextChangeprotected String loadOnTextChange

loadMinimumCountprotected String loadMinimumCount

showDownArrowprotected String showDownArrow

templateCssPathprotected String templateCssPath

iconPathprotected String iconPath

keyNameprotected String keyName

Constructor Detail

Autocompleterpublic Autocompleter(ValueStack stack, HttpServletRequest request, HttpServletResponse response)

Method DetailgetDefaultTemplateprotected 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.

getComponentNamepublic String getComponentName()

evaluateExtraParamspublic void evaluateExtraParams()

Overrides:evaluateExtraParams

in class ComboBox

findListValueprotected Object findListValue()

Overrides:findListValue

in class ComboBox

setAutoCompletepublic void setAutoComplete(String autoComplete)

setDisabledpublic void setDisabled(String disabled)

Overrides:setDisabled

in class UIBean

setForceValidOptionpublic void setForceValidOption(String forceValidOption)

setHrefpublic void setHref(String href)

setDelaypublic void setDelay(String searchDelay)

setSearchTypepublic void setSearchType(String searchType)

setDropdownHeightpublic void setDropdownHeight(String height)

setDropdownWidthpublic void setDropdownWidth(String width)

setFormFilterpublic void setFormFilter(String formFilter)

setFormIdpublic void setFormId(String formId)

setListenTopicspublic void setListenTopics(String listenTopics)

setNotifyTopicspublic void setNotifyTopics(String onValueChangedPublishTopic)

setIndicatorpublic void setIndicator(String indicator)

setLoadMinimumCountpublic void setLoadMinimumCount(String loadMinimumCount)

setLoadOnTextChangepublic void setLoadOnTextChange(String loadOnType)

setShowDownArrowpublic void setShowDownArrow(String showDownArrow)

setListpublic void setList(String list)

Overrides: setList in class ComboBox

setTemplateCssPathpublic void setTemplateCssPath(String templateCssPath)

setIconPathpublic void setIconPath(String iconPath)

setKeyNamepublic void setKeyName(String keyName) org.apache.struts2.components

Class Beanjava.lang.Object org.apache.struts2.components.Component org.apache.struts2.components.Bean public class Bean extends Component

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 name="org.apache.struts2.example.counter.SimpleCounter" id="counter"] [s:param name="foo" value="BAR"/] The value of foo is : [s:property value="foo"/], when inside the bean tag. [/s:bean] The value of foot is : , when inside the bean tag

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: [s:property value="#counter.foo"/]

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 Summaryprotected bean Object protected log static Log protected name String protected objectFactory ObjectFactory

Fields inherited from class org.apache.struts2.components.ComponentactionMapper, COMPONENT_STACK, id, parameters, stack

Constructor SummaryBean(ValueStack stack)

Method Summaryvoid 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.ComponentaddAllParameters, 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.Objectclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Field Detaillogprotected static Log log

beanprotected Object bean

nameprotected String name

objectFactoryprotected ObjectFactory objectFactory

Constructor DetailBeanpublic Bean(ValueStack stack)

Method DetailsetObjectFactorypublic void setObjectFactory(ObjectFactory objectFactory)

startpublic 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

endpublic 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? NOTE: will pop component stack. Overrides: end in class Component Parameters: writer - the output writer. body - the rendered body. Returns: true if the body should be evaluated again

addParameterpublic 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: in class Component Parameters: key - the key of the new parameter to add. value - the value assoicated with the key.addParameter

setNamepublic void setName(String name) org.apache.struts2.components

Class Checkboxjava.lang.Object

org.apache.struts2.components.Component org.apache.struts2.components.UIBean org.apache.struts2.components.Checkbox public class Checkbox extends UIBean

Renders an HTML input element of type checkbox, populated by the specified property from the ValueStack. ExamplesJSP: Velocity: #tag( Checkbox "label=checkbox test" "name=checkboxField1" "value=aBoolean" ) Resulting HTML (simple template, aBoolean == true):

Field Summaryprotected fieldValue String static String TEMPLATE

Fields inherited from class org.apache.struts2.components.UIBeanaccesskey, 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.ComponentactionMapper, COMPONENT_STACK, id, parameters, stack

Constructor Summary

Checkbox(ValueStack stack, HttpServletRequest request, HttpServletResponse response)

Method Summaryprotected evaluateExtraParams() void protected getDefaultTemplate() String A contract that requires

each 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.UIBeanaddFormParameter, 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.ComponentaddAllParameters, 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.Objectclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Field Detail

TEMPLATEpublic static final String TEMPLATE

See Also: Constant Field Values

fieldValueprotected String fieldValue

Constructor DetailCheckboxpublic Checkbox(ValueStack stack, HttpServletRequest request, HttpServletResponse response)

Method DetailgetDefaultTemplateprotected 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.

evaluateExtraParamsprotected void evaluateExtraParams()

Overrides:evaluateExtraParams

in class UIBean

getValueClassTypeprotected Class getValueClassType()

Overrides:getValueClassType

in class UIBean

setFieldValuepublic void setFieldValue(String fieldValue) org.apache.struts2.components

Class CheckboxListjava.lang.Object org.apache.struts2.components.Component

org.apache.struts2.components.UIBean org.apache.struts2.components.ListUIBean org.apache.struts2.components.CheckboxList public class CheckboxList extends ListUIBean

Creates a series of checkboxes from a list. Setup is like or , but creates checkbox tags. Examples

Field Summarystatic String TEMPLATE

Fields inherited from class org.apache.struts2.components.ListUIBeanlist, listKey, listValue, throwExceptionOnNullValueAttribute

Fields inherited from class org.apache.struts2.components.UIBeanaccesskey, 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.ComponentactionMapper, COMPONENT_STACK, id, parameters, stack

Constructor SummaryCheckboxList(ValueStack stack, HttpServletRequest request, HttpServletResponse response)

Method Summaryprotected 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.ListUIBeancontains, evaluateExtraParams, getValueClassType, setList, setListKey, setListValue, setThrowExceptionOnNullValueAttribute

Methods inherited from class org.apache.struts2.components.UIBeanaddFormParameter, 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.ComponentaddAllParameters, 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.Objectclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Field DetailTEMPLATEpublic static final String TEMPLATE

See Also: Constant Field Values

Constructor DetailCheckboxListpublic CheckboxList(ValueStack stack, HttpServletRequest request,

HttpServletResponse response)

Method DetailgetDefaultTemplateprotected String getDefaultTemplate()