This archive contains answers to questions sent to Unidata support through mid-2025. Note that the archive is no longer being updated. We provide the archive for reference; many of the answers presented here remain technically correct, even if somewhat outdated. For the most up-to-date information on the use of NSF Unidata software and data services, please consult the Software Documentation first.
>From: "Paul Gifford" <address@hidden> >Organization: independent >Keywords: 200402090424.i194OFp1020301 Hi Paul- > I have CompositeDataChoices made up of DirectDataChoices. These are >displayed in tree fashion in the Fields column in the Data selector as they >should be. When I click on a composite node (displayed as a folder), the >Displays list if filled with every type of display possible. How do I make >that list empty? Right now I'm passing null for the category list for the >CompositeDataChoice constructor - I've tried lists with various items >contained (and an empty list) but nothing worked. A null DataCategory is the same as ANY. I guess we need a NONE. I'll look into that. What is the purpose of creating your CompositeData Choice? If it's just to group them all together, then you could use a DataCategory with the first group being for display only. This is what we do for the gridded data (i.e. 2D grids vs. 3D grids). So, your code would look something like: List firstCategories = DataCategory.parseCategories("Group1;2D-GRID"); List secondCategories = DataCategory.parseCategories("Group2;2D-GRID"); DataChoice choice = null; for (int i = 0; i < numThings; i++) { if (thing[i] == firstType) { choice = new DirectDataChoice(this, name, name, description, firstCategories); } else { choice = new DirectDataChoice(this, name, name, description, secondCategories); } (do something with choice) } or some such thing. ;-) By default, parseCategories will make the first category for display. If this is not clear, let me know. Don NOTE: All email exchanges with Unidata User Support are recorded in the Unidata inquiry tracking system and then made publically available through the web. If you do not want to have your interactions made available in this way, you must let us know in each email you send to us.