-
1. Re: Can you make List<String, List<String>> work with rich:t
nbelaevski Jul 13, 2009 6:20 AM (in response to meghiddo)This won't compile at all.
-
2. Re: Can you make List<String, List<String>> work with rich:t
meghiddo Jul 13, 2009 2:49 PM (in response to meghiddo)yeah I was just going for quickness there, not really code that worked - how about this:
Map<String, List<String>> devicesAndChannels = new HashMap<String, List<String>>();
Can I bind this map variable to a recursiveTreeNodesAdaptor, and have the initial String values displayed, and under each one have the List of Strings displayed that belongs to it? -
3. Re: Can you make List<String, List<String>> work with rich:t
meghiddo Jul 14, 2009 4:33 AM (in response to meghiddo)a quick yes or no is all I need
-
4. Re: Can you make List<String, List<String>> work with rich:t
nbelaevski Jul 14, 2009 5:33 AM (in response to meghiddo)This could work, but I'd highly recommend to restructurize it, because map key is used as row key for tree items and you can have problems with row keys containing spaces or national alphabet symbols.
-
5. Re: Can you make List<String, List<String>> work with rich:t
meghiddo Jul 14, 2009 3:15 PM (in response to meghiddo)Hmmm, I really don't know how to do this then. I have a List of devices, thats no problem, but under each individual device is a list of channels. I cant just make a List of channels for each device (channelList1, channelList2, etc) because the number of devices is always different.
Anyone have recommendations on how I can handle this? -
6. Re: Can you make List<String, List<String>> work with rich:t
nbelaevski Jul 14, 2009 4:55 PM (in response to meghiddo)"Meghiddo" wrote:
I cant just make a List of channels for each device (channelList1, channelList2, etc) because the number of devices is always different.
Why can't you do this? -
7. Re: Can you make List<String, List<String>> work with rich:t
meghiddo Jul 14, 2009 6:29 PM (in response to meghiddo)because there will be many projects, each with a different amount of devices, anywhere from 0-100 devices. So I could make the channelsList1, 2, 3, etc for a project that I know how many devices there will be, but then the next project will have a different amount of devices, and there will either be too many or too few channels Lists for that subsequent Object
Unless there is a way to dynamically create channel Lists depending on how many devices there are for each Object. But then how would I bind that to the rich:tree correctly? It doesnt seem like a solution that will work, there will never be the same number of devices Object to Object, so I would never know how many channelLists I would need. -
8. Re: Can you make List<String, List<String>> work with rich:t
nbelaevski Jul 14, 2009 6:36 PM (in response to meghiddo)Sorry, I haven't got your point. What's wrong in making project contain list of devices?
-
9. Re: Can you make List<String, List<String>> work with rich:t
meghiddo Jul 14, 2009 7:49 PM (in response to meghiddo)thats not the problem, I already do that actually. It is just that every device in the List also has a List of channels.
So it goes
project
-device
--channel
-device
--channel
-etc
and there can be any amount of devices and channels, it changes all the time. So I have a String variable for projectName, and a List for devices, but I need a data type that will hold the channels, and show ownership between device and channel, and that I can use with rich:tree. If I just do one List for channels it will hold all the channels for all the devices and show no ownership.
I can do multiple channel lists for each device, but the number of channel Lists needed changes all the time so it has to be dynamic. -
10. Re: Can you make List<String, List<String>> work with rich:t
nbelaevski Jul 15, 2009 5:17 AM (in response to meghiddo)Ok, create such data type. EL expressions don't depend on type, they'll work with any one.
-
11. Re: Can you make List<String, List<String>> work with rich:t
meghiddo Jul 15, 2009 2:19 PM (in response to meghiddo)So your saying I should go ahead with:
Map<String, List<String>> devicesAndChannels = new HashMap<String, List<String>>();
right? -
12. Re: Can you make List<String, List<String>> work with rich:t
nbelaevski Jul 15, 2009 6:48 PM (in response to meghiddo)No, I don't. Create data type.
-
13. Re: Can you make List<String, List<String>> work with rich:t
meghiddo Jul 15, 2009 11:15 PM (in response to meghiddo)Hmm, Im not sure what your meaning here
-
14. Re: Can you make List<String, List<String>> work with rich:t
nbelaevski Jul 16, 2009 5:34 AM (in response to meghiddo)I meant create special type to hold your data.