summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSabri Bousselmi2013-04-01 07:43:52 (EDT)
committer Sven Rottstock2013-04-01 07:43:52 (EDT)
commitce611f24793ae1708227455ed5ec098006c8f062 (patch)
treed093a611adac2530314b20e8b237780f32258c07
parent53e3bc53c491151484df27d1331728fad8b28f48 (diff)
downloadorg.eclipse.stardust.ui.web-ce611f24793ae1708227455ed5ec098006c8f062.zip
org.eclipse.stardust.ui.web-ce611f24793ae1708227455ed5ec098006c8f062.tar.gz
org.eclipse.stardust.ui.web-ce611f24793ae1708227455ed5ec098006c8f062.tar.bz2
Jira-ID: CRNT-28368
Fix issue git-svn-id: http://emeafrazerg/svn/ipp/product/trunk/stardust/ui.web@64024 8100b5e0-4d52-466c-ae9c-bdeccbdeaf6b
-rw-r--r--web-modeler/src/main/resources/META-INF/xhtml/js/m_emailEventIntegrationOverlay.js38
-rw-r--r--web-modeler/src/main/resources/META-INF/xhtml/js/m_fileEventIntegrationOverlay.js6
-rw-r--r--web-modeler/src/main/resources/META-INF/xhtml/js/m_genericCamelRouteEventIntegrationOverlay.js23
-rw-r--r--web-modeler/src/main/resources/META-INF/xhtml/js/m_messageEventIntegrationOverlay.js23
4 files changed, 46 insertions, 44 deletions
diff --git a/web-modeler/src/main/resources/META-INF/xhtml/js/m_emailEventIntegrationOverlay.js b/web-modeler/src/main/resources/META-INF/xhtml/js/m_emailEventIntegrationOverlay.js
index ab25bdc..a940674 100644
--- a/web-modeler/src/main/resources/META-INF/xhtml/js/m_emailEventIntegrationOverlay.js
+++ b/web-modeler/src/main/resources/META-INF/xhtml/js/m_emailEventIntegrationOverlay.js
@@ -379,7 +379,8 @@ define(
this.connectionTimeoutInput.removeClass("error");
this.initialDelayInput.removeClass("error");
this.passwordInput.removeClass("error");
-
+ this.page.propertiesPanel.errorMessages=[];
+
if (this.mailServerInput.val() == null
|| this.mailServerInput.val() == "") {
@@ -387,9 +388,7 @@ define(
.push("Mail server name must not be empty.");
this.mailServerInput.addClass("error");
- this.page.propertiesPanel.showErrorMessages();
-
- return false;
+
}
if (this.accountInput.val() == null
@@ -398,21 +397,17 @@ define(
.push("Mail account must not be empty.");
this.accountInput.addClass("error");
- this.page.propertiesPanel.showErrorMessages();
-
- return false;
+
}
if (this.passwordInput.val() == null
- || this.passwordInput.val() == "") {
+ || this.passwordInput.val() == ""){
this.page.propertiesPanel.errorMessages
.push("Password must not be empty.");
- this.portInput.addClass("error");
-
- this.page.propertiesPanel.showErrorMessages();
+ this.passwordInput.addClass("error");
- return false;
+
}
if (this.portInput.val() == null
@@ -421,33 +416,32 @@ define(
.push("Port must be a Number.");
this.portInput.addClass("error");
- this.page.propertiesPanel.showErrorMessages();
-
- return false;
+
}
if (this.connectionTimeoutInput.val() == null
|| this.connectionTimeoutInput.val() == "" || isNaN(this.connectionTimeoutInput.val())) {
this.page.propertiesPanel.errorMessages
.push("ConnectionTimeout must be a Number.");
- this.portInput.addClass("error");
+ this.connectionTimeoutInput.addClass("error");
- this.page.propertiesPanel.showErrorMessages();
-
- return false;
+
}
if (this.initialDelayInput.val() == null
|| this.initialDelayInput.val() == "" || isNaN(this.initialDelayInput.val())) {
this.page.propertiesPanel.errorMessages
.push("InitialDelay must be a Number.");
- this.portInput.addClass("error");
+ this.initialDelayInput.addClass("error");
+
+ }
+
+ if (this.page.propertiesPanel.errorMessages.length != 0){
this.page.propertiesPanel.showErrorMessages();
-
return false;
}
-
+
return true;
};
}
diff --git a/web-modeler/src/main/resources/META-INF/xhtml/js/m_fileEventIntegrationOverlay.js b/web-modeler/src/main/resources/META-INF/xhtml/js/m_fileEventIntegrationOverlay.js
index 763a0cf..a2cfb15 100644
--- a/web-modeler/src/main/resources/META-INF/xhtml/js/m_fileEventIntegrationOverlay.js
+++ b/web-modeler/src/main/resources/META-INF/xhtml/js/m_fileEventIntegrationOverlay.js
@@ -334,6 +334,7 @@ define(
*/
FileEventIntegrationOverlay.prototype.validate = function() {
this.directoryNameInput.removeClass("error");
+ this.page.propertiesPanel.errorMessages=[];
if (this.directoryNameInput.val() == null
|| this.directoryNameInput.val() == "") {
@@ -341,8 +342,11 @@ define(
.push("Directory name must not be empty.");
this.directoryNameInput.addClass("error");
+
+ }
+
+ if (this.page.propertiesPanel.errorMessages.length != 0){
this.page.propertiesPanel.showErrorMessages();
-
return false;
}
diff --git a/web-modeler/src/main/resources/META-INF/xhtml/js/m_genericCamelRouteEventIntegrationOverlay.js b/web-modeler/src/main/resources/META-INF/xhtml/js/m_genericCamelRouteEventIntegrationOverlay.js
index 175ecc5..884f618 100644
--- a/web-modeler/src/main/resources/META-INF/xhtml/js/m_genericCamelRouteEventIntegrationOverlay.js
+++ b/web-modeler/src/main/resources/META-INF/xhtml/js/m_genericCamelRouteEventIntegrationOverlay.js
@@ -118,6 +118,8 @@ define(
*
*/
GenericCamelRouteEventIntegrationOverlay.prototype.activate = function() {
+ this.routeTextarea.val(m_i18nUtils
+ .getProperty("modeler.general.toBeDefined"));
var parameterMappings = [];
parameterMappings.push(this
@@ -171,6 +173,10 @@ define(
*/
GenericCamelRouteEventIntegrationOverlay.prototype.validate = function() {
+ this.camelContextInput.removeClass("error");
+ this.routeTextarea.removeClass("error");
+ this.page.propertiesPanel.errorMessages=[];
+
if (m_utils.isEmptyString(this.camelContextInput.val()) ||
this.camelContextInput.val() == m_i18nUtils
.getProperty("modeler.general.toBeDefined")) {
@@ -178,24 +184,21 @@ define(
.push(m_i18nUtils
.getProperty("modeler.general.fieldMustNotBeEmpty"));
this.camelContextInput.addClass("error");
- this.camelContextInput.focus();
-
- this.getPropertiesPanel().showErrorMessages();
+ // this.camelContextInput.focus();
- return false;
}
- if (m_utils.isEmptyString(this.routeTextarea.val()) ||
- this.routeTextarea.val() == m_i18nUtils
- .getProperty("modeler.general.toBeDefined")) {
+ if (m_utils.isEmptyString(this.routeTextarea.val())) {
this.getPropertiesPanel().errorMessages
.push(m_i18nUtils
.getProperty("modeler.general.fieldMustNotBeEmpty"));
this.routeTextarea.addClass("error");
- this.routeTextarea.focus();
-
- this.getPropertiesPanel().showErrorMessages();
+ //this.routeTextarea.focus();
+ }
+
+ if (this.page.propertiesPanel.errorMessages.length != 0){
+ this.page.propertiesPanel.showErrorMessages();
return false;
}
diff --git a/web-modeler/src/main/resources/META-INF/xhtml/js/m_messageEventIntegrationOverlay.js b/web-modeler/src/main/resources/META-INF/xhtml/js/m_messageEventIntegrationOverlay.js
index 18180ec..df30547 100644
--- a/web-modeler/src/main/resources/META-INF/xhtml/js/m_messageEventIntegrationOverlay.js
+++ b/web-modeler/src/main/resources/META-INF/xhtml/js/m_messageEventIntegrationOverlay.js
@@ -256,7 +256,11 @@ define(
*
*/
MessageEventIntegrationOverlay.prototype.validate = function() {
+
+ this.jmsComponentIdInput.removeClass("error");
this.nameInput.removeClass("error");
+ this.page.propertiesPanel.errorMessages=[];
+
if (m_utils.isEmptyString(this.jmsComponentIdInput.val()) ||
this.jmsComponentIdInput.val() == m_i18nUtils
@@ -265,25 +269,22 @@ define(
.push(m_i18nUtils
.getProperty("modeler.general.fieldMustNotBeEmpty"));
this.jmsComponentIdInput.addClass("error");
- this.jmsComponentIdInput.focus();
-
- this.getPropertiesPanel().showErrorMessages();
-
- return false;
+ //this.jmsComponentIdInput.focus();
+
}
- if (m_utils.isEmptyString(this.nameInput.val()) ||
- this.nameInput.val() == m_i18nUtils
- .getProperty("modeler.general.toBeDefined")) {
+ if (m_utils.isEmptyString(this.nameInput.val())) {
this.getPropertiesPanel().errorMessages
.push(m_i18nUtils
.getProperty("modeler.general.fieldMustNotBeEmpty"));
this.nameInput.addClass("error");
- this.nameInput.focus();
-
- this.getPropertiesPanel().showErrorMessages();
+ //this.nameInput.focus();
+ }
+
+ if (this.page.propertiesPanel.errorMessages.length != 0){
+ this.page.propertiesPanel.showErrorMessages();
return false;
}