Java Reference
In-Depth Information
Browser
/ContactList.action
ContactListActionBean.java
String LIST="/WEB-INF/jsp/contact_list.jsp";
@DefaultHandler
public Resolution list() {
return new ForwardResolution(LIST);
}
public List<Contact> getContacts()
contact_list.jsp
<table>
...
<c:forEach items="${actionBean.contacts}" ...>
...
</table>
Figure 3.2: Displaying the contact list
In contact_list.jsp , we can now use <d:table> and <d:column> from Dis-
play Tag to render the table of contacts:
Download email_02/web/WEB-INF/jsp/contact_list.jsp
<%@include file="/WEB-INF/jsp/common/taglibs.jsp"%>
<s:layout-render name="/WEB-INF/jsp/common/layout_main.jsp"
title="Contact List">
<s:layout-component name="body">
<d:table name="${actionBean.contacts}" id="contact" requestURI=""
defaultsort="1">
<d:column title="Last name" property="lastName"
sortable="true"/>
<d:column title="First name" property="firstName"
sortable="true"/>
<d:column title="Email" property="email" sortable="true"/>
</d:table>
</s:layout-component>
</s:layout-render>
 
 
Search WWH ::




Custom Search