My favorites | Sign in
Project Home Downloads Wiki Issues Source
READ-ONLY: This project has been archived. For more information see this post.
Search
for
  Advanced search   Search tips   Subscriptions

Issue 187 attachment: test.jsp (1.5 KB)

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
<%@ taglib uri="http://code.google.com/p/jmesa" prefix="jmesa"%>

<html>
<head>
<title>Jmesa test</title>
<link rel="stylesheet" type="text/css" href="include/jmesa.css" />
<script type="text/javascript" src="include/jquery.js"></script>
<script type="text/javascript" src="include/jmesa.js"></script>
<script type="text/javascript" src="include/jquery.jmesa.js"></script>
<script language="javascript">
onInvokeAction = function(id, action) {
var parameterString = createParameterStringForLimit(id);
location.href = "test.jsp?" + parameterString;
}
</script>
</head>
<body>
<%!
public class Foo {
private Integer id;
private Bar bar;

public Foo(Integer id, Bar bar) {
this.id = id;
this.bar = bar;
}

public Integer getAid() { return this.id; }
public Bar getBar() { return this.bar; }
}

public class Bar {
public Bar(String name) { this.name = name; }
private String name;
public String getName() { return this.name; }
}
%>

<%
java.util.ArrayList items = new java.util.ArrayList();
items.add(new Foo(1, null));
items.add(new Foo(2, new Bar("Wayne Liu")));
pageContext.setAttribute("items", items);
%>

<jmesa:tableFacade id="fooTable"
items="${items}"
stateAttr="restore"
var="foo">

<jmesa:htmlTable width="100%">
<jmesa:htmlRow highlighter="true">
<jmesa:htmlColumn property="aid" title="id" />
<jmesa:htmlColumn property="bar.name" title="name" />
</jmesa:htmlRow>
</jmesa:htmlTable>
</jmesa:tableFacade>
</body>
</html>
Powered by Google Project Hosting