<s:form action="list_acctList.action" theme="simple" name="user" namespace="/jsp" onsubmit="change()">
<table width="30%" height="30%" id="search">
<tr>
<td colspan="2">
<input type="submit" value="高级搜索">
</td>
<td>
<s:reset  value="清空查询" onclick="clearInput();"></s:reset>
</td>
</tr>
<tr>
<td>
账户类型:
</td>
<td colspan="2">
<s:radio id="cleart" list="#{'a':'信用账户','b':'普通账户'}" name="pageView.accountType"value="#request.pv.accountType"theme="simple"/> 
</td>
</tr>
<tr>
<td>
账户状态:
</td>
<td colspan="2">
<s:radio id="clears" list="#{'0':'冻结','1':'正常'}" name="pageView.accountState" value="#request.pv.accountState" theme="simple"/> 
</td>
</tr>
<tr>
<td>
余额范围:
</td>
<td>
<input type="text" name="pageView.lowbalance" value="<s:property value="#request.pv.lowbalance" />">

</td>
<td>
<input type="text" name="pageView.highbalance" value="<s:property value="#request.pv.highbalance" />">

</td>
</tr>
<tr>
<td>
信用范围:
</td>
<td>
<input type="text" name="pageView.lowceiling" value="<s:property value="#request.pv.lowceiling" />">

</td>
<td>
<input type="text" name="pageView.highceiling" value="<s:property value="#request.pv.highceiling" />">

</td>
</tr>
<tr>
<td>
精确搜索
</td>
<td>
用户姓名
<input type="text" name="pageView.username" value="<s:property value="#request.pv.username" />">
</td>
</tr>
<tr>
<td>
精确搜索
</td>
<td>
用户卡号
</td>
<input type="text" name="pageView.accountId" value="<s:property value="#request.pv.accountId" />">
</td>
</tr>
</table>
<!-- 分页Button Begin -->
<input type="hidden" name="id" value="<%=request.getAttribute("id")%>">
<%
if (allRecorders > 0) {
%>
<input type="button" value="首页" onClick="openPage(1)"
<%=currentPage == 1 ? "disabled" : ""%>>
<input type="button" value="上一页"
onClick="openPage(<%=currentPage - 1%>)"
<%=currentPage == 1 ? "disabled" : ""%>>
<input type="button" value="下一页"
onClick="openPage(<%=currentPage + 1%>)"
<%=currentPage == pageSize ? "disabled" : ""%>>
<input type="button" value="尾页" onClick="openPage(<%=pageSize%>)"
<%=currentPage == pageSize ? "disabled" : ""%>>
<input type="hidden" name="cp" value="">
<font color="red" size="5"><%=currentPage%></font> /
<font color="red" size="5"><%=pageSize%></font> 跳转到
<select name="selpage" onChange="selOpenPage()">
<%
for (int x = 1; x <= pageSize; x++) {
%>
<option value="<%=x%>" <%=currentPage == x ? "selected" : ""%>><%=x%></option>
<%
}
%>
</select>

<%
}
%>

<!-- 分页Button End -->
</s:form>
这个是我的搜索表单,我把数据直接关联到Action中的一个Vo,这个在翻页的时候可以保存查询的数据。
   但是现在我想用户可以自己方便的清楚这些数据,,而不是重新打开一个页面。
问题就来了:这些数据通过OGNL被关联好了,而我的取数据方式又是固定的,所以用Js也无法做到,因为还是绑定的。
        请问: 大家在处理这类问题时,都是怎么做的,我猜我这种方式是不正确的。希望高人指点迷津。---拜谢先。

解决方案 »

  1.   

    我在异常查询后,表单的数据我需要保留,但是要给用户一个清楚按钮,但是reset办不到,我用js清空也办不到(调试发现:数据被绑定死了,所以现在求好的解决方案)   求解决方法--->
      

  2.   

    例如:<s:radio id="cleart" list="#{'a':'信用账户','b':'普通账户'}" name="pageView.accountType"value="#request.pv.accountType"theme="simple"/> ,用户在选择了'a'后,搜索,那么搜索的结果里radio中'a'被选中。现在我想给用户一个可以不刷新页面,又可以清除选项的功能。----->如果要满足我的要求,我该如果做?---->是不是该换一种绑定获取数据的方法?
    --->顶贴有分>10分,大家帮我想想招啊.