Hi Reg,

I've found that you need to put a scope in the name property, like the
following(in your case):

<display:table name="sessionScope.testdata">
</display:table>

you can also use request scope:

<display:table name="requestScope.testdata">
</display:table>

I notice though that it doesn't work (either session or request scope)
when returning a spring MVC ModelAndView object.  If anyone on the dev
team could comment? ie.

Map model = new Map();
List testdata = new ArrayList();
... put some items here 
model.put("testdata", testdata);
return new ModelAndView("test.jsp", model);

thanks!
Fred

-----Original Message-----
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of Reg
Sherwood
Sent: 22 August 2006 20:48
To: displaytag-user@lists.sourceforge.net
Subject: [displaytag-user] display-tag - nothing found to display

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
displaytag-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/displaytag-user
_____________________________________________________________

This email (including any attachments to it) is confidential, legally 
privileged, subject to copyright and is sent for the personal attention of the 
intended recipient only. If you have received this email in error, please 
advise us immediately and delete it. You are notified that disclosing, copying, 
distributing or taking any action in reliance on the contents of this 
information is strictly prohibited. Although we have taken reasonable 
precautions to ensure no viruses are present in this email, we cannot accept 
responsibility for any loss or damage arising from the viruses in this email or 
attachments. We exclude any liability for the content of this email, or for the 
consequences of any actions taken on the basis of the information provided in 
this email or its attachments, unless that information is subsequently 
confirmed in writing. If this email contains an offer, that should be 
considered as an invitation to treat.
_____________________________________________________________

-------------------------------------------------------------------------
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
displaytag-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/displaytag-user

Reply via email to