Open ebruchez opened 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.
+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
.
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.
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:
Dynamic binding proposal
xf|select1[appearance = "xxf:tree"]
xxf:tree
andxxf:menu
appearances are removed in Orbeon Forms 4.8.1264 implements this for Form Builder
xf|input:xxf-type(xs:boolean)
(here using a dynamic pseudo-class with parameter)xf|input[xxf|type = "xs:dateTime"]
(here using a virtual attribute)xf|input[class ~= "xforms-type-dateTime"]
(here using a class)date
,time
,dateTime
, boolean datatypes forxf:input
mediatype="text/html"
xf:htmlFragment
datatype (#1111)xf:input
can be implemented this wayxf:switch
/xforms:case
optimization where hidden cases are sent to client using same update mechanism as for appearance/datatypes change