Is the problem due to the data model/ I have not been working with this code for very long. I suspect that the originl data model had a single level of Categories. Then I suspect someone requested Sub-Categories. At least the little bit of code where I had to fix the problem was working through a loop of sub-categories. That's why I asked about my understanding before even asking about the code. If the application has to support Category hierarchies, of course the U/I needs to be upgraded to provide some visual representaton the preserves ordering between Categories and within Categories. Obviously my simple sort fix doesn't attempt to solve that kind of problem.
Thanks again for your help. Allen Gilliland-3 wrote: > > > > Terry Corbet wrote: >> >> Allen Gilliland-3 wrote: >>> >>> >>> Terry Corbet wrote: >>>> Three Items: >>>> >>>> 01. Do I have a conceptual mis-understanding concerning Categories? >>>> Wherever they appear in the U/I, my users think that they ought to >>>> appear >>>> in >>>> some sensible order. Granted the definition of sensible may take some >>>> thought, but shouldn't there me some configuration parameters and/or an >>>> administrative screen for controlling order of display? >>> yes, some ordering makes sense. I don't think anyone has ever suggested >>> that they want some ordering other than alphabetical so there has never >>> been a need for user control over ordering. >>> >>> >>>> 02. Ok, so, I do think it is important. Is that a problem I should >>>> have >>>> been able to solve through the Velocity Macro capability, or is it >>>> necessary >>>> to go into the code? If it is solvable via Velocity, I would >>>> appreciate >>>> any >>>> example code. >>> You'd have to fix that in the code. >>> >>> >>>> 03. Since I could not solve it at the Velocity Macro level, I have >>>> written >>>> and apparently successfully tested code to present Categories in >>>> alphabetical order. That was just the simplest 'reasonable order' >>>> solution. >>>> Actually, I suppose the correct solution would involve an 'ordering' >>>> field >>>> added to the Category class with a corresponding change to thye U/I >>>> form >>>> to >>>> capture that order as well as re-order when required. If anyone is >>>> interested, give a shout. >>> The code should already have been ordering the categories >>> alphabetically, so I'm not sure why that wouldn't have been happening. >>> What version are you using and how exactly are you getting the >>> categories listed on your page? >>> >>> 01. I am ashamed to admit that I am not at all sure I know what >>> versions I am using. I have been running what I believed to be the >>> latest 3.1 beta binary since the end of November, but the CHANGES.txt >>> file there just talks about 3.0. >>> 02. When I decided earlier this week that I was going to have to get >>> into the code, the massive changes to the Roller site were in >>> mid-stream, >>> and I'm pretty sure that the only source download I could find was >>> for 3.0. >>> 03. So, with egg on my face, I guess I am talking about 3.x. >>> 04. As to what I am displaying -- I have not made any sneaky changes >>> to any skins, so I am talking about the displays of Categories across >>> the >>> top of a page, or in the right panel where By-Category RSS feeds might >>> be obtained. And I am talking about the view you get as Blog owner >>> if you add or delete Categories. In all of those places, the order is >>> predominately, the order of Category creation. >>> 05. I first tried to find the SQL. I think I did. I think I >>> successfully >>> added an Order By clause using Hibernate's API, but it did not change >>> the views. >>> 06. My fix was to perform a Sort on the LinkedList that is created >>> in a piece of code that is evidently used by all those 'viewers' because >>> it changed the ordering at least on the top and in the admin view -- >>> I have not checked RSS feeds. > > > Okay, well I will plan to take a look into that next week when I have > time, but I agree that the ordering should be alphabetical. > > -- Allen > > >>> >>> Thanks for the feedback. >>> >>> >>> -- Allen >>> >>> >>> >> > > -- View this message in context: http://www.nabble.com/U-I-Category-Order-tf3126740s12275.html#a8670556 Sent from the Roller - User mailing list archive at Nabble.com.
