码迷,mamicode.com
首页 > Web开发 > 详细

jsp标签精华

时间:2016-09-03 16:32:00      阅读:152      评论:0      收藏:0      [点我收藏+]

标签:

<%@ taglib uri="/struts-tags" prefix="s" %>

<%@ taglib uri="http://java.sun.com/jsp/jstl/functions" prefix="fn" %>

<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>

 

<s:hidden id="size" name="beanList.size()" />

<s:iterator var="bean" value="beanList" status="st">

  <s:hidden name="beanList[%{#st.index}].id" />

  <s:hidden id="flag_%{#st.index}" name="beanList[%{#st.index}].flag" />

  <s:if test="#bean.isMust == 1">***</s:if>

  <s:if test="%{#bean.showType == ‘radio‘}">**</s:if>

  <s:iterator var="choice" value="#bean.choiceList" status="s">

    <s:if test="choice == ‘radio‘ ">**</s:if>

  <div id="q_${st.index}">${st.index+1}</div>

  <input  id="bean_${st.index}" type="hidden" value="radio" />

</s:iterator>

 

 

<c:if test="${fn:contains(type, ‘,‘)}" >

<c:set var="idList" scope="request" value="${fn:split(id, ‘,‘)}" />

<c:set var="typeList" scope="request" value="${fn:split(type, ‘,‘)}" />

<c:forEach items="${idList}" var="idBean" varStatus="s1">

  <c:forEach items="${typeList}" var="typeBean" varStatus="s2" >

    <c:if test="${s1.index == s2.index}">

      <c:choose>

        <c:when test="${typeBean == ‘pre‘}">**</c:when>

        <c:otherwise>**</c:otherwise>

      </c:choose>

    </c:if>

  <c:forEach>

<c:forEach>

 

jsp标签精华

标签:

原文地址:http://www.cnblogs.com/siv8/p/5837161.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!