Hi
I have the following sample code; just trying out the displaytag-1.0
code base.. with the example below it shows the message 'Nothing found
to display'. What am I doing wrong? At the bottom I have included the
relevant output logs for the displayTag. Any suggestions would be
appreciated.
<%@ page language="java"%>
<%@ page import="java.util.*"%>
<%@ taglib uri="/tags/struts-bean" prefix="bean"%>
<%@ taglib uri="/tags/struts-html" prefix="html"%>
<%@ taglib uri="/tags/displaytag" prefix="display"%>
<%
List testData = new ArrayList();
Map map1 = new TreeMap();
map1.put( "id", "1" );
map1.put( "firstName", "PersonA" );
map1.put( "lastName", "PersonALastName" );
testData.add( map1 );
Map map2 = new TreeMap();
map2.put( "id", "2" );
map2.put( "firstName", "PersonB" );
map2.put( "lastName", "PersonBLastName" );
testData.add( map2 );
session.setAttribute( "testdata", testData ); %>
<html>
<head>
<title>JSP form</title>
</head>
<body>
<html:form action="/viewNotifierList">
<display:table name="testdata">
</display:table>
<br>
<html:submit/><html:cancel/>
</html:form>
</body>
</html>
4952421 [ApplicationServerThread] DEBUG
org.displaytag.properties.TableProperties - Was not able to load a
custom displaytag.properties; Can't find bundle for base name
displaytag, locale en_CA
4952421 [ApplicationServerThread] INFO
org.displaytag.export.ExportViewFactory - Initializing
ExportViewFactory with type={csv,excel,xml,pdf}
4952441 [ApplicationServerThread] DEBUG
org.displaytag.export.ExportViewFactory - ExportView for csv media
added: org.displaytag.export.CsvView
4952451 [ApplicationServerThread] DEBUG
org.displaytag.export.ExportViewFactory - ExportView for excel media
added: org.displaytag.export.ExcelView
4952451 [ApplicationServerThread] DEBUG
org.displaytag.export.ExportViewFactory - ExportView for xml media
added: org.displaytag.export.XmlView
4952461 [ApplicationServerThread] WARN
org.displaytag.export.ExportViewFactory - Unable to instantiate class
for pdf export. org.displaytag.export.PdfView was found, but required
libraries are missing: com/lowagie/text/Element
4952461 [ApplicationServerThread] DEBUG org.displaytag.tags.TableTag -
[null] doStartTag called
4952461 [ApplicationServerThread] DEBUG
org.displaytag.properties.TableProperties - Was not able to load a
custom displaytag.properties; Can't find bundle for base name
displaytag, locale en_CA
4952471 [ApplicationServerThread] INFO
org.displaytag.properties.TableProperties - No LocaleResolver configured.
4952501 [ApplicationServerThread] DEBUG org.displaytag.util.LookupUtil
- getBeanValue - bean: {testdata}
4952501 [ApplicationServerThread] DEBUG org.displaytag.tags.TableTag -
[null] setting media [html] in this.pageContext
4952501 [ApplicationServerThread] DEBUG org.displaytag.tags.TableTag -
[null] doIteration called
4952501 [ApplicationServerThread] DEBUG org.displaytag.tags.TableTag -
[null] doIteration() - iterator ended after 0 rows
4952501 [ApplicationServerThread] DEBUG org.displaytag.tags.TableTag -
[null] doAfterBody called - iterating on row 1
4952501 [ApplicationServerThread] DEBUG org.displaytag.tags.TableTag -
[null] doIteration called
4952501 [ApplicationServerThread] DEBUG org.displaytag.tags.TableTag -
[null] doIteration() - iterator ended after 1 rows
4952501 [ApplicationServerThread] DEBUG org.displaytag.tags.TableTag -
[null] doEndTag called
4952511 [ApplicationServerThread] DEBUG org.displaytag.model.TableModel
- [null] sorting page list
4952511 [ApplicationServerThread] DEBUG org.displaytag.tags.TableTag -
[null] getHTMLData called for table [null]
4952511 [ApplicationServerThread] DEBUG org.displaytag.tags.TableTag -
[null] doEndTag - end
<%@ page language="java"%>
<%@ page import="java.util.*"%>
<%@ taglib uri="/tags/struts-bean" prefix="bean"%>
<%@ taglib uri="/tags/struts-html" prefix="html"%>
<%@ taglib uri="/tags/displaytag" prefix="display"%>
<%
List testData = new ArrayList();
Map map1 = new TreeMap();
map1.put( "id", "1" );
map1.put( "firstName", "Reg" );
map1.put( "lastName", "Sherwood" );
testData.add( map1 );
Map map2 = new TreeMap();
map2.put( "id", "2" );
map2.put( "firstName", "Reg" );
map2.put( "lastName", "Sherwood" );
testData.add( map2 );
session.setAttribute( "testdata", testData ); %>
<html>
<head>
<title>JSP for NotifierListForm form</title>
</head>
<body>
<html:form action="/viewNotifierList">
<display:table name="testdata">
</display:table> <br>
<html:submit/><html:cancel/>
</html:form>
</body>
</html>
-------------------------------------------------------------------------
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
_______________________________________________
displaytag-user mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/displaytag-user