Make XUL Elements of prefwindow bound to preferences

For some elements like Label with preference attribute won’t bound to preference element.

The following is the workaround for this.

// Won’t work

 <label id=”defaultLabel”   preference=”pref-defaultPrinter” />

// Will Work

<label id=”defaultLabel”  preference-editable=”true”  preference=”pref-defaultLabel” />

preference-editable
Mozilla 1.8
Type: boolean

If true, the element may be used as one that modifies a preference in a prefwindow. The preference attribute may be used to connect to a preference element. This is useful for custom elements implemented in XBL. The element should fire change or select events when the value is changed so that the preference will update accordingly.

XUL:Attribute:preference-editable – MDC

technorati tags:, , ,

Blogged with Flock

Posted in MOzilla. 1 Comment »