servlet部分:
class SessionContainer{
ArrayList<User> users;
public void setUsers (users){
this.users=users
}
}
sessionContainer.set(list);
Session.setAttribute("Container",sessionContainer)
//遍历bean中的集合对象
//jsp页面中获取值
<logic:iterate id="user" name="Container" property="users">
<bean:write name="user" property="userid"/>
<bean:write name="user" property="username"/>
<bean:write name="user" property="password"/>
</logic:iterate>
公司模块中用到的:
<logic:iterate id="masterCltslList" name="masterCltslForm_gt"
property="masterCltslList" indexId="idx">
<tr>
<!-- コード -->
<td class="list_data_bg"><input type="text"
name="masterCltslForm.gjyt_tanto_cd"
class="output default output_txt_height" size="
5"
value="<bean:write name="masterCltslList"
property="gjyt_tanto_cd"/>"
maxlength="5" style="ime-mode:active;" readonly /></td>
<!-- 営業担当者名 -->
<td class="list_data_bg"><input type="text"
name="masterCltslForm.gjyt_tanto" class="default" size="25"
value="<bean:write name="masterCltslList" property="gjyt_tanto"/>"
maxlength="10" style="ime-mode:active;" /></td>
<!-- 電話番号 -->
<td class="list_data_bg"><input type="text"
name="masterCltslForm.gjyt_tanto_tel" class="default"
size="19"
value="<bean:write name="masterCltslList" property="gjyt_tanto_tel"/>"
maxlength="15" style="ime-mode:disabled;" /></td>
<!-- FAX -->
<td class="list_data_bg"><input type="text"
name="masterCltslForm.gjyt_tanto_fax" class="default"
size="15"
value="<bean:write name="masterCltslList" property="gjyt_tanto_fax"/>"
maxlength="15" style="ime-mode:disabled;" /></td>
<!-- メールアドレス -->
<td class="list_data_bg"><input type="text"
name="masterCltslForm.gjyt_tanto_mail" class="default"
size="25"
value="<bean:write name="masterCltslList" property="gjyt_tanto_mail"/>"
maxlength="50" style="ime-mode:disabled;" /></td>
<!-- 最終更新者 -->
<td class="list_data_bg"><input type="text"
name="masterCltslForm.kosn_user_name"
class="output default output_txt_height" size="15"
value="<bean:write name="masterCltslList" property="kosn_user_name"/>"
maxlength="15" style="ime-mode:active;" readonly /></td>
<!-- 削除 -->
<td class="list_data_bg"><input class="checkbox_bj"
type="checkbox" id="masterDelFlag" value="1"></td>
</tr>
</logic:iterate>
分享到:
相关推荐
jsp脚本和<logic:iterate>标签:实现循环和分支逻辑 jsp脚本和<logic:iterate>标签:实现循环和分支逻辑 jsp脚本和<logic:iterate>标签:实现循环和分支逻辑
1. Map里存放的是bean时<br><br><logic:iterate id="destMap" name="srcMap"><br><br> <bean:define id="bean" name="destMap" property="value" /><br><br> <bean:write name="bean" property="name" /><br><br></...
我就是靠这个文档实现logic:iterate的循环的<br>struts 标签 logic:iterate使用 logic:iterate<br><br>第一页 是struts官方的说明,<br>第二页 是个例子<br>第三页 是我实现的arrayList放入标签的方法。<br>这是页面...
Struts Logic标签Struts Logic标签Struts Logic标签Struts Logic标签Struts Logic标签
16.3.5、重定向标签:<logic:redirect> 16.4、Html标签 16.4.1、<html:form>标签 16.4.2、<html:text>与<html:password>标签 16.4.3、<html:radio>标签 16.4.5、<...
16.3.5、重定向标签:<logic:redirect> 16.4、Html标签 16.4.1、<html:form>标签 16.4.2、<html:text>与<html:password>标签 16.4.3、<html:radio>标签 16.4.5、<html:textarea>标签 16.4.6、<html:hidden...
16.3.5、重定向标签:<logic:redirect> 16.4、Html标签 16.4.1、<html:form>标签 16.4.2、<html:text>与<html:password>标签 16.4.3、<html:radio>标签 16.4.5、<html:textarea>...
16.3.5、重定向标签:<logic:redirect> 16.4、Html标签 16.4.1、<html:form>标签 16.4.2、<html:text>与<html:password>标签 16.4.3、<html:radio>标签 16.4.5、<html:textarea>...
16.3.5、重定向标签:<logic:redirect> 16.4、Html标签 16.4.1、<html:form>标签 16.4.2、<html:text>与<html:password>标签 16.4.3、<html:radio>标签 16.4.5、<html:textarea>...
16.3.5、重定向标签:<logic:redirect> 16.4、Html标签 16.4.1、<html:form>标签 16.4.2、<html:text>与<html:password>标签 16.4.3、<html:radio>标签 16.4.5、<html:textarea>标签 16.4.6、<html:hidden...
16.3.5、重定向标签:<logic:redirect> 16.4、Html标签 16.4.1、<html:form>标签 16.4.2、<html:text>与<html:password>标签 16.4.3、<html:radio>标签 16.4.5、<...
16.3.5、重定向标签:<logic:redirect> 16.4、Html标签 16.4.1、<html:form>标签 16.4.2、<html:text>与<html:password>标签 16.4.3、<html:radio>标签 16.4.5、<html:textarea>...
struts-logic iterate标签学习指南 这标签还不错
struts标签库 文章目录 bean:cookie 2 bean:define 3 bean:header 4 ...logic:iterate 21 logic:present 23 logic:messagesPresent 23 logic:empty 24 logic:match 24 logic:equal 25 logic:forward 26 总结 26
<logic:equal value="modify" property="action" name="projectForm"> <bean:message key="project.project_modify"/> </logic:equal> 上面的示例表示,如果projectForm的action属性等于modify,则处理<bean:message...
21. <prop key="hibernate.dialect">org.hibernate.dialect.OracleDialect</prop> 22. <prop key="hibernate.cglib.use_reflection_optimizer">true</prop> 23. </props> 24. </property> 25. </bean>...
提供struts1.x中标签的总结,包括标签中属性代表的含义等。这是我积累经验后总结的,希望和我一样热爱编程的朋友们能好好利用~
Adding Domain Logic 10.6. Zend_Db_Table_Row 10.6.1. 简介 10.6.2. 取回一条记录 10.6.3. 修改数据 10.7. Zend_Db_Table_Rowset 10.7.1. 简介 10.7.2. 取回结果集 10.7.3. 遍历结果集 10.8. Zend_Db_...