社区
Java EE
帖子详情
Struts2
标签的问题,高手帮忙呀!
quick9999
2008-01-15 04:06:10
页面是这么写的!
<s:checkboxlist
id="roles"
name="roles"
list="roles"
listKey="id"
listValue="roleName"
theme="simple"
/>
页面上出来的效果是横排的,看起来很不整齐,怎么让他变成竖排的呀???? 搞不定呀, 在线等!。。。。。。。
...全文
1633
3
打赏
收藏
Struts2 <s:checkboxlist/> 标签的问题,高手帮忙呀!
页面是这么写的! 页面上出来的效果是横排的,看起来很不整齐,怎么让他变成竖排的呀???? 搞不定呀, 在线等!。。。。。。。
复制链接
扫一扫
分享
转发到动态
举报
写回复
配置赞助广告
用AI写文章
3 条
回复
切换为时间正序
请发表友善的回复…
发表回复
打赏红包
sjc106112
2012-03-08
打赏
举报
回复
可以
在Action用List保存List的方法,在页面用<s:iterator>来遍历List,可以嵌套多层,这样就可以表格形式的输出了,无论横行还是竖行都可以
我已经使用成功了
ztroma
2008-02-29
打赏
举报
回复
改模板,也就是checkboxlist.ftl文件
<#assign itemCount = 0/>
<#if parameters.list?exists>
<@s.iterator value="parameters.list">
<#assign itemCount = itemCount + 1/>
<#if parameters.listKey?exists>
<#assign itemKey = stack.findValue(parameters.listKey)/>
<#else>
<#assign itemKey = stack.findValue('top')/>
</#if>
<#if parameters.listValue?exists>
<#assign itemValue = stack.findString(parameters.listValue)/>
<#else>
<#assign itemValue = stack.findString('top')/>
</#if>
<#assign itemKeyStr=itemKey.toString() />
<tr>
<td width="5%">
<input type="checkbox" name="${parameters.name?html}" value="${itemKeyStr?html}" id="${parameters.name?html}-${itemCount}"<#rt/>
<#if tag.contains(parameters.nameValue, itemKey)>
checked="checked"<#rt/>
</#if>
<#if parameters.disabled?default(false)>
disabled="disabled"<#rt/>
</#if>
<#if parameters.title?exists>
title="${parameters.title?html}"<#rt/>
</#if>
<#include "/${parameters.templateDir}/simple/scripting-events.ftl" />
<#include "/${parameters.templateDir}/simple/common-attributes.ftl" />
/>
</td>
<td width="95%">
<label for="${parameters.name?html}-${itemCount}" class="checkboxLabel">${itemValue?html}</label>
</td>
</tr>
</@s.iterator>
<#else>
</#if>
yerenmeng
2008-01-16
打赏
举报
回复
看看我占的楼层是不是幸运数字
HTML必知必会精讲
本课程《HTML必知必会精讲》详细讲述了HTML必备知识点,内容包括:HTML概述、HTML规范、HTML思想、HBuilder工具的介绍和使用、常见
标签
(字体font
标签
、加粗b
标签
、下划线u
标签
、删除线s
标签
、字体倾斜i
标签
、上标...
checkboxlist/>数据回显
问题
checkboxlist/>数据回显
问题
Struts2
标签
库(8):
,
,
,
,
start.jsp : Insert title here
标签
用法 struts.xml :
struts2
标签
ognl和el
1、
struts2
标签
解释 http://zhidao.baidu.com/question/88668316.html?fr=qrl&index=0 2、
struts2
的
标签
中 property是什么意思?怎么用? http://zhidao.baidu.com/question/310639670.html
Struts2
中的property
标签
是用于取得OgnlContext
Struts2
标签
库(9):
checkboxlist/>,
start.jsp : Insert title here struts.xml :
Java EE
67,513
社区成员
225,879
社区内容
发帖
与我相关
我的任务
Java EE
J2EE只是Java企业应用。我们需要一个跨J2SE/WEB/EJB的微容器,保护我们的业务核心组件(中间件),以延续它的生命力,而不是依赖J2SE/J2EE版本。
复制链接
扫一扫
分享
社区描述
J2EE只是Java企业应用。我们需要一个跨J2SE/WEB/EJB的微容器,保护我们的业务核心组件(中间件),以延续它的生命力,而不是依赖J2SE/J2EE版本。
社区管理员
加入社区
获取链接或二维码
近7日
近30日
至今
加载中
查看更多榜单
社区公告
暂无公告
试试用AI创作助手写篇文章吧
+ 用AI写文章