FYI. I opened a ticket with CA support and was told this morning that the only way to "update" a list is to delete it and make a new one. So once you make your enumerated list, it's set. So if you plan on having values that change often it's prob better to just make it a string and type them in yourself.
--- Jon Whitehouse Systems Engineer - IT, Server Support MS 5221 1800 W. Center Street Warsaw, IN 46580 (574) 371-8684 (574) 377-2829 (cell) [email protected] -----Original Message----- From: Donavan Pantke [mailto:[email protected]] Sent: Thursday, February 12, 2009 12:34 PM To: spectrum Subject: Re: [spectrum] Customizing - Drop downs Jon Whitehouse wrote: > > That seems to have fixed it. Last question... If I decide later to add > to the Enumeration list, can I do this? Or would I have to go and > recreate a new atttribute each time with the values to add one? > I'd test it just to be sure, but you should be able to update an attribute's enumeration list without deleting and recreating the attribute. However, you may not want to have to down your SS just to add new enumerations. There is a way to do this. All an enumeration is a integer value with a mapping of numbers to text. The EnumeratedAttrRenderer basically gathers that mapping from the attribute itself. However, you can directly input the map to OneClick instead of relying on what the attribute has configured. You do this via a <select> tag. Here's how that implementation would look like: <column> <name>Production Status</name> <content> <attribute>0x0584001a</attribute> <select> <case> <match>0</match> <yeild>Development</yield> </case> <case> <match>1</match> <yield>Production</yield> </case> <case> <match>2</match> <yield>QA</yield> </case> <case> <match>3</match> <yield>Sandbox</yield> </case> </select> </content> </column> This gives you the exact same behavior as an enumerated attribute (drop down and all), with the added advantage that if you need to update the enumeration list, you just add the extra enumerations to the XML and roll your OneClick client and you're done. The only downside to this approach is that other tools, such as AlarmNotifier, the CLI interface, CORBA, etc... don't read the OneClick XML files, and so the enumeration won't get resolved in those tools (the attribute will just who it's numeric value). Of course, if you're using scripts to read this stuff, you can just input your mapping into those scripts and get the same result. So either of these approaches is just fine. I normally prefer the OneClick select route over flat enumerations unless I intend on handing out my customizations, or if I want the enumeration globally. Which method you wan to use all depends on your needs. If you aren't going to update this attribute's enumerations often, if at all, adding the enumeration directly to the attribute is probably the best way to go. If you modify the enmeration list frequently, you probably want the select route since you don't have to drop your SS to make the changes. Hope this helps! Donavan > > > > --- > /Jon Whitehouse/ > /Systems Engineer - IT, Server Support/ > /MS 5221/ > /1800 W. Center Street/ > /Warsaw, IN 46580/ > /(574) 371-8684/ > /(574) 377-2829 (cell)/ > /[email protected]/ <mailto:[email protected]> > > > > ---- > > > > It looks like you didn't configure your attribute correctly. From what > I see, when you created your attribute, you specified "List of Values" > instead of "Single Value". You'll want to delete your attribute and > recreate it as a Single Value, type Enumeration, and you should be OK. > > > > List attributes define columns of tables, which is definitely not what > it appears that you are looking for. > > > > Thanks! > > > > Donavan > > > --- To unsubscribe from spectrum, send email to [email protected] with the body: unsubscribe spectrum [email protected] --- To unsubscribe from spectrum, send email to [email protected] with the body: unsubscribe spectrum [email protected]
