Hi,
-- I think I found a bug concerning input fields that reference dynamically inserted data bound to type xs:time. On those fields, the incremental input does not work. In the attached file "timetest.xhtml" I have added an easy example: The page contains a table with 3 columns, a column 'From', a column 'to' and a column 'Difference' (attribute total). My default instance looks like this: <xf:instance id="times"> <times xmlns=""> <time from="00:00:00" to="00:00:00" total="PT0S" /> </times></xf:instance> With the following binds: <xf:bind ref="instance('times')/time/@from" type="xs:time" /> <xf:bind ref="instance('times')/time/@to" type="xs:time" /> <xf:bind ref="instance('times')/time/@total" type="xs:duration" calculate="xs:dayTimeDuration(if(starts-with(xs:string(xs:time(../@to) - xs:time(../@from)), '-')) then (xs:dayTimeDuration(xs:time(../@to) - xs:time(../@from)) + xs:dayTimeDuration('PT24H')) else (xs:time(../@to) - xs:time(../@from)))" />My table has a xhtml:tr repeat on nodeset instance('times')/time. Each repeated row shows two input fields (for attributes @from and @to) and an output field that shows the calculated duration (attribute @total). I then have a button that inserts an extra time element: <xf:instance id="new-time"> <time van="00:00:00" tot="00:00:00" totaal="PT0S" /> </xf:instance> The action on the button looks like this:<xf:trigger> <xf:label>Add row</xf:label> <xf:action ev:event="DOMActivate"> <xf:insert context="instance('times')" origin="instance('new-time')" nodeset="*" position="after" /> <xf:recalculate model="m-default" /> <xf:rebuild /> </xf:action> </xf:trigger> At first at didn't have the recalculate and the rebuild, but that did not work either.Now what is the problem:
I played around a bit with other input types like text input, but there is no problem with the increment there. I hope you can give me some input on this. Thanks in advance, Toon Andries Professional Services Consultant Inventive Designers You received this message because you are subscribed to the Google Groups "Orbeon Forms" group. To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email]. To post to this group, send email to [hidden email]. timetest.xhtml (3K) Download Attachment |
Administrator
|
Toon,
Thanks, I reproduce the issue also without a repeat: https://github.com/orbeon/orbeon-forms/issues/1609 The class xforms-incremental is always removed upon recreating an input field. I don't know yet if there was a reason for that, but clearly it is wrong at least in some cases. -Erik |
Administrator
|
Thank you for the quick response!
-- We will update our Orbeon and I will let you know when I have tested this issue. Kind regards, Toon You received this message because you are subscribed to the Google Groups "Orbeon Forms" group. To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email]. To post to this group, send email to [hidden email]. |
Free forum by Nabble | Edit this page |