thank you for your answer. I implemented your suggestions and it works.
I managed to have the adapter get the metricTotal. I used
computeOnGet="true" as I need a value calculated from current alarms on
an element.
From the support team I got an interesting suggestion that I would like
to share.
When accessing alarms from javascrit, it is mandatory to first copy the
alarm array (java) to a local variable (javascript) and then working on
the copied array as every access to the alarm array causes a copy into
the javascript engine. An example will illustrate this:

// element is the current element, property is an alarm property
var n = element.alarms.length
for (var i = 0; i < n; i++) {

would cause a copy of the element.alarms array into javascript n + 1
times, as every time I access element.alarms a copy is performed.

var myAlarms = element.alarms;
var n = myAlarms.length;
for (var i = 0; i < n; i++) {

In the following example only one copy of element.alarms from java to
javascript is performed.
I had some 10.000 alarms open on an element, the first script would
take several hours, the second only a few minutes.

ebomitali's Profile: http://forums.novell.com/member.php?userid=75412
View this thread: http://forums.novell.com/showthread.php?t=441835