Expand my Community achievements bar.

11 Calculate-Events - a way to avoid this?

Avatar

Level 4

Hi,

to better understand the xfa.layout.y()-function I put this code into the calculate event of a checkbox:


console.show();
console.println("Calculate:    Checkbox-y: " + xfa.layout.y(this, "in") +
    " Checkbox-Subform-y: " + xfa.layout.y(this.parent, "in") +
    " and content-y: " + xfa.layout.y(this.parent.optional.content, "in"));

To my surprise every calculate-event is called exactly 11 times whenever I have more than one checkbox.

(When there is only checkbox in the form I have only one call of the calculate event - as expected.)

I do this in a version 7 LiveCycle Designer.

My customer wants me to add spaces above selected checkboxes and remove them when deselected (in a dynamic form).

As many of those checkboxes have the same binding I suppose I just have to work with the calculate event.

My questions are:

How can I avoid to have all calculate events fired 11 times whenever I click somewhere on the form?

And: Why is it, that this events fires that often? And why exactly 11 times???

Is there by chance another way to solve my initial problem?

Does anyone have an idea?

Ulrich

0 Replies