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>
Tree Wrap:
<%@ 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>
Now every sub task is displayed below it’s parent. I nedd some left pading on every child row(like a tree):
-parent row
-child row
-child row
-child chuld row
-child row
How can I achieve this?
If you do a View Source, you should be able to see the class names or ids for the various HTML elements on the form. Use these in css to define the characteristics you’d like to achieve.