Hi, probably simple question but i cannot afford with it.
My form <xhtml:html xmlns:xhtml="http://www.w3.org/1999/xhtml" ...> <xhtml:head> <xhtml:title>dyrektor</xhtml:title> <xforms:model xmlns:fb="http://orbeon.org/oxf/xml/form-builder" id="fr-form-model"> <xforms:instance id="fr-form-instance"> <form> <section-1> <checkboxList/> <checkboxListString/> </section-1> </form> </xforms:instance> <xforms:bind xmlns:dataModel="java:org.orbeon.oxf.fb.DataModel" id="fr-form-binds" ref="instance('fr-form-instance')"> <xforms:bind id="section-1-bind" name="section-1" ref="section-1"> <xf:bind id="checkboxList-bind" ref="checkboxList" name="checkboxList"/> <xf:bind id="checkboxListString-bind" ref="checkboxListString" name="checkboxListString"/> </xforms:bind> </xforms:bind> </xforms:instance> <xforms:instance xxf:readonly="true" id="fr-form-resources"> <resources> <resource xml:lang="en"> <checkboxList> <label>checkbox list</label> <hint/> <item> <label>one</label> <hint/> <value>1</value> </item> <item> <label>two</label> <hint/> <value>2</value> </item> <item> <label>three</label> <hint/> <value>3</value> </item> </checkboxList> <checkboxListString> <label>checkbox list string</label> <hint/> </checkboxListString> </resource> </resources> </xforms:instance> <xforms:instance xxf:readonly="true" id="fr-service-request-instance" xxforms:exclude-result-prefixes="#all"> <request/> </xforms:instance> <xforms:instance xxf:readonly="true" id="fr-service-response-instance" xxforms:exclude-result-prefixes="#all"> <response/> </xforms:instance> </xforms:model> </xhtml:head> <xhtml:body> <fr:view xmlns:dataModel="java:org.orbeon.oxf.fb.DataModel" xmlns:fb="http://orbeon.org/oxf/xml/form-builder" xmlns:oxf="http://www.orbeon.com/oxf/processors" xmlns:p="http://www.orbeon.com/oxf/pipeline" xmlns:xbl="http://www.w3.org/ns/xbl"> <fr:body xmlns:xh="http://www.w3.org/1999/xhtml"> <fr:section bind="section-1-bind" id="section-1-control"> <xforms:label ref="$form-resources/section-1/label"/> <fr:grid> <xh:tr> <xh:td> <xf:select id="checkboxList-control" appearance="full" bind="checkboxList-bind" class=""> <xf:label ref="$form-resources/checkboxList/label"/> <xf:hint ref="$form-resources/checkboxList/hint"/> <xf:alert ref="$fr-resources/detail/labels/alert"/> <xf:itemset ref="$form-resources/checkboxList/item"> <xf:label ref="label"/> <xf:value ref="value"/> <xf:hint ref="hint"/> </xf:itemset> </xf:select> </xh:td> </xh:tr> <xh:tr> <xh:td> <xf:input id="checkboxListString-control" bind="checkboxListString-bind" class=""> <xf:label ref="$form-resources/checkboxListString/label"/> <xf:hint ref="$form-resources/checkboxListString/hint"/> <xf:alert ref="$fr-resources/detail/labels/alert"/> </xf:input> </xh:td> </xh:tr> </fr:grid> </fr:section> </fr:body> </fr:view> </xhtml:body> </xhtml:html> Control 'checkboxList' its multiply selection control. Control 'checkboxListString' its text control (string). I'd like to rewrite selected values from first control as a string to second separated by ';' So if i select 1 ale 3 checkbox in checkboxList field i'd like to get 'one;three' in checkboxListString field. I tried various formulas in checkboxListString like string-join(for $i in tokenize(instance('fr-form-resources')//checkboxList, ' ') return instance('fr-form-resources')//checkboxList/item[value=$i]/label,', ') but it doesnt work. Thank Ypu for help/ |
Free forum by Nabble | Edit this page |