Hi there,
Presently I am working on a customization which deals with contextual positioning of a content item. With this comes some channel organization that specifies what goes in which order. This project is at a rudimentry phase and all channels related to it, are new - as such they are already in our desired 'natural order'
The problem (which we are not fancing yet but will eventually arise) is that because "Channel.getAllSubchannels();" is used - what is returned is the VCM's 'natural order' aka GUID driven resultset.
Ideally we would like to sort via the channel name.
Now - retreiving the name, comparing it, etc.. is not inherently difficult but upon doing so using vanilla java ( Arrays.sort(subchannelArray), for example ) -- "does something" to the system were as the classic albeit useless "This Component has encountered an error" is returned.
Regarding the vanilla abstract use of the Arrays class - unfortunately the logs I have seen do not record what the error is so I am in the dark in terms of why that is not working.
What is the vetted approach to doing this? Should I be using RequestParameters arguments? If so - I have not come across an example of use of the RequestParameteres class so any help in terms of best approach is very welcome. Or should I be using the Collections class w/ a Comparator argument.
Time is of the essence so I have not pursued the Collections + Comparator avenue yet. I'd like to find something native to the Vignette VCM API if possible.
Thank you in advance.
example of channel structure:
Original :
CHANNEL-|
- Sub chan 1
- Sub chan 2
- Sub chan 3
then an additional channel gets added:
CHANNEL
-Sub Chan 1
-Sub Chan 1.5 ( new one )
- Sub Chan 2
- Sub Chan 3
So when you use "getAllSubchannels()" on this - it returns this as the order:
Sub 1
Sub 2
Sub 3
Sub 1.5
-- this is of course the DB natural order. How would I build a RequestParameter argument to accomplish ordering via name ? If it's beyond the Vignette VCM API - please advise.
Thanks!