社区
Web 开发
帖子详情
关于list循环到前台更新不了的问题
gx2425030
2009-03-25 01:12:59
我在jsp前台循环出list,把list其中的一条记录修改后提交,然后在跳回该jsp页面但是跳回来还是修改前的记录,没有返回修改后的list。
...全文
117
5
打赏
收藏
关于list循环到前台更新不了的问题
我在jsp前台循环出list,把list其中的一条记录修改后提交,然后在跳回该jsp页面但是跳回来还是修改前的记录,没有返回修改后的list。
复制链接
扫一扫
分享
转发到动态
举报
写回复
配置赞助广告
用AI写文章
5 条
回复
切换为时间正序
请发表友善的回复…
发表回复
打赏红包
gx2425030
2009-03-25
打赏
举报
回复
父窗口代码
<%@ page language="java" import="java.util.*" pageEncoding="GB18030"%>
<%@ taglib uri="/WEB-INF/struts-html.tld" prefix="html"%>
<%@ taglib uri="/WEB-INF/struts-bean.tld" prefix="bean"%>
<%@ taglib uri="/WEB-INF/struts-logic.tld" prefix="logic"%>
<%@ taglib uri="/WEB-INF/c.tld" prefix="c"%>
<html>
<head>
<title>车辆调拨</title>
<link rel="stylesheet" type="text/css"
href="${pageContext.request.contextPath}/css/style.css">
<script type="text/javascript"
src="${pageContext.request.contextPath}/js/date.js"></script>
<script type="text/javascript">
function oop(url){
<%-- alert(gongsi)--%>
window.open(url,"" ,
"toolbar=no,location=no,directories=no,status=yes,menubar=no,scrollbars=no,resizable=no,copyhistory=yes,width=300,height=100,left=300, top=200");
}
</script>
</head>
<body>
<html:form action="jihuafenpei.do" method="post" styleId="form1">
<fieldset style="width:100%;padding-bottom:5px;">
<legend>
<b>承运任务管理</b>
</legend>
<table>
<input type="hidden" name="method" value="findByTimeandCom" />
<tr>
<td>
请选择查询时间:
</td>
<td>
<html:text property="danqianriqi"
onclick="CalendarWebControl.show(this,false,this.value);"
style="width:100px" />
</td>
<%-- <td>--%>
<%-- 请选择运输公司:--%>
<%-- <c:if test="${account.partname eq '3'}">--%>
<%-- <input type="text" name="yunshugongsi" value="${account.username}" readonly="readonly" />--%>
<%-- </c:if>--%>
<%-- <c:if test="${account.partname ne '3'}">--%>
<%-- <input type="text" name="yunshugongsi" />--%>
<%-- </c:if>--%>
<%-- </td>--%>
<td>
<html:submit style="width:90px" value="查询未审核"
onclick="method.value='findByTimeandCom'" styleClass="BigButton" />
</td>
<%--<input type="hidden" name="method" value="findByTimeandCom" />--%>
<td>
<html:submit style="width:90px" value="查询以审核" onclick="method.value='findByTimeandCom1'" styleClass="BigButton"/>
</td>
</tr>
</table>
</fieldset>
<br>
<br>
<table border="0" cellspacing="1" class="tablestyle1">
<logic:present name="list">
<tr class="TableHeader" align="center">
<td>
计划批次
</td>
<td>
计划录入时间
</td>
<td>
分配日期
</td>
<td>
发车地点
</td>
<td>
运输公司
</td>
<td>
销售店
</td>
<td>
省份
</td>
<td>
是否调拨任务
</td>
<td>
台数
</td>
<td>
车牌号
</td>
<td>
操作
</td>
</tr>
<logic:iterate id="templist" name="list" >
<tr class="TableLine1" align="center">
<html:hidden property="idbiaoshi" value="${templist.idbiaoshi}"/>
<td>
<bean:write name="templist" property="jihuapici"/>
</td>
<td>
<bean:write name="templist" property="jihuashijian"/>
</td>
<td>
<bean:write name="templist" property="danqianriqi" />
</td>
<td>
<bean:write name="templist" property="jihuadidian"/>
</td>
<td>
<bean:write name="templist" property="yunshugongsi"/>
</td>
<td>
<bean:write name="templist" property="xiaoshoudian"/>
</td>
<td>
<bean:write name="templist" property="shengfen"/>
</td>
<td>
<bean:write name="templist" property="shifoudiaochu"/>
</td>
<td>
<bean:write name="templist" property="taishu"/>
</td>
<td>
<%-- <input type="text" name="cifatianshu" value="${templist.cifatianshu}"/>--%>
<%-- <html:text property="cifatianshu" value="${templist.cifatianshu}"/>--%>
<bean:write name="templist" property="cifatianshu"/>
</td>
<td>
<%-- <a id="xyz" href="${pageContext.request.contextPath}/jihua/carnumber.jsp?id=${templist.idbiaoshi}&page=${fenye.nowpage}&shijian=${shijian}&gongsi=${gongsi}">完成</a>--%>
<a id="xyz" href="javascript:oop('${pageContext.request.contextPath}/jihua/carnumber.jsp?id=${templist.idbiaoshi}&page=${fenye.nowpage}&shijian=${shijian}&gongsi=${gongsi}');">填写车牌</a>
</td>
</tr>
</logic:iterate>
</logic:present>
<c:if test="${list!=null}">
<tr class="TableLine1">
<td colspan="17" align="right">
<input type="hidden" name="page" value="${fenye.nowpage }"/>
<input type="hidden" name="shijian" value="${shijian }"/>
<input type="hidden" name="gongsi" value="${gongsi }"/>
共有${fenye.pagecount} 页||现在是第${fenye.nowpage}页||共有${fenye.allcount
}条记录
<c:if test="${fenye.nowpage!=1}">
<a
href="${pageContext.request.contextPath}/jihuafenpei.do?method=findByTimeandCom&&page=1&&danqianriqi=${shijian}&&yunshugongsi=${gongsi}">首页</a>
<a
href="${pageContext.request.contextPath}/jihuafenpei.do?method=findByTimeandCom&&page=${fenye.nowpage-1}&&danqianriqi=${shijian}&&yunshugongsi=${gongsi}">上一页</a>
</c:if>
<c:if test="${fenye.nowpage!=fenye.pagecount}">
<a
href="${pageContext.request.contextPath}/jihuafenpei.do?method=findByTimeandCom&&page=${fenye.nowpage+1}&&danqianriqi=${shijian}&&yunshugongsi=${gongsi}">下一页</a>
<a
href="${pageContext.request.contextPath}/jihuafenpei.do?method=findByTimeandCom&&page=${fenye.pagecount}&&danqianriqi=${shijian}&&yunshugongsi=${gongsi}">尾页</a>
</c:if>
</td>
</tr>
</c:if>
</table>
</html:form>
</body>
</html>
gx2425030
2009-03-25
打赏
举报
回复
子窗口代码
<%@ page language="java" import="java.util.*" pageEncoding="GB18030"%>
<%
String path = request.getContextPath();
String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<base href="<%=basePath%>">
<title>填写车牌号</title>
<!--
<link rel="stylesheet" type="text/css" href="styles.css">
-->
<script type="text/javascript">
function check(){
document.form1.submit();
window.opener.location.href = window.opener.location.href;
if (window.opener.progressWindow){
window.opener.progressWindow.close();
}
window.close();
}
</script>
</head>
<body>
<form action="jihuafenpei.do?method=AmendNumPlate" method="post" name="form1">
<input type="hidden" name="idbiaoshi" value="<%=request.getParameter("id") %>"/>
<input type="hidden" name="page" value="<%=request.getParameter("page") %>">
<input type="hidden" name="danqianriqi" value="<%=request.getParameter("shijian") %>">
<input type="hidden" name="yunshugongsi" value="<%=request.getParameter("gongsi") %>">
<table align="center">
<tr>
<td><input type="text" name="cifatianshu" /></td>
</tr>
<tr>
<td><input type="button" name="button" value="提交" onclick="check()"/></td>
</tr>
</table>
</form>
</body>
</html>
ouyangxiaokang6
2009-03-25
打赏
举报
回复
子窗口的提交的时候,是不是list没有提交呀。导致list没有更新。
你怎么写的,上代码
gx2425030
2009-03-25
打赏
举报
回复
我用的方法是,修改的时候跳出子窗口,然后点击子窗口的提交,关闭子窗口然后刷新父窗口
sjkof
2009-03-25
打赏
举报
回复
你用的什么办法来跳转的?
FastAdmin插件开发入门
FastAdmin插件开发入门教程,课程通过复制一个简单插件的形式,帮助快速上手插件开发流程,进一步分析了解了插件开发的各个配置文件的作用和使用。本课程上一起完成了的
前台
登录背景图插件 并发布在FA官方插件平台,是您快速入门的插件开发的合适的课程。
工作
问题
-java-单值查询renderJson返回
因为jfinal的
list
一直为数组类型.在
前台
获取需用
循环
,若果要在
前台
直接取出不
循环
List
list
= Db.find(sql,tpid,tfid); renderJson("
list
",
list
.get(0)); get
前台
遍历数组,后台foreach
循环
添加
前台
实现将复选框的值保存到数组中,后台用
list
进行传值,mybatis中用foreach遍历
循环
添加或
更新
.
前台
jsp代码: <%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%> /jquery-easyui-1.5.1/themes/defaul
使用Fastjson解析
List
对象时出现“$ref”:“$.data[0].children[0]”的
问题
一、
问题
原因 后台传过去的json数据用了阿里的fastjson转换,但是解析
list
中引用的数据时,jvm会自动将其处理为“
循环
引用”,因此,也就出现了
问题
{"ref":"ref":"ref":".data[0].children[0]"},数据以引用的方式传给
前台
,
前台
却无法解析到那段引用的数据。
循环
引用就是:当一个对象包含另一个对象时,fastjson就会把该对象解析成引用。 二、解决方案 JSON.toJSONString(
list
,SerializerFeature.DisableCircula
Python入门视频教程
Python入门基础教程:python教程旨在掌握python开发的入门基础用法与其核心操作,便于大家在短时间内可以使用python进行后续的工作与学习。课程内容包括Python环境搭建(Anaconda方式)、变量、
List
基础结构、
List
索引、
循环
结构、判断结构、字典结构、文件处理、函数基础等。
Web 开发
81,076
社区成员
341,819
社区内容
发帖
与我相关
我的任务
Web 开发
Java Web 开发
复制链接
扫一扫
分享
社区描述
Java Web 开发
社区管理员
加入社区
获取链接或二维码
近7日
近30日
至今
加载中
查看更多榜单
社区公告
暂无公告
试试用AI创作助手写篇文章吧
+ 用AI写文章