summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorFradj Zayen2013-02-15 05:37:18 (EST)
committer Sven Rottstock2013-03-11 06:36:27 (EDT)
commit1af0e2a2443345f663fdbdf71ecf8bda3a59de52 (patch)
tree682fdee775418802e12574a3241af657663205a1
parent73ed4e1b6875efa3d60c8df0fc4aa3d97db39b2f (diff)
downloadorg.eclipse.stardust.ui.web-1af0e2a2443345f663fdbdf71ecf8bda3a59de52.zip
org.eclipse.stardust.ui.web-1af0e2a2443345f663fdbdf71ecf8bda3a59de52.tar.gz
org.eclipse.stardust.ui.web-1af0e2a2443345f663fdbdf71ecf8bda3a59de52.tar.bz2
Jira-ID: CRNT-27993
Change on Generic Camel Route overlay git-svn-id: http://emeafrazerg/svn/ipp/product/trunk/stardust/ui.web@63042 8100b5e0-4d52-466c-ae9c-bdeccbdeaf6b
-rw-r--r--web-modeler/src/main/resources/META-INF/xhtml/js/m_eventIntegrationOverlay.js8
-rw-r--r--web-modeler/src/main/resources/META-INF/xhtml/js/m_genericCamelRouteEventIntegrationOverlay.js108
-rw-r--r--web-modeler/src/main/resources/META-INF/xhtml/views/modeler/genericCamelRouteEventIntegrationOverlay.html21
-rw-r--r--web-modeler/src/main/resources/bpm-modeler-client-messages_de.properties2
-rw-r--r--web-modeler/src/main/resources/bpm-modeler-client-messages_en.properties2
-rw-r--r--web-modeler/src/main/resources/bpm-modeler-client-messages_zh_CN.properties2
6 files changed, 44 insertions, 99 deletions
diff --git a/web-modeler/src/main/resources/META-INF/xhtml/js/m_eventIntegrationOverlay.js b/web-modeler/src/main/resources/META-INF/xhtml/js/m_eventIntegrationOverlay.js
index 84401f1..99b8a6b 100644
--- a/web-modeler/src/main/resources/META-INF/xhtml/js/m_eventIntegrationOverlay.js
+++ b/web-modeler/src/main/resources/META-INF/xhtml/js/m_eventIntegrationOverlay.js
@@ -236,13 +236,7 @@ define(
*/
EventIntegrationOverlay.prototype.getRouteContent = function()
{
- var route = "<from uri=\"";
-
- route += this.getEndpointUri();
- route += "\"/>";
- route += this.getAdditionalRouteDefinitions();
-
- return route;
+ return this.getRouteDefinitions();
};
/**
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 e1e763b..ca3a7ab 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
@@ -56,7 +56,7 @@ define(
jQuery("label[for='routeTextarea']")
.text(
m_i18nUtils
- .getProperty("modeler.element.properties.genericCamelRouteEvent.additionalRoutes"));
+ .getProperty("modeler.element.properties.genericCamelRouteEvent.routeDefinition"));
jQuery("label[for='beanTextarea']")
.text(
m_i18nUtils
@@ -64,8 +64,8 @@ define(
this.camelContextInput = this
.mapInputId("camelContextInput");
+
this.configurationSpan = this.mapInputId("configuration");
-
this.configurationSpan
.text(m_i18nUtils
.getProperty("modeler.element.properties.event.configuration"));
@@ -75,33 +75,36 @@ define(
.text(m_i18nUtils
.getProperty("modeler.element.properties.event.parameters"));
- this.endpointUriPrefix = this
- .mapInputId("endpointUriPrefix");
- this.endpointUriTextarea = this
- .mapInputId("endpointUriTextarea");
- this.additionalRouteTextarea = this
+ this.routeTextarea = this
.mapInputId("routeTextarea");
this.additionalBeanTextarea = this
.mapInputId("beanTextarea");
- this.endpointUriPrefix.change({
+ this.routeTextarea.change({
+ overlay : this
+ }, function(event) {
+ var overlay = event.data.overlay;
+ overlay.submitRouteChanges();
+ });
+
+ this.additionalBeanTextarea.change({
+ overlay : this
+ }, function(event) {
+ var overlay = event.data.overlay;
+ overlay.submitRouteChanges();
+ });
+
+ this.camelContextInput.change({
overlay : this
}, function(event) {
var overlay = event.data.overlay;
-
overlay.submitRouteChanges();
});
this.registerForRouteChanges(this.camelContextInput);
- this.registerForRouteChanges(this.endpointUriTextarea);
- this.registerForRouteChanges(this.additionalRouteTextarea);
+ this.registerForRouteChanges(this.routeTextarea);
this.registerForRouteChanges(this.additionalBeanTextarea);
- // .append("<option value=\"Message\">(Map)</option>");
- // .append("<option value=\"EventCategory\">EventCategory
- // .append("<option value=\"SessionID\">SessionID
- // .append("<option value=\"MessageType\">MessageType
- // .append("<option value=\"DataDictionary\">DataDictionary
};
/**
@@ -128,69 +131,32 @@ define(
*
*/
GenericCamelRouteEventIntegrationOverlay.prototype.update = function() {
+
var route = this.page.getEvent().attributes["carnot:engine:camel::camelRouteExt"];
+
// TODO Need better URL encoding
-
route = route.replace(/&/g, "&amp;");
-
- var xmlDoc = jQuery.parseXML(route);
- var xmlObject = jQuery(xmlDoc);
-
- var fromUri = "";
- var additionalRoutes = "";
-
- jQuery(xmlObject).find("from").each(function() {
- fromUri = jQuery(this).attr("uri");
- });
-
- jQuery(xmlObject)
- .find("route")
- .each(
- function() {
- jQuery(this)
- .children()
- .each(
- function() {
- m_utils
- .debug("XML Element: "
- + m_utils
- .xmlToString(jQuery(this)));
- if (m_utils
- .xmlToString(
- jQuery(this))
- .indexOf(
- "<from") < 0) {
- additionalRoutes += m_utils
- .xmlToString(jQuery(this))
- + "\n";
- }
- });
- });
-
+
this.camelContextInput
.val(this.page.getEvent().attributes["carnot:engine:camel::camelContextId"]);
- this.endpointUriTextarea.val(fromUri);
- this.additionalRouteTextarea.val(additionalRoutes);
+
+ this.routeTextarea.val(route);
+
this.additionalBeanTextarea
- .val(this.page.getEvent().attributes["carnot:engine:camel::additionalBeans"]);
+ .val(this.page.getEvent().attributes["carnot:engine:camel::additionalSpringBeanDefinitions"]);
+
this.parameterMappingsPanel.setScopeModel(this.page
.getModel());
+
this.parameterMappingsPanel
.setParameterDefinitions(this.page.getEvent().parameterMappings);
- };
+ };
/**
*
*/
- GenericCamelRouteEventIntegrationOverlay.prototype.getEndpointUri = function() {
- return this.endpointUriTextarea.val();
- };
-
- /**
- *
- */
- GenericCamelRouteEventIntegrationOverlay.prototype.getAdditionalRouteDefinitions = function() {
- return this.additionalRouteTextarea.val();
+ GenericCamelRouteEventIntegrationOverlay.prototype.getRouteDefinitions = function() {
+ return this.routeTextarea.val();
};
/**
@@ -204,9 +170,7 @@ define(
*
*/
GenericCamelRouteEventIntegrationOverlay.prototype.validate = function() {
- this.camelContextInput.removeClass("error");
- this.endpointUriTextarea.removeClass("error");
-
+
if (m_utils.isEmptyString(this.camelContextInput.val()) ||
this.camelContextInput.val() == m_i18nUtils
.getProperty("modeler.general.toBeDefined")) {
@@ -221,14 +185,14 @@ define(
return false;
}
- if (m_utils.isEmptyString(this.endpointUriTextarea.val()) ||
- this.endpointUriTextarea.val() == m_i18nUtils
+ if (m_utils.isEmptyString(this.routeTextarea.val()) ||
+ this.routeTextarea.val() == m_i18nUtils
.getProperty("modeler.general.toBeDefined")) {
this.getPropertiesPanel().errorMessages
.push(m_i18nUtils
.getProperty("modeler.general.fieldMustNotBeEmpty"));
- this.endpointUriTextarea.addClass("error");
- this.endpointUriTextarea.focus();
+ this.routeTextarea.addClass("error");
+ this.routeTextarea.focus();
this.getPropertiesPanel().showErrorMessages();
diff --git a/web-modeler/src/main/resources/META-INF/xhtml/views/modeler/genericCamelRouteEventIntegrationOverlay.html b/web-modeler/src/main/resources/META-INF/xhtml/views/modeler/genericCamelRouteEventIntegrationOverlay.html
index 64b183b..990ea41 100644
--- a/web-modeler/src/main/resources/META-INF/xhtml/views/modeler/genericCamelRouteEventIntegrationOverlay.html
+++ b/web-modeler/src/main/resources/META-INF/xhtml/views/modeler/genericCamelRouteEventIntegrationOverlay.html
@@ -21,26 +21,13 @@
</table>
<table>
<tr>
- <td><div class="code">&lt;route&gt;</div></td>
- </tr>
- <tr>
- <td><div id="endpointUriPrefix" class="code">&lt;from
- uri="</div></td>
- </tr>
- <tr>
- <td><textarea id="endpointUriTextarea" cols="40" rows="2"
- class="code">
- </textarea></td>
+ <td><label for="routeTextarea">Route Definition</label></td>
</tr>
<tr>
- <td><div class="code">"&gt;</div></td>
- </tr>
- <tr>
- <td><label for="routeTextarea">Additional Route
- Specification</label></td>
+ <td><div class="code">&lt;route&gt;</div></td>
</tr>
<tr>
- <td><textarea id="routeTextarea" cols="40" rows="3"
+ <td><textarea id="routeTextarea" cols="50" rows="6"
class="code"></textarea>
</td>
</tr>
@@ -52,7 +39,7 @@
Specification</label></td>
</tr>
<tr>
- <td><textarea id="beanTextarea" cols="40" rows="3"
+ <td><textarea id="beanTextarea" cols="50" rows="6"
class="code"></textarea>
</td>
</tr>
diff --git a/web-modeler/src/main/resources/bpm-modeler-client-messages_de.properties b/web-modeler/src/main/resources/bpm-modeler-client-messages_de.properties
index 2bba151..18cab72 100644
--- a/web-modeler/src/main/resources/bpm-modeler-client-messages_de.properties
+++ b/web-modeler/src/main/resources/bpm-modeler-client-messages_de.properties
@@ -584,7 +584,7 @@ modeler.element.properties.timerEvent.fixedRate=Festgesetzte Rate
### Generic Camel Route Event Overlay ###
modeler.element.properties.genericCamelRouteEvent.title = Generisches Camel Route-Ereignis
modeler.element.properties.genericCamelRouteEvent.camelContext = Camel Context
-modeler.element.properties.genericCamelRouteEvent.additionalRoutes = Zusätzliche Route-Definitions
+modeler.element.properties.genericCamelRouteEvent.routeDefinition = Route Definition
modeler.element.properties.genericCamelRouteEvent.additionalBeans = Zusätzliche Bean-Spezifikationen
### Common ###
diff --git a/web-modeler/src/main/resources/bpm-modeler-client-messages_en.properties b/web-modeler/src/main/resources/bpm-modeler-client-messages_en.properties
index c739c81..d79a0d3 100644
--- a/web-modeler/src/main/resources/bpm-modeler-client-messages_en.properties
+++ b/web-modeler/src/main/resources/bpm-modeler-client-messages_en.properties
@@ -621,7 +621,7 @@ modeler.element.properties.timerEvent.fixedRate=Fixed Rate
### Generic Camel Route Event Overlay ###
modeler.element.properties.genericCamelRouteEvent.title = Generic Camel Route Event
modeler.element.properties.genericCamelRouteEvent.camelContext = Camel Context
-modeler.element.properties.genericCamelRouteEvent.additionalRoutes = Additional Route Definitions
+modeler.element.properties.genericCamelRouteEvent.routeDefinition = Route Definition
modeler.element.properties.genericCamelRouteEvent.additionalBeans = Additional Bean Specifications
### Common ###
diff --git a/web-modeler/src/main/resources/bpm-modeler-client-messages_zh_CN.properties b/web-modeler/src/main/resources/bpm-modeler-client-messages_zh_CN.properties
index 60ee22c..42d1dc3 100644
--- a/web-modeler/src/main/resources/bpm-modeler-client-messages_zh_CN.properties
+++ b/web-modeler/src/main/resources/bpm-modeler-client-messages_zh_CN.properties
@@ -586,7 +586,7 @@ modeler.element.properties.timerEvent.fixedRate=+Fixed Rate
### Generic Camel Route Event Overlay ###
modeler.element.properties.genericCamelRouteEvent.title = +Generic Camel Route Event
modeler.element.properties.genericCamelRouteEvent.camelContext = +Camel Context
-modeler.element.properties.genericCamelRouteEvent.additionalRoutes = +Additional Route Definitions
+modeler.element.properties.genericCamelRouteEvent.routeDefinition = +Route Definition
modeler.element.properties.genericCamelRouteEvent.additionalBeans = +Additional Bean Specifications
### Common ###