Struts2标签,伤不起!

这个页面大家看起来会是什么感觉?呵呵!

 

<%@ page language="java" contentType="text/html; charset=GBK" pageEncoding="UTF-8"%>
<%@ taglib prefix="s" uri="/struts-tags"%>
<script type="text/javascript">
<!--
function getList(pagenum) {
window.location.href="http://localhost/user/test.jspa?pagenum="+pagenum;
}
//-->
</script>
<s:set name="flag" value="0"/>
<s:set name="flag1" value="0"/>
<s:set name="flag2" value="0"/>
<s:if test="userInfoList[0].pager.pagecount <= 10">
<s:bean name="org.apache.struts2.util.Counter" id="counter">
<s:param name="first" value="1" />
<s:param name="last" value="userInfoList[0].pager.pagecount" />
<s:if test="userInfoList[0].pager.pagenum-1 < 1">上一页</s:if>
<s:else><a target="_self" href="javascript:getList('<s:property value="userInfoList[0].pager.pagenum-1"/>')">上一页</a></s:else>
<s:iterator>
<s:if test="%{userInfoList[0].pager.pagenum==(current-1)}">
<a class="jrj-cur" href="javascript:getList('<s:property/>')"><s:property/></a>
</s:if>
<s:else>
<a href="javascript:getList('<s:property/>')"><s:property/></a>
</s:else>
</s:iterator>
<s:if test="userInfoList[0].pager.pagenum+1 > userInfoList[0].pager.pagecount">下一页</s:if>
<s:else><a target="_self" href="javascript:getList('<s:property value="userInfoList[0].pager.pagenum+1"/>')">下一页</a></s:else>
</s:bean>
</s:if>
<s:else>
<s:bean name="org.apache.struts2.util.Counter" id="counter">
<s:param name="first" value="1" />
<s:param name="last" value="userInfoList[0].pager.pagecount" />
<s:if test="userInfoList[0].pager.pagenum-1 < 1">上一页</s:if>
<s:else><a target="_self" href="javascript:getList('<s:property value="userInfoList[0].pager.pagenum-1"/>')">上一页</a></s:else>
<s:iterator>
<s:if test="%{userInfoList[0].pager.pagenum < 7}">
<s:if test="(current-1) > 7 && (userInfoList[0].pager.pagecount-2) >= (current-1)">
<s:if test="#flag == 0">..</s:if>
<s:set name="flag" value="1"/>
</s:if>
<s:else>
<s:if test="%{userInfoList[0].pager.pagenum==(current-1)}">
<a class="jrj-cur" href="javascript:getList('<s:property/>')"><s:property/></a>
</s:if>
<s:else>
<a href="javascript:getList('<s:property/>')"><s:property/></a>
</s:else>
</s:else>
</s:if>
<s:elseif test="%{userInfoList[0].pager.pagenum >= 7 && (userInfoList[0].pager.pagecount-7) >= userInfoList[0].pager.pagenum}">
<s:if test="(current-1) > 2 && (userInfoList[0].pager.pagenum-2) > (current-1)">
<s:if test="#flag1 == 0">..</s:if>
<s:set name="flag1" value="1"/>
</s:if>
<s:elseif test="(current-1) > (userInfoList[0].pager.pagenum+2) && (userInfoList[0].pager.pagecount-2) >= (current-1)">
<s:if test="#flag2 == 0">..</s:if>
<s:set name="flag2" value="1"/>
</s:elseif>
<s:else>
<s:if test="%{userInfoList[0].pager.pagenum==(current-1)}">
<a class="jrj-cur" href="javascript:getList('<s:property/>')"><s:property/></a>
</s:if>
<s:else>
<a href="javascript:getList('<s:property/>')"><s:property/></a>
</s:else>
</s:else>
</s:elseif>
<s:else>
<s:if test="(current-1) > 2 && (userInfoList[0].pager.pagecount-7) >= (current-1)">
<s:if test="#flag1 == 0">..</s:if>
<s:set name="flag1" value="1"/>
</s:if>
<s:else>
<s:if test="%{userInfoList[0].pager.pagenum==(current-1)}">
<a class="jrj-cur" href="javascript:getList('<s:property/>')"><s:property/></a>
</s:if>
<s:else>
<a href="javascript:getList('<s:property/>')"><s:property/></a>
</s:else>
</s:else>
</s:else>
</s:iterator>
<s:if test="userInfoList[0].pager.pagenum+1 > userInfoList[0].pager.pagecount">下一页</s:if>
<s:else><a target="_self" href="javascript:getList('<s:property value="userInfoList[0].pager.pagenum+1"/>')">下一页</a></s:else>
</s:bean>
</s:else>

 

 

你可能感兴趣的:(java,html,编程,jsp)