Struts数组作为属性值的问题 <html:text property='<%="pay_id["+i+"]"%>' value=... /> 这里需要自己把数组里面的值设到value上去 解决方案 » 免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货 <html:text property='<%="pay_id["+i+"]"%>' value=... /> 楼上两位这样写不觉得很麻烦吗?而且容易写错,建议大家可以到www.apache.org介绍structs的部分去看看,只要支持jsp1.1的就直接写成:<html:text property='参数'... /> 不太明白啊,把值设到value上去,那property是不是应该全都是叫"pay_id"而不带数组下标了?好像这样做不能显示正确的数据啊……实在不行我就<%=%>了……我觉得struts的taglib只对那种循环显示的一般JSP比较好用,规则复杂一点就很别扭了,有时候不得已还是的插入JSP scriplet,觉得挺无奈的…… ----------只要支持jsp1.1的就直接写成:<html:text property='参数'... />---------我用的是tomcat4.0,这么写显示的是数组的内存地址xxx@xxx形式 可能说的你还不明白,给个简单的例子你应该能看懂了。属性名:auto 其value预先从form里面取出来,保存在数组auto里面,jsp如下<html:text property='auto' value='<%=auto[0]%>' /> <html:text property='auto' value='<%=auto[1]%>' /> <html:text property='auto' value='<%=auto[2]%>' /> 这样知道怎样改写成for循环了吧! 更新的时候formbean就找不到对应的属性了,这个问题怎么办啊?--------------------------------------------------------在form bean 中加以下方法: public String getPay_id(int index){ return (String) getPay_id()[index]; } public void setPay_id(int index){ this.pay_id[index]=getPay_id(index); } 更新的时候formbean就找不到对应的属性了,这个问题怎么办啊?--------------------------------------------------------在form bean 中加以下方法: public String getPay_id(int index){ return (String) getPay_id()[index]; } public void setPay_id(int index){ this.pay_id[index]=getPay_id(index); } jqplot柱状图在IE6下 报对象为空或不是对象 Hibernate 3.3.2 共有几级缓存? ibatis中的一个小问题 生活很无奈,找工作很渺茫,大家指点迷津,十分感谢大家。 调用ejb出错 进来看哈 为什么代码最后一句话不执行? 最简单的struts,错在哪? XADataSource,XAConnection的问题 在WSAD5.0中,EJB2.0的sessionBean访问实体bean本地接口问题。 Tomcat 的 Log 文件 Vector vSubInsureType=(Vector)hBaseInfo.get("vSubInsureType");(很简单的)
楼上两位这样写不觉得很麻烦吗?而且容易写错,建议大家可以到www.apache.org介绍structs的部分去看看,只要支持jsp1.1的就直接写成:
<html:text property='参数'... />
实在不行我就<%=%>了……
我觉得struts的taglib只对那种循环显示的一般JSP比较好用,规则复杂一点就很别扭了,有时候不得已还是的插入JSP scriplet,觉得挺无奈的……
只要支持jsp1.1的就直接写成:
<html:text property='参数'... />
---------我用的是tomcat4.0,这么写显示的是数组的内存地址xxx@xxx形式
<html:text property='auto' value='<%=auto[1]%>' />
<html:text property='auto' value='<%=auto[2]%>' /> 这样知道怎样改写成for循环了吧!
--------------------------------------------------------
在form bean 中加以下方法:
public String getPay_id(int index){
return (String) getPay_id()[index];
}
public void setPay_id(int index){
this.pay_id[index]=getPay_id(index);
}
--------------------------------------------------------
在form bean 中加以下方法:
public String getPay_id(int index){
return (String) getPay_id()[index];
}
public void setPay_id(int index){
this.pay_id[index]=getPay_id(index);
}