/[volute]/trunk/projects/theory/snapdm/webapp/simdb-browser/web/list/ListEmbeddable.jsp
ViewVC logotype

Contents of /trunk/projects/theory/snapdm/webapp/simdb-browser/web/list/ListEmbeddable.jsp

Parent Directory Parent Directory | Revision Log Revision Log


Revision 680 - (show annotations)
Wed Jul 9 22:05:49 2008 UTC (12 years, 4 months ago) by bourges.laurent
File size: 2108 byte(s)
many new tags to get meta, display references & collections using listGeneric.jsp
1 <%@page contentType="text/html" session="false" pageEncoding="UTF-8"%>
2 <%@taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>
3 <%@ taglib tagdir="/WEB-INF/tags" prefix="x" %>
4
5 <c:set var="list" value="${requestScope.list}" ></c:set>
6 <c:set var="meta" value="${requestScope.metaData}" ></c:set>
7
8 <c:if test="${! empty list}">
9
10 <table border="1" cellspacing="0" cellpadding="4" width="100%">
11 <tr>
12 <%-- get headers (attributes and references with multiplicity = 1 from meta object : --%>
13
14 <c:forEach var="entry" begin="0" items="${meta.attributeList}">
15 <c:if test="${entry.name eq 'identity' or entry.multiplicity eq '1'}">
16 <th><span class="tooltipTrigger" title="&lt;h4&gt;${entry.name}&lt;/h4&gt;${entry.description}">${entry.name}</span></th>
17 </c:if>
18 </c:forEach>
19
20 <c:if test="${! empty meta.references}">
21
22 <c:forEach var="entry" begin="0" items="${meta.referenceList}">
23 <c:if test="${entry.multiplicity eq '1'}">
24 <th><span class="tooltipTrigger" title="&lt;h4&gt;${entry.name}&lt;/h4&gt;${entry.description}">${entry.name}</span></th>
25 </c:if>
26 </c:forEach>
27
28 </c:if>
29
30 </tr>
31 <%-- get data from item list : --%>
32 <c:forEach var="item" begin="0" items="${list}">
33 <tr>
34 <%-- process an item from the list : --%>
35
36 <c:forEach var="entry" begin="0" items="${meta.attributeList}">
37 <c:if test="${entry.name eq 'identity' or entry.multiplicity eq '1'}">
38 <td>
39 <a href="Show.do?entity=${item.className}&id=${item.id}" title="show ${item.className}">
40 <x:getProperty item="${item}" name="${entry.name}" var="value">${value}</x:getProperty>
41 </a>
42 </td>
43 </c:if>
44 </c:forEach>
45
46 <c:if test="${! empty meta.references}">
47
48 <c:forEach var="entry" begin="0" items="${meta.referenceList}">
49 <c:if test="${entry.multiplicity eq '1'}">
50 <td>
51 <x:getProperty item="${item}" name="${entry.name}" var="ref">
52 <a href="Show.do?entity=${ref.className}&id=${ref.id}" title="show ${ref.className}">
53 <x:showRef ref="${ref}"/>
54 </a>
55 </x:getProperty>
56 </td>
57 </c:if>
58 </c:forEach>
59
60 </c:if>
61
62 </tr>
63 </c:forEach>
64 </table>
65 </c:if>

msdemlei@ari.uni-heidelberg.de
ViewVC Help
Powered by ViewVC 1.1.26