Re: [Xsltforms-support] Dynamic UI binding expressions
Brought to you by:
alain-couthures
|
From: Alain C. <ala...@ag...> - 2015-04-19 16:34:21
|
Hi Mats! Please have a look at my own test case: <html xmlns:xf="http://www.w3.org/2002/xforms" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://www.w3.org/1999/xhtml" xmlns:xhtml="http://www.w3.org/1999/xhtml" xmlns:ev="http://www.w3.org/2001/xml-events" xmlns:xsd="http://www.w3.org/2001/XMLSchema"> <head> <title>Last upload</title> <xf:model> <xf:instance xmlns=""> <data> <files> <file xsi:type="xsd:hexBinary"/> <file xsi:type="xsd:hexBinary"/> </files> </data> </xf:instance> </xf:model> </head> <body> <xf:upload ref="files/file[last()]" incremental="true"> <xf:label>Upload: </xf:label> <xf:insert ev:event="xforms-value-changed" ref="../file" position="after" origin="../file[1]"/> </xf:upload> <br/> <xf:repeat ref="files/file"> <xf:output value="position()"/> <xf:output value="."> <xf:label> Value: </xf:label> </xf:output> </xf:repeat> </body> </html> This is probably quite different from your own form but it allowed me to find an issue within the upload control: with a browser automatically displaying the file name of the selected file, the last selected name was still displayed even after the binding change due to the insert. It did not alter the resulting instance. I have wrapped the corresponding HTML input with an HTML form to allow to reset it each time the upload control has a different binding. Please give a try to the latest revision (rev.613) I have just committed. Is it what you are looking for? Thanks! --Alain Le 17/04/2015 11:37, Mats Eklund a écrit : > Hi! > > Making progress with the use of XSLTForms, again, great tool!! > > Question: does XSLTForms support dynamic UI binding expressions > (XForms 1.1 specification chapter 7.4.3)? > > Background for my question is that I have an xf:upload control that is > bound to the last file element in a files list (i.e. > ref="files/file[last()]"). When a file has been uploaded with the > control, an xf:insert action inserts a new file to the end of the > list. Even after an explicit call to xf:rebuild/xf:refresh after the > xf:insert, the xf:upload control remains bound to the original file > element, even though this element is no longer last in the list! I > would need it however to bind to the new last element in order for my > form to work! > > Grateful for any clarification and help! > > Thanks, > Mats > > > ------------------------------------------------------------------------------ > BPM Camp - Free Virtual Workshop May 6th at 10am PDT/1PM EDT > Develop your own process in accordance with the BPMN 2 standard > Learn Process modeling best practices with Bonita BPM through live exercises > http://www.bonitasoft.com/be-part-of-it/events/bpm-camp-virtual- event?utm_ > source=Sourceforge_BPM_Camp_5_6_15&utm_medium=email&utm_campaign=VA_SF > > > _______________________________________________ > Xsltforms-support mailing list > Xsl...@li... > https://lists.sourceforge.net/lists/listinfo/xsltforms-support |