Not quite. I am putting things together in two separate operations, the titles in one, and the results of the query in another (using addQuery). The results are being displayed in a different order from the titles. Bottom line, they are not getting put together in a consistent order in the Model. So the JSP has absolutely no chance to deal with it.
One approach I am looking at is since the "columns" are put into the "rows" by Column (or Field) name, and the JSP has access to this from the Titles (which are also put in the Output by Field Name) was to have the JSP pull stuff out by field name. This would also allow for the user to be able to select the order the columns were displayed in later, especially when implementing via a GUI client.
Regards, Steve
Michael Nash JGlobal.com wrote:
Phil:
You're right that DefaultPersistentMetadata won't preserve order of fields, but I'm not sure that's the problem that Steve is seeing. Correct me if I'm wrong, Steve, but it sounds like what you're saying is that you're putting things together in the order you want them in the Model, but not getting them out in that order on the JSP page?
Mike
On 01 Oct 2003 13:47:10 -0400 Philip J Brown <[EMAIL PROTECTED]> wrote:
Mike (and others),
The DefaultPersistentMetadata class uses HashSet, TreeSet, HashMap and TreeMap to store values internally. None of these collections maintain the elements in the same order that they were returned.
There are (as of jdk 1.4) LinkedHashMap and LinkedHashSet classes that do preserve the order in which elements were added.
Changing this class (and possibly other related classes) to use these "linked" version of the set and map classes may fix the problem.
Hope this helps.
-Phi
-- Java/J2EE Developer/Integrator Co-Chair, Dallas/FortWorth J2EE Sig 214-724-7741
http://keelframework.org/documentation Keelgroup mailing list [EMAIL PROTECTED] http://lists.keelframework.com/listinfo.cgi/keelgroup-keelframework.com
