I have create a Jira issue here:

https://issues.apache.org/jira/browse/OFBIZ-1723

Included is code to allow you to create a ftl/widget based screen to allow
users to move through an arbitrary ordered list using next and previous
buttons.

This code creates a self-referencing hash table.  The entries are removed on
a timer after 5 minutes and the class is garbage collected.  It would be way
nicer to be able to have a listener on the servlet controller so that when
the user moved to a different url base, the container could kill itself.
Alas, I can find no such interface and would love to hear from someone that
knows of a way to do this.  Fortunately, the unused overhead is under a
hundred bytes and only hangs around for 5 minutes.

This could be improved on very large tables on some DBs using a binary
search in find() instead of the current sequential one.  However, the last()
call required to determine the size reads the entire table on some DBs, so I
didn't think it prudent, and the time consumption on a 10k record table is
more than adequately small in my testing.

The code likely has some tabs in it and does have the opening { on the next
line unlike the ofbiz guidelines, but it is still entirely functional as
well as easier to me to read.

Skip


No virus found in this outgoing message.
Checked by AVG.
Version: 7.5.519 / Virus Database: 269.21.8/1339 - Release Date: 3/22/2008
4:43 PM

Reply via email to