草窝儿
我的地盘儿
posts - 4,  comments - 13,  trackbacks - 0
    websphere中jstl标签不要套着用,特别是 <c:if>、<c:when>和 ${fn:},不然还得回头改,严重浪费时间。
    记录一下,备忘。
    已经试过N次了,以目前的版本来说,websphere还是不支持套着用,以后没听到新闻也可以不用再测试了!
posted @ 2008-01-18 17:17 芨芨草 阅读(426) | 评论 (0)编辑 收藏
list传值,每4列换行显示,代码如下:
 1<div id="orgsDiv">
 2    <c:set var="j" value="0" />
 3    <c:set var="type" value="" />
 4    <c:forEach items="${orgs}" var="org" varStatus="i">
 5        <c:if test="${type != org.type && i.index!=0}">
 6            <c:forEach begin="${j%4}" end="3">
 7                    <td width="25%">&nbsp;</td>
 8            </c:forEach>
 9            </tr>
10            </table>
11            <hr width="100%" style="border: 1px solid #cadae8; height: 1px">
12        </c:if>
13        <c:if test="${type != org.type }">
14            <c:set var="j" value="0" />
15            <table border="0" width="100%" cellpadding="0" cellspacing="0">
16        </c:if>
17        <c:if test="${j%4 == 0}">
18            <tr>
19        </c:if>
20        <td width="25%">
21            <html:multibox property="orgIds">${org.id}</html:multibox>
22            <c:out value="${org.shortName}" />
23        </td>
24        <c:if test="${(i.last) || (j%4 == 3)}">
25            <c:if test="${i.last}">
26                <c:forEach begin="${i.index%4}" end="2">
27                    <td width="25%">&nbsp;</td>
28                </c:forEach>
29            </c:if>
30            </tr>
31            <c:if test="${i.last}">                            
32                </table>
33            </c:if>    
34        </c:if>
35        <c:set var="j" value="${j+1}" />
36        <c:set var="type" value="${org.type}" />
37    </c:forEach>
38</div>
posted @ 2008-01-18 16:44 芨芨草 阅读(516) | 评论 (1)编辑 收藏
这里发代码好像还可以。 写段代码试一下,
 1<div id="orgsDiv">
 2    <c:set var="j" value="0" />
 3    <c:set var="type" value="" />
 4    <c:forEach items="${orgs}" var="org" varStatus="i">
 5        <c:if test="${type != org.type && i.index!=0}">
 6            <c:forEach begin="${j%4}" end="3">
 7                    <td width="25%">&nbsp;</td>
 8            </c:forEach>
 9            </tr>
10            </table>
11            <hr width="100%" style="border: 1px solid #cadae8; height: 1px">
12        </c:if>
13        <c:if test="${type != org.type }">
14            <c:set var="j" value="0" />
15            <table border="0" width="100%" cellpadding="0" cellspacing="0">
16        </c:if>
17        <c:if test="${j%4 == 0}">
18            <tr>
19        </c:if>
20        <td width="25%">
21            <html:multibox property="orgIds">${org.id}</html:multibox>
22            <c:out value="${org.shortName}" />
23        </td>
24        <c:if test="${(i.last) || (j%4 == 3)}">
25            <c:if test="${i.last}">
26                <c:forEach begin="${i.index%4}" end="2">
27                    <td width="25%">&nbsp;</td>
28                </c:forEach>
29            </c:if>
30            </tr>
31            <c:if test="${i.last}">                            
32                </table>
33            </c:if>    
34        </c:if>
35        <c:set var="j" value="${j+1}" />
36        <c:set var="type" value="${org.type}" />
37    </c:forEach>
38</div>
posted @ 2008-01-17 10:29 芨芨草 阅读(172) | 评论 (1)编辑 收藏
仅列出标题  
想让草儿飞上天 ...

<2024年4月>
31123456
78910111213
14151617181920
21222324252627
2829301234
567891011

常用链接

留言簿

随笔分类

随笔档案

文章分类

文章档案

Hibernate

Oracle

搜索

  •  

最新评论

阅读排行榜

评论排行榜