Yes usually I'd use $once{}, but I'm sure that there have been times when I've had to use a $always{} (i.e. ${}) constraint because of init order issues.

Do $once{} constraints do the same checking-for-init that normal constraints do?

-Antun

P T Withington wrote:
On 2007-01-30, at 19:25 EST, Antun Karlovac wrote:

This can be implemented easily with constraints:

<class name="basegridcolumn">
    <attribute name="mygridref"
               value="${this.immediateparent.ownerGrid}" />
</class>

... however this creates plenty of constraints (one or more for each row
of the grid). Constraints are usually expensive.

You can make this constraint slightly less expensive by making it a $once{} constraint. None of these reference values will ever change will they?

But I agree that it would be better to have the base component set up these references. They are like parent references, but more abstract.

Reply via email to