From 6546f41222aea2ea4b8c542b3e5cd363e5bfabcf Mon Sep 17 00:00:00 2001
From: luigser <luigser@gmail.com>
Date: Wed, 4 Nov 2015 16:31:03 +0100
Subject: [PATCH] controllets and base datatel behavior update

---
 controllets/data-sevc-controllet/data-sevc-controllet.html | 14 ++++++++++----
 1 file changed, 10 insertions(+), 4 deletions(-)

diff --git a/controllets/data-sevc-controllet/data-sevc-controllet.html b/controllets/data-sevc-controllet/data-sevc-controllet.html
index b2e2998..2cd90d1 100755
--- a/controllets/data-sevc-controllet/data-sevc-controllet.html
+++ b/controllets/data-sevc-controllet/data-sevc-controllet.html
@@ -627,7 +627,7 @@ Example:
                  */
                 paramsFields:{
                   type: Object,
-                  value: {}
+                  value: undefined
                 },
                 /**
                  * It's used to store the tab index in the first pass
@@ -884,7 +884,7 @@ Example:
                         }
 
                     case 2:
-                        if(this.selectedFields.length == 0){
+                        if(this.selectedFields == undefined || this.selectedFields.length == 0){
                             this.$.message.text = "You have to select a set of fields to access to pass 3.";
                             this.$.message.show();
                             return false;
@@ -892,8 +892,14 @@ Example:
                             return true;
                         }
                     case 3:
-                        this.injectDatalet(this.$.datalet_placeholder_2);
-                        return true;
+                        if(this.paramsFields == undefined){
+                            this.$.message.text = "You have to select a datalet and map the selected fields to datalets fields(by drag and drop) to access to pass 4.";
+                            this.$.message.show();
+                            return false;
+                        }else{
+                            this.injectDatalet(this.$.datalet_placeholder_2);
+                            return true;
+                        }
                 }
 
             },
--
libgit2 0.21.4