すべてのInput-typesコンポーネントはtextbox,datebox,decimalbox,intbox,combobox,bandboxのようなnameプロパティをサポートします。
さらに、リストボックスとツリーコントロールはnameプロパティをサポートしています。multipleプロパティがtrueで、ユーザーが多数項目を選択した場合、複数のネーム/値のペアがポストされます。
<listbox name="who" multiple="true" width="200px"> <listhead> <listheader label="name"/> <listheader label="gender"/> </listhead> <listitem value="mary> <listcell label="Mary"/> <listcell label="FEMALE"/> </listitem> <listitem value="john"> <listcell label="John"/> <listcell label="MALE"/> </listitem> <listitem value="jane"> <listcell label="Jane"/> <listcell label="FEMALE"/> </listitem> <listitem value="henry"><listcell label="Henry"/> <listcell label="MALE"/> </listitem> </listbox>
JohnとHenryが選択された場合、 query ストリングは以下になります:
who=john&who=henry
nameプロパティと一緒のリストボックスとツリーコントロールの使用するにはvalueプロパティをlistitemとtreeitemにそれぞれ指定しなければなりません。それらはサーブレットにポストされている値です。