diff --git a/ONAP-REST/src/main/java/org/onap/policy/rest/util/MSModelUtils.java b/ONAP-REST/src/main/java/org/onap/policy/rest/util/MSModelUtils.java
index 91e7626..7db16bd 100644
--- a/ONAP-REST/src/main/java/org/onap/policy/rest/util/MSModelUtils.java
+++ b/ONAP-REST/src/main/java/org/onap/policy/rest/util/MSModelUtils.java
@@ -96,6 +96,7 @@
 	public static final String STRING="string";
 	public static final String INTEGER="integer";
 	public static final String LIST="list";
+	public static final String MAP="map";
 	public static final String DEFAULT=".default";
 	public static final String MANYFALSE=":MANY-false";
 	public static final String MANYTRUE=":MANY-true";
@@ -1075,7 +1076,7 @@
 					attributeIndividualStringBuilder.append(requiredValue+MANYFALSE);
 					dataMapForJson.put(uniqueDataKey, attributeIndividualStringBuilder.toString());		
 				}
-				else if(typeValue != null && typeValue.equalsIgnoreCase(LIST)){
+				else if(LIST.equalsIgnoreCase(typeValue) || MAP.equalsIgnoreCase(typeValue)){
 					logger.info("requiredValue is:"+ requiredValue);
 					String findList= DATATYPE+uniqueDataKeySplit[0]+PROPERTIES+uniqueDataKeySplit[1]+".entry_schema.type";
 					String listValue=map.get(findList);
@@ -1091,7 +1092,11 @@
 						}//Its string
 						else{
 							StringBuilder stringListItems= new StringBuilder();
-							stringListItems.append(uniqueDataKeySplit[1].toUpperCase()+REQUIREDVALUE+requiredValue +MANYFALSE);
+							if(LIST.equalsIgnoreCase(typeValue)){
+							    stringListItems.append(uniqueDataKeySplit[1].toUpperCase()+":required-"+requiredValue +":MANY-false");
+							}else if( MAP.equalsIgnoreCase(typeValue)){
+								stringListItems.append(uniqueDataKeySplit[1].toUpperCase()+":required-"+requiredValue +":MANY-true");
+							}
 							dataMapForJson.put(uniqueDataKey, stringListItems.toString());
 							dataListBuffer.append(uniqueDataKeySplit[1].toUpperCase()+"=[");
 							for(int i=0;i<10;i++){
diff --git a/POLICY-SDK-APP/src/main/webapp/app/policyApp/controller/dictionaryController/MSHeaderDefaultValuesDictController.js b/POLICY-SDK-APP/src/main/webapp/app/policyApp/controller/dictionaryController/MSHeaderDefaultValuesDictController.js
index 883ac25..960d76b 100644
--- a/POLICY-SDK-APP/src/main/webapp/app/policyApp/controller/dictionaryController/MSHeaderDefaultValuesDictController.js
+++ b/POLICY-SDK-APP/src/main/webapp/app/policyApp/controller/dictionaryController/MSHeaderDefaultValuesDictController.js
@@ -112,12 +112,13 @@
 	    			data: JSON.stringify(postData),
 	    			success : function(data){
 	    				$scope.$apply(function(){
-	    					$scope.microServiceAttributeDictionaryDatas=data.microServiceHeaderDefaultDatas;});
+	    					$scope.microServiceHeaderDefaultDatas=data.microServiceHeaderDefaultDatas;});
+	    				    console.log("microServiceHeaderDefaultDatas returned after saved: " + $scope.microServiceHeaderDefaultDatas);
 	    				if($scope.microServiceAttributeDictionaryDatas == "Duplicate"){
 	    					Notification.error("Model Attribute Dictionary exists with Same Attribute Name.")
 	    				}else{      
-	    					console.log($scope.microServiceAttributeDictionaryDatas);
-	    					$modalInstance.close({microServiceAttributeDictionaryDatas:$scope.microServiceAttributeDictionaryDatas});
+	    					console.log($scope.microServiceHeaderDefaultDatas);
+	    					$modalInstance.close({microServiceHeaderDefaultDatas:$scope.microServiceHeaderDefaultDatas});
 	    				}
 	    			},
 	    			error : function(data){
diff --git a/POLICY-SDK-APP/src/main/webapp/app/policyApp/controller/dictionaryGridController/MSHeaderDefaultValuesDictGridController.js b/POLICY-SDK-APP/src/main/webapp/app/policyApp/controller/dictionaryGridController/MSHeaderDefaultValuesDictGridController.js
index 5a86c14..4e6b969 100644
--- a/POLICY-SDK-APP/src/main/webapp/app/policyApp/controller/dictionaryGridController/MSHeaderDefaultValuesDictGridController.js
+++ b/POLICY-SDK-APP/src/main/webapp/app/policyApp/controller/dictionaryGridController/MSHeaderDefaultValuesDictGridController.js
@@ -143,7 +143,7 @@
     };
 
     $scope.deleteModelAttribute = function(data) {
-        modalService.popupConfirmWin("Confirm","You are about to delete the Header Default Values :  "+data.name+". Do you want to continue?",
+        modalService.popupConfirmWin("Confirm","You are about to delete the Header Default Values :  "+data.modelName+". Do you want to continue?",
             function(){
                 var uuu =  "deleteDictionary/ms_dictionary/remove_headerDefaults";
                 var postData={data: data};
diff --git a/POLICY-SDK-APP/src/main/webapp/app/policyApp/policy-models/Editor/PolicyTemplateController/DCAEMicroServicePolicyController.js b/POLICY-SDK-APP/src/main/webapp/app/policyApp/policy-models/Editor/PolicyTemplateController/DCAEMicroServicePolicyController.js
index 1b43370..dca8e91 100644
--- a/POLICY-SDK-APP/src/main/webapp/app/policyApp/policy-models/Editor/PolicyTemplateController/DCAEMicroServicePolicyController.js
+++ b/POLICY-SDK-APP/src/main/webapp/app/policyApp/policy-models/Editor/PolicyTemplateController/DCAEMicroServicePolicyController.js
@@ -99,9 +99,9 @@
 		var j = data;
 		$scope.data = JSON.parse(j.data);
 		console.log($scope.data);
-		console.log("$scope.data.microServiceCongigNameDictionaryDatas : " + $scope.data.microServiceCongigNameDictionaryDatas);
-		if($scope.data.microServiceCongigNameDictionaryDatas){
- 		    $scope.microServiceCongigNameDictionaryDatas = JSON.parse($scope.data.microServiceCongigNameDictionaryDatas);
+		console.log("$scope.data.microServiceConfigNameDictionaryDatas : " + $scope.data.microServiceConfigNameDictionaryDatas);
+		if($scope.data.microServiceConfigNameDictionaryDatas){
+ 		    $scope.microServiceCongigNameDictionaryDatas = JSON.parse($scope.data.microServiceConfigNameDictionaryDatas);
 		}
 		console.log($scope.microServiceCongigNameDictionaryDatas);
 	}, function (error) {
@@ -748,23 +748,32 @@
 		    		
 		    		var subAttributes = $scope.dcaeModelData.sub_attributes;
 		    		
-		    		if(subAttributes){		    			
-		    			var jsonObject = JSON.parse(subAttributes);		    			
-		    			var allkeys = Object.keys(jsonObject);
-		    			if(allkeys){
-		    				for (var k = 0; k < allkeys.length; k++) {
-		    					var keyValue = allkeys[k];
-		    					console.log(" keyValue:jsonObject["+keyValue+ "]: " + jsonObject[keyValue]);
-		    					if(jsonObject[keyValue]){
-		    						var tempObject = jsonObject[keyValue];
-		    						if(tempObject && tempObject[key]){
-		    				        	if (tempObject[key].includes('required-true')){
+ 		    		if(subAttributes){		    			
+		    			var jsonObject = JSON.parse(subAttributes);	
+		    			
+		    		    var lablInfo = findVal(jsonObject, attributekey);
+		    			console.log("deconstructJSON:findValue : " + attributekey +": "+ lablInfo);
+			        	if (lablInfo){
+			        		if(lablInfo.includes('required-true')){
+			        			isRequired = true;
+			        		}	
+			        	}else{			        	
+		    		 	   var allkeys = Object.keys(jsonObject);
+		    			   if(allkeys){
+		    				   for (var k = 0; k < allkeys.length; k++) {
+		    					  var keyValue = allkeys[k];
+		    					  console.log(" keyValue:jsonObject["+keyValue+ "]: " + jsonObject[keyValue]);
+		    					  if(jsonObject[keyValue]){
+		    						 var tempObject = jsonObject[keyValue];
+		    						 if(tempObject && tempObject[key]){
+		    				        	 if (tempObject[key].includes('required-true')){
 		    				        		isRequired = true;
-		    				        	}	
-		    						}
-		    					}
-		    				}		    				
-		    			}		    			
+		    				        	 }	
+		    						 }
+		    					  }
+		    				   }		    				
+		    			   }		    			
+			        	} 
 		    		}
 		    		
 		    		var elementObject = {};
