如何使用AJAX实现Option TransFersect



我正在尝试使用AJAX实现optiontransferselect。我无法将值从左侧到右侧移动。我在代码中添加了<%@ taglib uri="/struts-dojo-tags" prefix="sx"%>标签,我还包括<sx:head/>,但它不起作用。请帮助我解决问题。

my.jsp

<%@taglib uri="/struts-tags" prefix="s" %>
<%@ taglib uri="/struts-dojo-tags" prefix="sx"%>
<head>
<sx:head/>
</head>
 <div class="width2 margin-bottom margin-top">
                <div class="profile-text">
                    Preferred Location
                </div>
                 <s:optiontransferselect  
                 id="city"
                 name="cityNo"
                 list="cityList"
                 listKey="id"
                 listValue="cityName"
                 headerKey="0"
                 headerValue="City"
                 onfocus="getcitywithCountry(false);"
                 doubleList="prefererList"
                 doubleId="city"
                 doubleListKey="cityId.id" 
                 doubleListValue="cityId.cityName"
                 doubleHeaderKey="0"
                 doubleHeaderValue="--selected locations--"   
                 doubleName="selectedLocations" allowUpDownOnLeft="false" allowUpDownOnRight="false"/>
            </div>

我认为您的代码没有太多错误。您需要删除<%@ taglib uri="/struts-dojo-tags" prefix="sx"%>参考。用<s:head/>替换<sx:head/>

最新更新