Hi,
I have to display the values from the dialog on the parent form. The values on the dialog are dynamic, so I am using a repeater on the dialog also. In one colemn of the repeater I have placed a button, which is supposed to insert one of the values of corresponding crow in the parent form's repeater. Following is the code description: <!-- Parent Form Repeater's Instance--> <xforms:instance id="repeatTemplate"> <contents> <content /> </contents> </xforms:instance> <!-- Parent Form's Repeater --> <fr:grid columns="1"> <fr:repeat nodeset="contents" id="form-result-repeat" origin="instance('repeatTemplate')" columns="1" appearance="xxforms:table" startindex="1"> <fr:body><fr:tr><fr:td> <xforms:output ref="instance('repeatTemplate')/content"> <xforms:label>Files Attached</xforms:label>< </xforms:output> </fr:td></fr:tr></fr:body> </fr:repeat> </fr:grid> <!--Trigger defined in the column of repeater of the dialog --> <xxforms:dialog...../> -------------- <xforms:trigger id="attach-file-trigger"> <xforms:label>Attach</xforms:label> <xforms:action ev:event="DOMActivate"> <xforms:insert context="." nodeset="contents" origin="instance('repeatTemplate')" at="index('form-result-repeat')" position="after" /> <xforms:setvalue ref="instance('repeatTemplate')/content[index('form-result-repeat')]" value="instance('searchResult')/file[index('result-repeat')]/name" /> </xforms:action> </xforms:trigger> ---------- </xxforms:dialog> This code is not working. Though I am able to set the value in a simple test output control using setvalue element. I guess the problem is with the insert element, but I am not able to figure out. Any suggestions? - Kamlesh -- You receive this message as a subscriber of the [hidden email] mailing list. To unsubscribe: mailto:[hidden email] For general help: mailto:[hidden email]?subject=help OW2 mailing lists service home page: http://www.ow2.org/wws |
Kamlesh,
> <!-- Parent Form Repeater's Instance--> > <xforms:instance id="repeatTemplate"> > <contents> > <content /> > </contents> > </xforms:instance> ... > <xforms:output ref="instance('repeatTemplate')/content"> I'm not sure, but i think you can't address the node directly that should be repeated. Especially, the origin attribute isn't available for the xforms:repeat, it should be in the xforms:insert. The context of that node(s) is determined by the nodeset attribute of the xforms:repeat, so you may try to: - put the absolute path including instance() there (in the xforms:repeat), in your example: <fr:repeat nodeset="instance('repeatTemplate')/contents" id="form-result-repeat" columns="1" appearance="xxforms:table" startindex="1"> and - reference the node that should be repeated using a relative path, in your example <xforms:output ref="content"> HTH florian -- You receive this message as a subscriber of the [hidden email] mailing list. To unsubscribe: mailto:[hidden email] For general help: mailto:[hidden email]?subject=help OW2 mailing lists service home page: http://www.ow2.org/wws |
Hi Florian,
I have tried to implement your suggestions but still I am not able to insert rows. FYI, I am using Orbeon Form Builder (and hence Orbeon Form Runner) to run my example. - Kamlesh -- You receive this message as a subscriber of the [hidden email] mailing list. To unsubscribe: mailto:[hidden email] For general help: mailto:[hidden email]?subject=help OW2 mailing lists service home page: http://www.ow2.org/wws |
Hi Kamlesh,
> I have tried to implement your suggestions but still I am not able to insert > rows. FYI, I am using Orbeon Form Builder (and hence Orbeon Form Runner) to run > my example. i had a mistake in my suggestion, sorry - the nodeset attribute of the xforms:repeat element should reference the data instance node, not the repeat-template instance. The origin attribute of the xforms:insert element instead has to reference the repeat-template instance. But there may be a lot of other sources for problems, and in addition, i don't have expericene with form builder and the code generated by that tool. florian -- You receive this message as a subscriber of the [hidden email] mailing list. To unsubscribe: mailto:[hidden email] For general help: mailto:[hidden email]?subject=help OW2 mailing lists service home page: http://www.ow2.org/wws |
Hi, Still not able to insert a row in fr:repeat element. Does form runners fr:repeat needs any special treatment while inserting a row as compared to its XForms counterpart? -Kamlesh -- You receive this message as a subscriber of the [hidden email] mailing list. To unsubscribe: mailto:[hidden email] For general help: mailto:[hidden email]?subject=help OW2 mailing lists service home page: http://www.ow2.org/wws |
Free forum by Nabble | Edit this page |