orbeon / orbeon-forms

Orbeon Forms is an open source web forms solution. It includes an XForms engine, the Form Builder web-based form editor, and the Form Runner runtime.
http://www.orbeon.com/
GNU Lesser General Public License v2.1
512 stars 220 forks source link

XBL: Dynamic bindings by appearance/mediatype/datatype #1248

Open ebruchez opened 10 years ago

ebruchez commented 10 years ago

Rationale

UPDATE: Since Orbeon Forms 4.9, the XForms engine supports static bindings by attributes (#1936). This doesn't change the general issue with built-in controls bound by datatype.

Currently, for built-in controls:

ebruchez commented 10 years ago

Had this issue today with a customer: changing the input type to xf:decimal doesn't cause FB/FR to use an fr:number field automatically.

UPDATE: This is now handled in Form Builder with #1264.

avernet commented 5 years ago

+1 from @ahenket to have the xf:input bound to a node of type date be able to automatically use the implementation provided by fr:date.

ebruchez commented 2 years ago

See my new comment on #2800 regarding doing this if there is a bind attribute.

Now this is not as easy as might seem. In XFormsAnnotator, we call metadata.findBindingForElement to identify whether an element is associated with a binding. Here we'd need to find whether xf:input must map to fr:date, and that would use information about the model's xf:bind, which we don't have yet at that time.

So we'd need to move towards making this lazy, as described in #481.