Forum Moderators: open
right now in my UI Screen it displays 2 rows.
Sample:
Invoice# LineItem# Paid Date
1 1 5/1/2004
1 2 5/3/2004
I just need the latest date to be displayed and in order for this to be done. I have to get the maximum date of the Invoice.
Invoice# LineItem# Paid Date
1 2 5/3/2004
any help will be appreciated thanks!
Java or javascript will do. Thanks!
public void loadCbiHistoryList(String id)
{
PersistenceStrategy strategy = getPersistenceFrameworkHelper().getStrategy("rview");
ArrayList bcsCbiHistoryList;
BcsCbiHistory[] bcsCbiHistory = null;
Query query = new Query(BcsCbiHistory.class);
query.getCriteria().propertyEquals( "contactId", id);
query.getCriteria().propertyEquals( "activityType", "P");
try {
bcsCbiHistoryList = getRepositoryManager().fetchMany( query, strategy );
bcsCbiHistory = new BcsCbiHistory[bcsCbiHistoryList.size()];
bcsCbiHistory = (BcsCbiHistory[])bcsCbiHistoryList.toArray(bcsCbiHistory);
setBcsCbiHistory(bcsCbiHistory);
}
catch ( PersistenceException e )
{
addErrorMessage("Problem trying to load user and vendor data! " + e);
}
}
This is how I display the values.
<DROPLET BEAN="Range">
<PARAM NAME="array" VALUE="bean:BcsCbiHistoryForm.bcsCbiHistoryList">
<PARAM NAME="sortProperties" VALUE="-cbiId -">
<PARAM NAME="howMany" VALUE="bean:BcsCbiHistoryForm.cbiHistoryCount">
<PARAM NAME="elementName" VALUE="bcscbihistory">
<OPARAM NAME="empty">
<TR><TD CLASS="pageTXT" COLSPAN="8" ALIGN="center">No Records Found.</TD></TR>
</OPARAM>
<OPARAM NAME="output">
<TR>
<TD CLASS="bcs_reportListItem"><A HREF="/admin/bcs/bcs_cbi_detail.jhtml" BEAN="BcsCbiHistoryForm.openCbiDetailPage">
<PARAM NAME="cbiId" VALUE="param:bcscbihistory.cbiId">
<VALUEOF PARAM="bcscbihistory.cbiId"> </VALUEOF></A></TD>
<TD CLASS="bcs_reportListItem"><VALUEOF PARAM="bcscbihistory.cbiCreationDtm" date="M/dd/yyyy"> </VALUEOF></TD>
<TD CLASS="bcs_reportListItem">$<VALUEOF PARAM="bcscbihistory.amountDue" number=#.00> </VALUEOF></TD>
<TD CLASS="bcs_reportListItem">$<VALUEOF PARAM="bcscbihistory.cbiPayments" number=#.00> </VALUEOF></TD>
<TD CLASS="bcs_reportListItem"><VALUEOF PARAM="bcscbihistory.paymentReceived" date="M/dd/yyyy"> </VALUEOF></TD>
<TD CLASS="bcs_reportListItem"><VALUEOF PARAM="bcscbihistory.cbiStatus"> </VALUEOF></TD>
</TR>
</OPARAM>
</DROPLET>
Thanks!