- Changes based on feedback - Extra error check - Fix error message Signed-off-by: Gleb Aronsky <gleb.aronsky@lexisnexis.com>
@@ -1842,7 +1842,7 @@ function createEnvXmlView(allrows, compName, subRecordIndex) {
YAHOO.util.UserAction.click(top.document.rightDT.getFirstTrEl());
},
failure: function(o) {
- alert("Failed to delete attribute. (XPath maybe ambiguous. A manual edit of the XML configuration file maybe required to delete this attribute.) ");
+ alert("Failed to add attribute. (XPath maybe ambiguous. A manual edit of the XML configuration file maybe required to add this attribute.) ");
scope: this
@@ -4187,6 +4187,9 @@ bool CWsDeployFileInfo::handleAttributeAdd(IEspContext &context, IEspHandleAttri
StringBuffer xpath = pSetting->queryProp(XML_ATTR_PARAMS);
StringBuffer attribName = pSetting->queryProp(XML_ATTR_ATTRIB);
+ if (attribName.length() == 0)
+ throw MakeStringException(-1,"Attribute name can't be empty!");
+
IPropertyTree* pComp = pEnvRoot->getPropTree(xpath.str());
if (pComp != NULL)