 +    /**
 +     * Constructor
 +     *
-+     * @param   
-+     */
-+    public function __construct($wrapper) {
++     * @param   rdbms.Peer peer
++     */
++    public function __construct($peer) {
 +      parent::__construct();
-+      $this->setWrapper($wrapper);
++      $this->setWrapper($this->wrapperFor($peer));
 +    }
 +
 +    /**

===================================================================
--- facade/DataSetFacade.class.php	(revision 0)
+++ facade/DataSetFacade.class.php	(revision 0)
@@ -0,0 +1,129 @@
+<?php
+/* This class is part of the XP framework
+ *

+    protected abstract function handleSubmittedEntity($entity, $request, $context);
+    
+    /**
+     * Setup the wrapper. Calls the implementing class' getEntity() method
+     * to retrieve the DataSet instance to work on.
+     *
+     * The following exceptions from the getEntity() are handled and added as
+     * formresult error
+     * <pre>
+     *   Exception                      Error type
+     *   ------------------------------ --------------------------------
+     *   SQLStatementFailedException    sql+stmt:[ERROR-CODE]
+     *   SQLException                   sql+generic:[EXCEPTION-NAME]
+     *   NoSuchElementException         notfound
+     *   IllegalAccessException         access
+     * </pre>
+     * The field is set to '*' and the exception message is passed as detail.
+     *
+     * @param   scriptlet.xml.workflow.WorkflowScriptletRequest request 
+     * @param   scriptlet.xml.Context context
