[Xsltforms-support] Using an xsf:dialog inside of an xf:repeat
Brought to you by:
alain-couthures
|
From: David A. <am...@gm...> - 2009-12-30 02:11:35
|
I've been playing with the new xsf:dialog feature.
I would like to create multiple dialogs with an xf:repeat and have
them open/close with multiple triggers.
Because I am using the attribute 'id="dialog"' for the xsf:dialog
element and that xf:dialog element is inside an xf:repeat, the divs
generated by the xsf:dialog will all have the same "id" attribute
value, so only the first generated div gets an "id" attribute of
"dialog" and the rest all get marked as clones.
Because only the first generated div gets an "id" attribute of
"dialog", all the triggers open the same overlay dialog (which is the
first generated div).
Here is an example:
<xf:repeat nodeset="my-item" appearance="full">
<xf:trigger appearance="minimal">
<xf:label>Modify</xf:label>
<xsf:show ev:event="DOMActivate" dialog="dialog"/>
</xf:trigger>
<xsf:dialog id="dialog">
<xf:trigger>
<xf:label>Close</xf:label>
<xsf:hide ev:event="DOMActivate"
dialog="dialog"/>
</xf:trigger>
<span>This field value appears in the overlay:
<xf:output ref="my-field"/></span>
</xsf:dialog>
</xf:repeat>
Thank you,
David
|