Thursday, January 13, 2011

Copy Element in XForms

Structurally, this element is similar to the value Element. It differs in that it can only be used within itemset, and that it works with subtrees of instance data rather than simple values.

If the single node binding attributes indicate a node in a model other than the bound node of the containing selection control, then an xforms-binding-exception must occur.. When a copy item is selected, the following rules apply:

* The target node, selected by the binding attributes on the list form control, must be an element node, otherwise an exception results (4.5.1 The xforms-binding-exception Event).
* The element node associated with the item, selected by the binding attributes on copy, is deep copied as a child of the target node by using an insert action (10.3 The insert Element).
* A full computational dependency rebuild is done, followed by recalculate, revalidate, and refresh.

When a copy item is deselected, the following rules apply:

* The target node, selected by the binding attributes on the list form control, must be an element node, otherwise an exception results (4.5.1 The xforms-binding-exception Event).
* The child element node associated with the item, selected by the binding attributes on copy, is deleted by using a delete action (10.4 The delete Element).
* A full computational dependency rebuild, followed by recalculate, revalidate, and refresh.

Note:

If the target node of the select or select1 is readonly, then the insertion or deletion associated with the copy operation is not performed.

If you want more about Select control + copy element visit Xforms 1.1

I am Trying this concept and it working properly Try following code....

selectstore.xhtml - Source code for Copy element in xforms


Try this....

No comments:

Post a Comment