From e0e9a26fda6697cd83c213626b95f58ed7855382 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Carlos=20Mart=C3=ADn?= Date: Tue, 8 Sep 2015 17:40:53 +0200 Subject: [PATCH] Bug #3974: Fix first setAction call --- src/sunstone/public/app/sunstone.js | 1 + src/sunstone/public/app/utils/form-panels/form-panel.js | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/src/sunstone/public/app/sunstone.js b/src/sunstone/public/app/sunstone.js index a876b82de6..1b1c662120 100644 --- a/src/sunstone/public/app/sunstone.js +++ b/src/sunstone/public/app/sunstone.js @@ -740,6 +740,7 @@ define(function(require) { } // Panel not defined formPanelInstance = new formPanel(); + formPanelInstance.setAction(formContext, action); tab["formPanelInstances"][formPanelId] = formPanelInstance; formPanelInstance.insert(formContext); } diff --git a/src/sunstone/public/app/utils/form-panels/form-panel.js b/src/sunstone/public/app/utils/form-panels/form-panel.js index 2e8ab1036a..bfc3964465 100644 --- a/src/sunstone/public/app/utils/form-panels/form-panel.js +++ b/src/sunstone/public/app/utils/form-panels/form-panel.js @@ -67,7 +67,7 @@ define(function(require) { this.action = action; - if ((prevAction && prevAction != action) || action == "update") { + if (prevAction != undefined && (prevAction != action || action == "update")) { this.reset(context); } }