After spending two days on this, finally I figured it out. I still do not know 
how the renderer in 
$SPECROOT/tomcat/webapps/spectrum/WEB-INF/topo/config/rfc2790-storage-table-config.xml
 file works without <renderer> tags.

<column>
<name>Pool Free %</name>
<content>
<expression>
  100 - attrDouble(0x04cd0427)
</expression>
<renderer>
  <param name="free">1</param>
   com.aprisma.spectrum.app.util.render.RoundNumberRenderer
</renderer>
</content>
</column>


Saurabh Bohra
O: 860-766-0842  |  M: 860-385-3597  |  e-mail: [email protected]

From: Bohra, Saurabh [mailto:[email protected]]
Sent: Monday, April 23, 2012 5:38 PM
To: spectrum
Subject: [spectrum] XML expression and render

Group
I have a custom attribute in database which is *Real Type* and represents 
utilization % FULL as a column in a table in OneClick.

I also want to display utilization % FREE column. So seeing some examples under 
topo/config in Spectrum, I updated the XML file with column name Pool Free % 
with below code and blew the OneClick for that model. Any suggestion what I 
might be doing wrong.


Working:
<column>
<name>Pool Utilization %</name>
<content>
<attribute>0x04cd0427</attribute>
<renderer>
  <param name="attrID">0x04cd0427</param>
   com.aprisma.spectrum.app.util.render.RoundNumberRenderer
</renderer>
</content>
</column>



Not Working:
<column>
<name>Pool Free %</name>
<content>
<attribute>0x04cd0427</attribute>
<expression>
  attrDouble(0x04cd0427).intValue() &lt; 100 ? 
com.aprisma.spectrum.app.util.render.RoundNumberRenderer( 100 - 
attrDouble(0x04cd0427) ) : 100
</expression>
</content>
</column>




Saurabh Bohra
Sr. Network Mgmt Systems Analyst
ESPN Inc.
O: 860-766-0842  |  M: 860-385-3597  |  e-mail: 
[email protected]<mailto:[email protected]>


 *   --To unsubscribe from spectrum, send email to 
[email protected]<mailto:[email protected]> with the body: unsubscribe spectrum 
[email protected]<mailto:[email protected]>

---
To unsubscribe from spectrum, send email to [email protected] with the body: 
unsubscribe spectrum [email protected]

Reply via email to