📄 selectorbox.html
字号:
<A NAME="methods_inherited_from_class_java.lang.Object"><!-- --></A><TABLE BORDER="1" CELLPADDING="3" CELLSPACING="0" WIDTH="100%"><TR BGCOLOR="#EEEEFF" CLASS="TableSubHeadingColor"><TD><B>Methods inherited from class java.lang.Object</B></TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD><CODE>clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait</CODE></TD></TR></TABLE> <P><!-- ============ FIELD DETAIL =========== --><!-- ========= 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="SelectorBox(java.lang.String, java.lang.Object[], java.lang.Object[])"><!-- --></A><H3>SelectorBox</H3><PRE>public <B>SelectorBox</B>(java.lang.String name, java.lang.Object[] names, java.lang.Object[] values)</PRE><DL><DD>Generic constructor, builds a select box with a default size of 1 and no selected items.<DD><DL><DT><B>Parameters:</B><DD><CODE>name</CODE> - A String with the name for the select box.<DD><CODE>names</CODE> - An Object[] with the names.<DD><CODE>values</CODE> - An Object[] with the values.</DL></DD></DL><HR><A NAME="SelectorBox(java.lang.String, java.lang.Object[], java.lang.Object[], int)"><!-- --></A><H3>SelectorBox</H3><PRE>public <B>SelectorBox</B>(java.lang.String name, java.lang.Object[] names, java.lang.Object[] values, int size)</PRE><DL><DD>Generic constructor builds a select box.<DD><DL><DT><B>Parameters:</B><DD><CODE>name</CODE> - A String with the name for the select box.<DD><CODE>names</CODE> - An Object[] with the names.<DD><CODE>values</CODE> - An Object[] with the values.<DD><CODE>size</CODE> - An int specifying the size.</DL></DD></DL><HR><A NAME="SelectorBox(java.lang.String, java.lang.Object[], java.lang.Object[], boolean[])"><!-- --></A><H3>SelectorBox</H3><PRE>public <B>SelectorBox</B>(java.lang.String name, java.lang.Object[] names, java.lang.Object[] values, boolean[] selected)</PRE><DL><DD>Generic constructor builds a select box.<DD><DL><DT><B>Parameters:</B><DD><CODE>name</CODE> - A String with the name for the select box.<DD><CODE>names</CODE> - An Object[] with the names.<DD><CODE>values</CODE> - An Object[] with the values.<DD><CODE>selected</CODE> - A boolean[] with the selected items.</DL></DD></DL><HR><A NAME="SelectorBox(java.lang.String, java.lang.Object[], java.lang.Object[], int, boolean[])"><!-- --></A><H3>SelectorBox</H3><PRE>public <B>SelectorBox</B>(java.lang.String name, java.lang.Object[] names, java.lang.Object[] values, int size, boolean[] selected)</PRE><DL><DD>Primary constructor for everything.<DD><DL><DT><B>Parameters:</B><DD><CODE>name</CODE> - A String with the name for the select box.<DD><CODE>names</CODE> - An Object[] with the names.<DD><CODE>values</CODE> - An Object[] with the values.<DD><CODE>size</CODE> - An int specifying the size.<DD><CODE>selected</CODE> - A boolean[] with the selected items.</DL></DD></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="buildBooleans(java.lang.Object[], java.lang.Object[])"><!-- --></A><H3>buildBooleans</H3><PRE>public void <B>buildBooleans</B>(java.lang.Object[] selectedSet, java.lang.Object[] entireSet)</PRE><DL><DD>Pass in an array of selected items and the entire set of items and it will determine which items in the selected set are also in the entireset and then build a boolean[] up that is the same size as the entireSet with markings to tell whether or not the items are marked or not. It uses toString().equalsIgnoreCase() on the Object in the Object[] to determine if the items are equal.<DD><DL><DT><B>Parameters:</B><DD><CODE>selectedSet</CODE> - An Object[].<DD><CODE>entireSet</CODE> - An Object[].</DL></DD></DL><HR><A NAME="toString(int)"><!-- --></A><H3>toString</H3><PRE>public java.lang.String <B>toString</B>(int size)</PRE><DL><DD>This builds out the select box at a certain size. To use this element in WM, you simply build this object in your java code, put it into the context and then call $selectBox.toString(5).<DD><DL><DT><B>Parameters:</B><DD><CODE>size</CODE> - An int with the size.<DT><B>Returns:</B><DD>A String with the HTML code.</DL></DD></DL><HR><A NAME="reset()"><!-- --></A><H3>reset</H3><PRE>public void <B>reset</B>()</PRE><DL><DD>Resets the internal state of the SelectorBox.</DL><HR><A NAME="toString()"><!-- --></A><H3>toString</H3><PRE>public java.lang.String <B>toString</B>()</PRE><DL><DD>This builds out the select box at a certain size. To use this element in WM, you simply build this object in your java code, put it into the context and then call $selectBox and it will build it with the default size of 1.<DD><DL><DT><B>Overrides:</B><DD><CODE>toString</CODE> in class <CODE>java.lang.Object</CODE></DL></DD><DD><DL><DT><B>Returns:</B><DD>A String with the HTML code.</DL></DD></DL><HR><A NAME="setMultiple(boolean)"><!-- --></A><H3>setMultiple</H3><PRE>public <A HREF="../../../../../org/apache/turbine/util/template/SelectorBox.html">SelectorBox</A> <B>setMultiple</B>(boolean val)</PRE><DL><DD>This allows you to set the multiple attribute to the select element. Example usage from within WM is like this: <p> $selectBox.setMultiple(true).toString(4)<DD><DL><DT><B>Parameters:</B><DD><CODE>val</CODE> - True if multiple selection should be allowed.<DT><B>Returns:</B><DD>A SelectorBox (self).</DL></DD></DL><HR><A NAME="setName(java.lang.String)"><!-- --></A><H3>setName</H3><PRE>public <A HREF="../../../../../org/apache/turbine/util/template/SelectorBox.html">SelectorBox</A> <B>setName</B>(java.lang.String name)</PRE><DL><DD>This allows one to set the name= attribute to the select element.<DD><DL><DT><B>Parameters:</B><DD><CODE>name</CODE> - A String with the name.<DT><B>Returns:</B><DD>A SelectorBox (self).</DL></DD></DL><HR><A NAME="setSize(int)"><!-- --></A><H3>setSize</H3><PRE>public <A HREF="../../../../../org/apache/turbine/util/template/SelectorBox.html">SelectorBox</A> <B>setSize</B>(int size)</PRE><DL><DD>This allows one to set the size of the select element.<DD><DL><DT><B>Parameters:</B><DD><CODE>size</CODE> - An int with the size.<DT><B>Returns:</B><DD>A SelectorBox (self).</DL></DD></DL><HR><A NAME="setOnChange(java.lang.String)"><!-- --></A><H3>setOnChange</H3><PRE>public <A HREF="../../../../../org/apache/turbine/util/template/SelectorBox.html">SelectorBox</A> <B>setOnChange</B>(java.lang.String script)</PRE><DL><DD>This allows one to set an onChange attribute on the select tag<DD><DL><DT><B>Parameters:</B><DD><CODE>script</CODE> - A string with the script to put in onChange<DT><B>Returns:</B><DD>A SelectorBox (self).</DL></DD></DL><HR><A NAME="setSelected(boolean[])"><!-- --></A><H3>setSelected</H3><PRE>public <A HREF="../../../../../org/apache/turbine/util/template/SelectorBox.html">SelectorBox</A> <B>setSelected</B>(boolean[] bools)</PRE><DL><DD>This allows one to set the array of selected booleans.<DD><DL><DT><B>Parameters:</B><DD><CODE>an</CODE> - array of booleans<DT><B>Returns:</B><DD>A SelectorBox (self).</DL></DD></DL><HR><A NAME="setSelected(java.lang.Object)"><!-- --></A><H3>setSelected</H3><PRE>public <A HREF="../../../../../org/apache/turbine/util/template/SelectorBox.html">SelectorBox</A> <B>setSelected</B>(java.lang.Object name)</PRE><DL><DD>This will set all elements as unselected, except for the element(s) with the given name.<DD><DL><DT><B>Parameters:</B><DD><CODE>name</CODE> - The name to appear as selected.<DT><B>Returns:</B><DD>A SelectorBox (self).</DL></DD></DL><!-- ========= END OF CLASS DATA ========= --><HR><!-- ========== START OF NAVBAR ========== --><A NAME="navbar_bottom"><!-- --></A><TABLE BORDER="0" WIDTH="100%" CELLPADDING="1" CELLSPACING="0"><TR><TD COLSPAN=2 BGCOLOR="#EEEEFF" CLASS="NavBarCell1"><A NAME="navbar_bottom_firstrow"><!-- --></A><TABLE BORDER="0" CELLPADDING="0" CELLSPACING="3"> <TR ALIGN="center" VALIGN="top"> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../../overview-summary.html"><FONT CLASS="NavBarFont1"><B>Overview</B></FONT></A> </TD> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-summary.html"><FONT CLASS="NavBarFont1"><B>Package</B></FONT></A> </TD> <TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> <FONT CLASS="NavBarFont1Rev"><B>Class</B></FONT> </TD> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="class-use/SelectorBox.html"><FONT CLASS="NavBarFont1"><B>Use</B></FONT></A> </TD> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-tree.html"><FONT CLASS="NavBarFont1"><B>Tree</B></FONT></A> </TD> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../../deprecated-list.html"><FONT CLASS="NavBarFont1"><B>Deprecated</B></FONT></A> </TD> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../../index-all.html"><FONT CLASS="NavBarFont1"><B>Index</B></FONT></A> </TD> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../../help-doc.html"><FONT CLASS="NavBarFont1"><B>Help</B></FONT></A> </TD> </TR></TABLE></TD><TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM></EM></TD></TR><TR><TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2"> <A HREF="../../../../../org/apache/turbine/util/template/RelativeTemplateLink.html"><B>PREV CLASS</B></A> <A HREF="../../../../../org/apache/turbine/util/template/TemplateInfo.html"><B>NEXT CLASS</B></A></FONT></TD><TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2"> <A HREF="../../../../../index.html" TARGET="_top"><B>FRAMES</B></A> <A HREF="SelectorBox.html" TARGET="_top"><B>NO FRAMES</B></A></FONT></TD></TR><TR><TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2"> SUMMARY: INNER | FIELD | <A HREF="#constructor_summary">CONSTR</A> | <A HREF="#method_summary">METHOD</A></FONT></TD><TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">DETAIL: FIELD | <A HREF="#constructor_detail">CONSTR</A> | <A HREF="#method_detail">METHOD</A></FONT></TD></TR></TABLE><!-- =========== END OF NAVBAR =========== --><HR>Copyright © 2000-2002 Apache Software Foundation. All Rights Reserved.</BODY></HTML>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -