English 中文(简体)
树形表格jsp 自定义标签
原标题:Tree table jsp custom tag

I have this custom JSP tag that implements tree table(every task can have sub-tasks): Tree:

<%@ tag language="java" pageEncoding="ISO-8859-1"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>
<%@ taglib prefix="fn" uri="http://java.sun.com/jsp/jstl/functions"%>
<%@ taglib prefix="h" tagdir="/WEB-INF/tags"%>
<%@ attribute name="tasks" type="java.util.List" required="true"%>


<c:forEach items="${tasks}" var="t">
            <tr>
                <td><c:out value="${t.id}"></c:out></td>
                <td><c:out value="${t.name}"></c:out></td>
                <td><c:out value="${t.description}"></c:out></td>
                <td><c:out value="${t.deadline}"></c:out></td>
            </tr>
    <c:if test="${fn:length(t.subtasks) > 0}">
        <h:tree tasks="${t.subtasks}"/>
    </c:if>
</c:forEach>

树环 :

<%@ tag language="java" pageEncoding="ISO-8859-1"%>
<%@ taglib prefix="h" tagdir="/WEB-INF/tags"%>
<%@ attribute name="tasks" type="java.util.List" required="true"%>
<table>
    <h:tree tasks="${tasks}"></h:tree>
</table>

现在每个子任务都显示在它的父母下面。 我在每个子行( 如一棵树 ) 的左垫子上加了 :

-parent row
  -child row
  -child row
    -child chuld row
  -child row

我如何才能做到这一点?

最佳回答

如果您做了一个视图源, 您应该能看到窗体上各种 HTML 元素的类名或代号。 使用 css 中的这些代号来定义您想要达到的特性 。

问题回答

暂无回答




相关问题
CSS working only in Firefox

I am trying to create a search text-field like on the Apple website. The HTML looks like this: <div class="frm-search"> <div> <input class="btn" type="image" src="http://www....

image changed but appears the same in browser

I m writing a php script to crop an image. The script overwrites the old image with the new one, but when I reload the page (which is supposed to pickup the new image) I still see the old one. ...

Firefox background image horizontal centering oddity

I am building some basic HTML code for a CMS. One of the page-related options in the CMS is "background image" and "stretch page width / height to background image width / height." so that with large ...

Separator line in ASP.NET

I d like to add a simple separator line in an aspx web form. Does anyone know how? It sounds easy enough, but still I can t manage to find how to do it.. 10x!

热门标签