Ok. I went into the model type editor (MTE) and deleted my string attribute
from the devices and then put in the new one (Server_Status) jotted down the
new attribute ID: 0x0584001a and then tried to load it up as follows:
1. Placed copy of
$SPECROOT\tomcat\webapps\spectrum\WEB-INF\topo\config\device-geninfo-subview-config.xml
into $SPECROOT\custom\topo\config
2. edited the device-geninfo-subview-config.xml and added:
<column idref="column-prod-status-config"><editable/></column>
3. created the column-prod-status-config.xml file in the same
custom\topo\config directory with this inside:
<column><name>Production Status</name>
<content>
<attribute>0x0584001a</attribute>
<renderer>
<param
name="attrID">0x0584001a</param>
com.aprisma.spectrum.app.util.render.EnumeratedAttrRenderer
</renderer>
</content>
<editable/>
</column
restarted my oneclick process... restarted the console and when I went to look
I am showing
"Production Status: CsOIDValueList(class java.lang.Integer) " set
when I click set... I get a Model Write error - "Cannot convert the value:
com.aprisma.spectrum.app.util.common.CsOIDValueList.(java.lang.String)"
but it does pull down my menu
Development
Production
QA
Sandbox
I made my Enumerated a list with 0=Development, 1=Production, 2=QA, 3=Sandbox
I also made the values read/write and database. What am I missing?
---
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]>
From: Thomas Kloeber [mailto:[email protected]]
Sent: Wednesday, February 11, 2009 2:34 AM
To: spectrum
Subject: Re: [spectrum] Customizing - Drop downs
Jon,
Jon Whitehouse wrote on 10.02.2009 22:11:
All,
I have my developer ID and am starting to learn how to customize spectrum by
reading the Customization Guide. I have created my new attributes in model
editor, but now I am curious if I wanted to add a 'drop down' menu to the
editable field.
very simple: define the attribute as of type Enumerated (or integer) and fill
in the enumerated values via MTE.
For example in OneClick in the Component Details -> Information tab under
General Information
I added a field called "Production Status" and I can "set" it to whatever I
want.. which is great, but I really only want to be able to select from 4
choices from a pulldown menu (kind of like how you can select yes or no for "in
Hibernation".
"Production"
"QA"
"Development"
"Sandbox"
How would I do that?
would the xml be something like
<param name="Production">com.aprisma.spectrum.app.util.render.Production</param
not quite, you would use the EnumeratedAttrRenderer:
<column><name>your name</name>
<content>
<attribute>your attribute id</attribute>
<renderer>
<param name="attrID">your attribute id</param>
com.aprisma.spectrum.app.util.render.EnumeratedAttrRenderer
</renderer>
</content>
<editable/>
</column>
Thomas
--
Intelligent Communication Software Vertriebs GmbH
Firmensitz: Kistlerhof Str. 111, 81379 München
Registergericht: Amtsgericht München, HRB 88283
Geschäftsführer: Albert Fuss
* --To unsubscribe from spectrum, send email to
[email protected]<mailto:[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]