Sandeep,
thanks for the reply. I have done the following to try and rectify the
problem. The LogItem class was declaring public class variables. I changed
these to private and provided public getter/setter methods. I changed the
<html:form> tag to use action="/showLogs.do". I have looked at the html
source (see below). Everything looks OK but I still receive the same result
ie 20 rows of blank data. I am getting the feeling I am missing something
really obvious here. I have even tried placing the form, LogsForm, into
session scope without any luck.
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html:html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
<meta name="GENERATOR" content="IBM WebSphere Studio">
<title>showLogs.jsp</title>
</head>
<body>
<p>Place showLogs.jsp's content here.</p>
<form name="logsForm" method="post" action="/BPayWeb/showLogs.do">
<table border="1">
<tbody>
<tr>
<td>auditDate= <bean:write name="logs"
property="auditDate" /> </td>
<td>user name= <bean:write name="logs"
property="userName" /> </td>
</tr>
<tr>
<td>auditDate= <bean:write name="logs"
property="auditDate" /> </td>
<td>user name= <bean:write name="logs"
property="userName" /> </td>
</tr>
<tr>
<td>auditDate= <bean:write name="logs"
property="auditDate" /> </td>
<td>user name= <bean:write name="logs"
property="userName" /> </td>
</tr>
<tr>
<td>auditDate= <bean:write name="logs"
property="auditDate" /> </td>
<td>user name= <bean:write name="logs"
property="userName" /> </td>
</tr>
<tr>
<td>auditDate= <bean:write name="logs"
property="auditDate" /> </td>
<td>user name= <bean:write name="logs"
property="userName" /> </td>
</tr>
<tr>
<td>auditDate= <bean:write name="logs"
property="auditDate" /> </td>
<td>user name= <bean:write name="logs"
property="userName" /> </td>
</tr>
<tr>
<td>auditDate= <bean:write name="logs"
property="auditDate" /> </td>
<td>user name= <bean:write name="logs"
property="userName" /> </td>
</tr>
<tr>
<td>auditDate= <bean:write name="logs"
property="auditDate" /> </td>
<td>user name= <bean:write name="logs"
property="userName" /> </td>
</tr>
<tr>
<td>auditDate= <bean:write name="logs"
property="auditDate" /> </td>
<td>user name= <bean:write name="logs"
property="userName" /> </td>
</tr>
<tr>
<td>auditDate= <bean:write name="logs"
property="auditDate" /> </td>
<td>user name= <bean:write name="logs"
property="userName" /> </td>
</tr>
<tr>
<td>auditDate= <bean:write name="logs"
property="auditDate" /> </td>
<td>user name= <bean:write name="logs"
property="userName" /> </td>
</tr>
<tr>
<td>auditDate= <bean:write name="logs"
property="auditDate" /> </td>
<td>user name= <bean:write name="logs"
property="userName" /> </td>
</tr>
<tr>
<td>auditDate= <bean:write name="logs"
property="auditDate" /> </td>
<td>user name= <bean:write name="logs"
property="userName" /> </td>
</tr>
<tr>
<td>auditDate= <bean:write name="logs"
property="auditDate" /> </td>
<td>user name= <bean:write name="logs"
property="userName" /> </td>
</tr>
<tr>
<td>auditDate= <bean:write name="logs"
property="auditDate" /> </td>
<td>user name= <bean:write name="logs"
property="userName" /> </td>
</tr>
<tr>
<td>auditDate= <bean:write name="logs"
property="auditDate" /> </td>
<td>user name= <bean:write name="logs"
property="userName" /> </td>
</tr>
<tr>
<td>auditDate= <bean:write name="logs"
property="auditDate" /> </td>
<td>user name= <bean:write name="logs"
property="userName" /> </td>
</tr>
<tr>
<td>auditDate= <bean:write name="logs"
property="auditDate" /> </td>
<td>user name= <bean:write name="logs"
property="userName" /> </td>
</tr>
<tr>
<td>auditDate= <bean:write name="logs"
property="auditDate" /> </td>
<td>user name= <bean:write name="logs"
property="userName" /> </td>
</tr>
<tr>
<td>auditDate= <bean:write name="logs"
property="auditDate" /> </td>
<td>user name= <bean:write name="logs"
property="userName" /> </td>
</tr>
</tbody>
</table>
</form>
</body>
</html:html>
Ralph
-----Original Message-----
From: Sandeep Takhar [mailto:[EMAIL PROTECTED]
Sent: Tuesday, 17 June 2003 9:25 PM
To: Struts Users Mailing List
Subject: Re: logic:iterate displaying blanks
I think you want to do a
html:form action="/showLogs.do" ?
also, check to see what your html source is for this
form line and verify that it is using the "name"
element from your struts-config.
sandeep
--- RALPH ROPER <[EMAIL PROTECTED]> wrote:
> hi,
>
> I had a good search on the user group and could not
> find any answer for this
> one. I have a DispatchAction class, called
> ShowLogsAction that goes away and
> returns a list of LogItem items. All the properties
> on LogItem are public eg
> public String auditDate
>
> ShowLogsAction
> <snippet>
> System.out.println("Entering ShowLogAction");
>
> ValueListHandler listHandler = new
> LogListHandler();
>
> DynaActionForm logForm = (DynaActionForm) form;
>
> List logs = listHandler.getNextElements(20);
> ArrayList logList = new ArrayList();
> for(Iterator i = logs.iterator(); i.hasNext();){
> LogItem log = (LogItem) i.next();
> System.out.println("action date=" +
> log.auditDate);
> logList.add(log);
> }
>
>
> logForm.set("logList", logList);
> </snippet>
>
> I have iterated through the Collection again in the
> action just to make sure
> the values are being returned. Everything looks OK
> to this point.
>
> In my jsp, showLogs.jsp, I then iterate over the
> Collection and print the
> date and and userNaem properties of the LogItem in
> the Collection. This is
> done as so.
>
> showLogs.jsp
> <snippet>
>
> <% String forward = "/showLogs"; %>
> <html:form action="<%= forward %>" >
>
> <TABLE border="1">
> <TBODY>
>
> <logic:iterate id="logs" name="logsForm"
> property="logList"
> scope="request"
> type="com.cuscal.payments.bpay.enquiry.LogItem">
> <TR>
> <TD>auditDate= <bean:write name="logs"
> property="auditDate" /> </TD>
> <TD>user name= <bean:write name="logs"
> property="userName" /> </TD>
> </TR>
> </logic:iterate>
> </TBODY>
> </TABLE>
>
> </html:form>
>
> </snippet>
>
> While I get 20 rows back they are all blank. This is
> the result.
> auditDate= user name=
> auditDate= user name=
> auditDate= user name=
> auditDate= user name=
> auditDate= user name=
> auditDate= user name=
> auditDate= user name=
> auditDate= user name=
> auditDate= user name=
> auditDate= user name=
> auditDate= user name=
> auditDate= user name=
> auditDate= user name=
> auditDate= user name=
> auditDate= user name=
> auditDate= user name=
> auditDate= user name=
> auditDate= user name=
> auditDate= user name=
> auditDate= user name=
>
> Obviously this has caused me hours of amusement. Can
> anyone think why this
> would be producing such a result? All suggestions
> gratefully appreciated.
>
> Ralph Roper
>
>
>
________________________________________________________
> NOTICE
> The information in this email and or any of the
> attachments may contain;
> a. Confidential information of Credit Union Services
> Corporation (Australia) Limited (CUSCAL) or third
> parties; and or
> b. Legally privileged information of CUSCAL or third
> parties; and or
> c. Copyright material of CUSCAL or third parties.
> If you are not an authorised recipient of this
> email, please contact CUSCAL immediately by return
> email or by telephone on 61-2-8299 9000 and delete
> the email from your system.
> We do not accept any liability in connection with
> computer virus, data corruption, interruption or any
> damage generally as a result of transmission of this
> email.
>
>
---------------------------------------------------------------------
> To unsubscribe, e-mail:
> [EMAIL PROTECTED]
> For additional commands, e-mail:
> [EMAIL PROTECTED]
>
__________________________________
Do you Yahoo!?
SBC Yahoo! DSL - Now only $29.95 per month!
http://sbc.yahoo.com
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
________________________________________________________
NOTICE
The information in this email and or any of the attachments may contain;
a. Confidential information of Credit Union Services Corporation (Australia) Limited
(CUSCAL) or third parties; and or
b. Legally privileged information of CUSCAL or third parties; and or
c. Copyright material of CUSCAL or third parties.
If you are not an authorised recipient of this email, please contact CUSCAL
immediately by return email or by telephone on 61-2-8299 9000 and delete the email
from your system.
We do not accept any liability in connection with computer virus, data corruption,
interruption or any damage generally as a result of transmission of this email.
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]