0

Struts2-jQueryプロジェクトに複数選択ドロップダウンリストを実装する必要があります。

sj:selectタグを使用して、AJAXとJSONを使用してアクションクラスからデータをロードしています。

ただし、リストをドロップダウンにし、複数選択するオプションが必要です。

http://code.google.com/p/dropdown-check-list/を使用してみましたが、sj:selectタグでは機能しませんでした。

これが私のコードの外観です:-

    <s:url var="list2URL" action="licenseGeneration" />

<s:form id="subgroupForm" action="licenseGeneration" method="get"
    theme="css_xhtml">
    <table>
        <tr>
            <td>
                <div>Select Product Family:</div>
            </td>
            <td><sj:select href="%{list2URL}" id="selectedSubgroup"
                    onChangeTopics="featuresList,productsList" name="selectedSubgroup"
                    list="subgroups" emptyOption="false" headerKey="-1"
                    headerValue="Please select a Sub Group">
                </sj:select></td>
        </tr>
        <tr>
            <td>
                <div>Select Product Name:</div>
            </td>
            <td>
                <div>
                    <sj:select href="%{list2URL}" id="selectWithReloadTopic"
                        formIds="subgroupForm" reloadTopics="productsList"
                        name="products" list="productLevelSKUs" emptyOption="false"
                        headerKey="-1" headerValue="Please Select a Product">
                    </sj:select>
                </div>
            </td>
        </tr>
        <tr>
            <td>
                <div>Select Features:</div>
            </td>
            <td>
                <div>
                    <sj:select href="%{list2URL}" id="selectWithReloadTopic2"
                        formIds="subgroupForm" reloadTopics="featuresList"
                        name="features" list="featureLevelSKUs" emptyOption="false"
                        headerKey="-1" headerValue="Shift select for multiple features"
                        multiple="true">
                    </sj:select>
                </div>
            </td>
        </tr>
    </table>
</s:form>
4

1 に答える 1

0

以下が機能するように、単純なHTMLを使用するだけです

 <select multiple="multiple">
      <option value="volvo">Volvo</option>
      <option value="saab">Saab</option>
      <option value="opel">Opel</option>
      <option value="audi">Audi</option>
    </select>
于 2012-11-21T07:00:02.937 に答える