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]