📄 javascriptvalidatortag.html
字号:
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD><CODE>getParent, setPageContext, setParent</CODE></TD>
</TR>
</TABLE>
<P>
<!-- ============ FIELD DETAIL =========== -->
<A NAME="field_detail"><!-- --></A><TABLE BORDER="1" CELLPADDING="3" CELLSPACING="0" WIDTH="100%">
<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
<TD COLSPAN=1><FONT SIZE="+2">
<B>Field Detail</B></FONT></TD>
</TR>
</TABLE>
<A NAME="actionComparator"><!-- --></A><H3>
actionComparator</H3>
<PRE>
private static final java.util.Comparator <B>actionComparator</B></PRE>
<DL>
<DD>A Comparator to use when sorting ValidatorAction objects.</DL>
<HR>
<A NAME="HTML_BEGIN_COMMENT"><!-- --></A><H3>
HTML_BEGIN_COMMENT</H3>
<PRE>
protected static final java.lang.String <B>HTML_BEGIN_COMMENT</B></PRE>
<DL>
<DD>The start of the HTML comment hiding JavaScript from old browsers.<DD><DL>
<DT><B>Since: </B><DD>Struts 1.2</DD>
</DL>
</DD>
</DL>
<HR>
<A NAME="HTML_END_COMMENT"><!-- --></A><H3>
HTML_END_COMMENT</H3>
<PRE>
protected static final java.lang.String <B>HTML_END_COMMENT</B></PRE>
<DL>
<DD>The end of the HTML comment hiding JavaScript from old browsers.<DD><DL>
<DT><B>Since: </B><DD>Struts 1.2</DD>
</DL>
</DD>
</DL>
<HR>
<A NAME="bundle"><!-- --></A><H3>
bundle</H3>
<PRE>
protected java.lang.String <B>bundle</B></PRE>
<DL>
<DD>The servlet context attribute key for our resources.</DL>
<HR>
<A NAME="defaultLocale"><!-- --></A><H3>
defaultLocale</H3>
<PRE>
protected static java.util.Locale <B>defaultLocale</B></PRE>
<DL>
<DD><B>Deprecated.</B> <I>This variable is no longer used.</I>
<P>
<DD>The default locale on our server.</DL>
<HR>
<A NAME="formName"><!-- --></A><H3>
formName</H3>
<PRE>
protected java.lang.String <B>formName</B></PRE>
<DL>
<DD>The name of the form that corresponds with the action name in struts-config.xml. Specifying a form name places a <script> </script> around the javascript.</DL>
<HR>
<A NAME="jsFormName"><!-- --></A><H3>
jsFormName</H3>
<PRE>
protected java.lang.String <B>jsFormName</B></PRE>
<DL>
<DD>formName is used for both Javascript and non-javascript validations. For the javascript validations, there is the possibility that we will be rewriting the formName (if it is a ValidatorActionForm instead of just a ValidatorForm) so we need another variable to hold the formName just for javascript usage.</DL>
<HR>
<A NAME="lineEnd"><!-- --></A><H3>
lineEnd</H3>
<PRE>
protected static java.lang.String <B>lineEnd</B></PRE>
<DL>
<DD>The line ending string.</DL>
<HR>
<A NAME="page"><!-- --></A><H3>
page</H3>
<PRE>
protected int <B>page</B></PRE>
<DL>
<DD>The current page number of a multi-part form. Only valid when the formName attribute is set.</DL>
<HR>
<A NAME="methodName"><!-- --></A><H3>
methodName</H3>
<PRE>
protected java.lang.String <B>methodName</B></PRE>
<DL>
<DD>This will be used as is for the JavaScript validation method name if it has a value. This is the method name of the main JavaScript method that the form calls to perform validations.</DL>
<HR>
<A NAME="scriptLanguage"><!-- --></A><H3>
scriptLanguage</H3>
<PRE>
protected boolean <B>scriptLanguage</B></PRE>
<DL>
<DD>Include language attribute in the <script> element. This property is ignored in XHTML mode.<DD><DL>
<DT><B>Since: </B><DD>Struts 1.2</DD>
</DL>
</DD>
</DL>
<HR>
<A NAME="staticJavascript"><!-- --></A><H3>
staticJavascript</H3>
<PRE>
protected java.lang.String <B>staticJavascript</B></PRE>
<DL>
<DD>The static JavaScript methods will only be printed if this is set to "true".</DL>
<HR>
<A NAME="dynamicJavascript"><!-- --></A><H3>
dynamicJavascript</H3>
<PRE>
protected java.lang.String <B>dynamicJavascript</B></PRE>
<DL>
<DD>The dynamic JavaScript objects will only be generated if this is set to "true".</DL>
<HR>
<A NAME="src"><!-- --></A><H3>
src</H3>
<PRE>
protected java.lang.String <B>src</B></PRE>
<DL>
<DD>The src attribute for html script element (used to include an external script resource). The src attribute is only recognized when the formName attribute is specified.</DL>
<HR>
<A NAME="htmlComment"><!-- --></A><H3>
htmlComment</H3>
<PRE>
protected java.lang.String <B>htmlComment</B></PRE>
<DL>
<DD>The JavaScript methods will enclosed with html comments if this is set to "true".</DL>
<HR>
<A NAME="cdata"><!-- --></A><H3>
cdata</H3>
<PRE>
protected java.lang.String <B>cdata</B></PRE>
<DL>
<DD>Hide JavaScript methods in a CDATA section for XHTML when "true".</DL>
<!-- ========= CONSTRUCTOR DETAIL ======== -->
<A NAME="constructor_detail"><!-- --></A><TABLE BORDER="1" CELLPADDING="3" CELLSPACING="0" WIDTH="100%">
<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
<TD COLSPAN=1><FONT SIZE="+2">
<B>Constructor Detail</B></FONT></TD>
</TR>
</TABLE>
<A NAME="JavascriptValidatorTag()"><!-- --></A><H3>
JavascriptValidatorTag</H3>
<PRE>
public <B>JavascriptValidatorTag</B>()</PRE>
<DL>
</DL>
<!-- ============ METHOD DETAIL ========== -->
<A NAME="method_detail"><!-- --></A><TABLE BORDER="1" CELLPADDING="3" CELLSPACING="0" WIDTH="100%">
<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
<TD COLSPAN=1><FONT SIZE="+2">
<B>Method Detail</B></FONT></TD>
</TR>
</TABLE>
<A NAME="getFormName()"><!-- --></A><H3>
getFormName</H3>
<PRE>
public java.lang.String <B>getFormName</B>()</PRE>
<DL>
<DD>Gets the key (form name) that will be used to retrieve a set of validation rules to be performed on the bean passed in for validation.</DL>
<HR>
<A NAME="setFormName(java.lang.String)"><!-- --></A><H3>
setFormName</H3>
<PRE>
public void <B>setFormName</B>(java.lang.String formName)</PRE>
<DL>
<DD>Sets the key (form name) that will be used to retrieve a set of validation rules to be performed on the bean passed in for validation. Specifying a form name places a <script> </script> tag around the javascript.</DL>
<HR>
<A NAME="getJsFormName()"><!-- --></A><H3>
getJsFormName</H3>
<PRE>
public java.lang.String <B>getJsFormName</B>()</PRE>
<DL>
<DD><DL>
<DT><B>Returns:</B><DD>Returns the jsFormName.</DL>
</DD>
</DL>
<HR>
<A NAME="setJsFormName(java.lang.String)"><!-- --></A><H3>
setJsFormName</H3>
<PRE>
public void <B>setJsFormName</B>(java.lang.String jsFormName)</PRE>
<DL>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>jsFormName</CODE> - The jsFormName to set.</DL>
</DD>
</DL>
<HR>
<A NAME="getPage()"><!-- --></A><H3>
getPage</H3>
<PRE>
public int <B>getPage</B>()</PRE>
<DL>
<DD>Gets the current page number of a multi-part form. Only field validations with a matching page numer will be generated that match the current page number. Only valid when the formName attribute is set.</DL>
<HR>
<A NAME="setPage(int)"><!-- --></A><H3>
setPage</H3>
<PRE>
public void <B>setPage</B>(int page)</PRE>
<DL>
<DD>Sets the current page number of a multi-part form. Only field validations with a matching page numer will be generated that match the current page number. Only valid when the formName attribute is set.</DL>
<HR>
<A NAME="getMethod()"><!-- --></A><H3>
getMethod</H3>
<PRE>
public java.lang.String <B>getMethod</B>()</PRE>
<DL>
<DD>Gets the method name that will be used for the Javascript validation method name if it has a value. This overrides the auto-generated method name based on the key (form name) passed in.</DL>
<HR>
<A NAME="setMethod(java.lang.String)"><!-- --></A><H3>
setMethod</H3>
<PRE>
public void <B>setMethod</B>(java.lang.String methodName)</PRE>
<DL>
<DD>Sets the method name that will be used for the Javascript validation method name if it has a value. This overrides the auto-generated method name based on the key (form name) passed in.</DL>
<HR>
<A NAME="getStaticJavascript()"><!-- --></A><H3>
getStaticJavascript</H3>
<PRE>
public java.lang.String <B>getStaticJavascript</B>()</PRE>
<DL>
<DD>Gets whether or not to generate the static JavaScript. If this is set to 'true', which is the default, the static JavaScript will be generated.</DL>
<HR>
<A NAME="setStaticJavascript(java.lang.String)"><!-- --></A><H3>
setStaticJavascript</H3>
<PRE>
public void <B>setStaticJavascript</B>(java.lang.String staticJavascript)</PRE>
<DL>
<DD>Sets whether or not to generate the static JavaScript. If this is set to 'true', which is the default, the static JavaScript will be generated.</DL>
<HR>
<A NAME="getDynamicJavascript()"><!-- --></A><H3>
getDynamicJavascript</H3>
<PRE>
public java.lang.String <B>getDynamicJavascript</B>()</PRE>
<DL>
<DD>Gets whether or not to generate the dynamic JavaScript. If this is set to 'true', which is the default, the dynamic JavaScript will be generated.</DL>
<HR>
<A NAME="setDynamicJavascript(java.lang.String)"><!-- --></A><H3>
setDynamicJavascript</H3>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -