| author | Sidharth Singh | 2012-08-17 01:50:26 (EDT) |
|---|---|---|
| committer | Manik Kishore | 2012-08-17 01:50:26 (EDT) |
| commit | 06425204030eb4985b3bac9ae68d23856d2f00a0 (patch) (side-by-side diff) | |
| tree | 29434860bee1509988cb9163de1ce7cf04b13313 | |
| parent | 1e402c54fddebc852abd573566364b165d871c90 (diff) | |
| download | org.eclipse.stardust.ui.web-06425204030eb4985b3bac9ae68d23856d2f00a0.zip org.eclipse.stardust.ui.web-06425204030eb4985b3bac9ae68d23856d2f00a0.tar.gz org.eclipse.stardust.ui.web-06425204030eb4985b3bac9ae68d23856d2f00a0.tar.bz2 | |
Jira-ID: CRNT-25692
1)Removed NPE in ModelService.java for Structured Types loading
2)Made Data Id generate using Data name in m_data.js
3)Added check for NPE in MBFacade createFullId
git-svn-id: http://emeafrazerg/svn/ipp/product/trunk/stardust/ui.web@58464 8100b5e0-4d52-466c-ae9c-bdeccbdeaf6b
3 files changed, 8 insertions, 8 deletions
diff --git a/web-modeler/src/main/java/org/eclipse/stardust/ui/web/modeler/service/ModelService.java b/web-modeler/src/main/java/org/eclipse/stardust/ui/web/modeler/service/ModelService.java index 2534de3..8a1db85 100644 --- a/web-modeler/src/main/java/org/eclipse/stardust/ui/web/modeler/service/ModelService.java +++ b/web-modeler/src/main/java/org/eclipse/stardust/ui/web/modeler/service/ModelService.java @@ -1353,7 +1353,8 @@ public class ModelService if (xsdTypeDefinition.getName().equals(typeDeclaration.getId()))
{
- if (xsdTypeDefinition.getComplexType() != null)
+ if (xsdTypeDefinition.getComplexType() != null
+ && xsdTypeDefinition.getComplexType().getElement() != null)
{
typeDeclarationJson.addProperty(TYPE_PROPERTY, "STRUCTURE_TYPE");
diff --git a/web-modeler/src/main/resources/META-INF/xhtml/js/m_data.js b/web-modeler/src/main/resources/META-INF/xhtml/js/m_data.js index 3e5399f..96dcaee 100644 --- a/web-modeler/src/main/resources/META-INF/xhtml/js/m_data.js +++ b/web-modeler/src/main/resources/META-INF/xhtml/js/m_data.js @@ -21,7 +21,7 @@ define([ "m_utils", "m_constants", "m_modelElement", "m_command", "m_commandsCon var data = new Data();
var index = model.getNewDataIndex();
- data.initialize(model, "Data" + index, "Data " + index);
+ data.initialize(model, "Data " + index);
data.type = m_constants.PRIMITIVE_DATA_TYPE;
data.primitiveDataType = m_constants.STRING_PRIMITIVE_DATA_TYPE;
@@ -33,8 +33,8 @@ define([ "m_utils", "m_constants", "m_modelElement", "m_command", "m_commandsCon var data = new Data();
var index = model.getNewDataIndex();
- data.initialize(model, dataStructure.id + index,
- dataStructure.name + index, m_constants.STRUCTURED_DATA_TYPE);
+ data.initialize(model, dataStructure.name + index,
+ m_constants.STRUCTURED_DATA_TYPE);
data.type = m_constants.STRUCTURED_DATA_TYPE;
data.structuredDataTypeFullId = dataStructure.getFullId();
@@ -72,9 +72,9 @@ define([ "m_utils", "m_constants", "m_modelElement", "m_command", "m_commandsCon /**
*
*/
- Data.prototype.initialize = function(model, id, name) {
+ Data.prototype.initialize = function(model, name) {
this.model = model;
- this.id = id;
+ this.id = m_utils.generateIDFromName(name);
this.name = name;
// TODO This implies that even data created implicitly from data symbol creation would remain in the model
@@ -126,7 +126,7 @@ define([ "m_utils", "m_constants", "m_modelElement", "m_command", "m_commandsCon *
*/
Data.prototype.submitCreation = function() {
- return m_commandsController.submitCommand(m_command
+ m_commandsController.submitCommand(m_command
.createCreateStructuredDataCommand(this.model.id, this.model.id,
{
"name" : this.name,
diff --git a/web-modeler/src/main/resources/META-INF/xhtml/js/m_diagram.js b/web-modeler/src/main/resources/META-INF/xhtml/js/m_diagram.js index ce7a29c..ba45d14 100644 --- a/web-modeler/src/main/resources/META-INF/xhtml/js/m_diagram.js +++ b/web-modeler/src/main/resources/META-INF/xhtml/js/m_diagram.js @@ -563,7 +563,6 @@ define( }
}
}
- this.lastSymbol = null;
// Apply changes
|

