|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectjp.terasoluna.fw.web.struts.plugins.ResetterPlugIn
public class ResetterPlugIn
Plugin that loads the reset settings of form. At the time of initializing the servlet, PlugIn function loads the settings of form reset function and stores it in the servlet.
Configuration information of form reset definition file (reset.xml) is stored in servlet context
as the instance of ResetterResources
.
At the time of execution, any
Resetter
implementation is called from FormEx
#reset()
method and reset process is performed according to the configuration information which is stored in
ResetterResources
.
Class that delegates the reset process is any class in which
Resetter
is implemented.
<plug-in className="jp.terasoluna.fw.web.struts.plugins.ResetterPlugIn">
<set-property
property="resetter"
value="jp.terasoluna.fw.web.struts.reset.ResetterImpl"/>
<set-property
property="resources"
value="/WEB-INF/reset.xml"/>
<set-property
property="digesterRules"
value="/WEB-INF/reset-rules.xml"/>
</plug-in>
Resetter
)
<reset>
<action path="/resetAction">
<property-reset name="field1" />
<property-reset name="field2" select="true" />
</action>
...
</reset>
To change the public identifier and DTD URL,
override getPublicIdentifier() and getDtdUrl().
ActionReset
,
FieldReset
,
Resetter
,
ResetterResources
,
FormEx
,
DynaValidatorActionFormEx
,
ValidatorActionFormEx
Field Summary | |
---|---|
private static java.lang.String |
DEFAULT_RESETTER
Fully-qualified class name of default resetter class |
private static org.apache.commons.digester.Digester |
digester
For the information related to the form reset rule definition file (reset-rules.xml), refer to Digester instance which is already set. |
private static java.lang.String |
DIGESTER_RULES_PATH
This is the path of default form reset definition file (reset.xml). |
private java.lang.String |
digesterRules
This is the path of form reset rule definition file (reset-rules.xml). |
private java.lang.String |
dtdUrl
DTD path. |
private static org.apache.commons.logging.Log |
log
Log class. |
private java.lang.String |
publicIdentifier
DTD public identifier. |
private java.lang.String |
resetter
Fully-qualified class name of resetter class. |
private java.lang.String |
resourcesPath
Path of form reset definition file(reset.xml). |
Constructor Summary | |
---|---|
ResetterPlugIn()
|
Method Summary | |
---|---|
void |
destroy()
Process at the time of termination. |
java.lang.String |
getDtdUrl()
Returns DTD URL. To change DTD URL, override this method. |
java.lang.String |
getPublicIdentifier()
Returns public identifier. To change the public identifier, override this method. |
void |
init(org.apache.struts.action.ActionServlet servlet,
org.apache.struts.config.ModuleConfig config)
Process at the time of initialization. |
protected void |
initResetter(org.apache.struts.action.ActionServlet servlet,
org.apache.struts.config.ModuleConfig config)
Initialization process of reset process class. Fetches the reset process class which is set in Struts configuration file (struts-config.xml). When it is not set, fetches the default reset process class. |
protected void |
initResources(org.apache.struts.action.ActionServlet servlet,
org.apache.struts.config.ModuleConfig config)
Reset initialization process. Uses form reset definition file (reset.xml) and form reset rule definition file (reset-rules.xml) and loads the configuration information to ResetterResources | .
void |
setDigesterRules(java.lang.String digesterRules)
Sets form reset rule definition file (reset-rules.xml). |
void |
setDtdUrl(java.lang.String dtdUrl)
Sets DTD URL. |
void |
setPublicIdentifier(java.lang.String publicIdentifier)
Sets public identifier. |
void |
setResetter(java.lang.String string)
Sets fully-qualified name of resetter which is set in Struts configuration file (struts-config.xml). |
void |
setResources(java.lang.String string)
Sets path name of form reset definition file (reset.xml). |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
private static org.apache.commons.logging.Log log
private static final java.lang.String DIGESTER_RULES_PATH
private static org.apache.commons.digester.Digester digester
private static final java.lang.String DEFAULT_RESETTER
private java.lang.String publicIdentifier
private java.lang.String dtdUrl
private java.lang.String resetter
private java.lang.String resourcesPath
private java.lang.String digesterRules
Constructor Detail |
---|
public ResetterPlugIn()
Method Detail |
---|
public void destroy()
destroy
in interface org.apache.struts.action.PlugIn
public void init(org.apache.struts.action.ActionServlet servlet, org.apache.struts.config.ModuleConfig config) throws javax.servlet.ServletException
init
in interface org.apache.struts.action.PlugIn
servlet
- ActionServlet that has invoked this PlugIn.config
- ModuleConfig of this PlugIn.
javax.servlet.ServletException
- Exception that wraps the another exception which is generated at the time of initialization.protected void initResetter(org.apache.struts.action.ActionServlet servlet, org.apache.struts.config.ModuleConfig config) throws javax.servlet.ServletException
servlet
- Servlet which invoked this plugin. config
-Module configuration
javax.servlet.ServletException
- Exception that occurs during the initialization process of reset process class.protected void initResources(org.apache.struts.action.ActionServlet servlet, org.apache.struts.config.ModuleConfig config) throws javax.servlet.ServletException
ResetterResources
.
servlet
- Servlet which invoked this plugin. config
- Module configuration
javax.servlet.ServletException
- Exception which occurs when resource file is not foundpublic java.lang.String getPublicIdentifier()
public java.lang.String getDtdUrl()
public void setResetter(java.lang.String string)
string
- Fully-qualified name of resetterpublic void setResources(java.lang.String string)
string
- Path name of form reset definition file (reset.xml)public void setDigesterRules(java.lang.String digesterRules)
digesterRules
- Path name of form reset rule definition file (reset-rules.xml)
public void setPublicIdentifier(java.lang.String publicIdentifier)
publicIdentifier
- Public identifierpublic void setDtdUrl(java.lang.String dtdUrl)
dtdUrl
- DTD URL
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |