merging 10016 to the trunk

This commit is contained in:
tworrall 2012-08-28 15:34:57 +00:00
parent b0f4e7e820
commit 9a4415ea04
3 changed files with 11 additions and 2 deletions

View file

@ -64,6 +64,8 @@ public class ListClassGroupsController extends FreemarkerHttpServlet {
if ( StringUtils.isBlank(publicName) ) {
publicName = "(unnamed group)";
}
publicName = publicName.replace("\"","\\\"");
publicName = publicName.replace("\'","\\\'");
try {
json += "{ \"name\": \"<a href='./editForm?uri="+URLEncoder.encode(vcg.getURI(),"UTF-8")+"&amp;controller=Classgroup'>"+publicName+"</a>\", ";
} catch (Exception e) {
@ -90,6 +92,8 @@ public class ListClassGroupsController extends FreemarkerHttpServlet {
}
String shortDefStr = (vcw.getShortDef() == null) ? "" : vcw.getShortDef();
shortDefStr = shortDefStr.replace("\"","\\\"");
shortDefStr = shortDefStr.replace("\'","\\\'");
json += "\"data\": { \"shortDef\": \"" + shortDefStr + "\"}, \"children\": [] ";
if (classIt.hasNext())
json += "} , ";

View file

@ -70,8 +70,10 @@ public class ListPropertyGroupsController extends FreemarkerHttpServlet {
if ( StringUtils.isBlank(publicName) ) {
publicName = "(unnamed group)";
}
publicName = publicName.replace("\"","\\\"");
publicName = publicName.replace("\'","\\\'");
try {
json += "{ \"name\": \"<a href='./editForm?uri="+URLEncoder.encode(pg.getURI(),"UTF-8")+"&amp;controller=Classgroup'>"+publicName+"</a>\", ";
json += "{ \"name\": \"<a href='./editForm?uri="+URLEncoder.encode(pg.getURI(),"UTF-8")+"&amp;controller=Classgroup'>" + publicName + "</a>\", ";
} catch (Exception e) {
json += "{ \"name\": \"" + publicName + "\", ";
}

View file

@ -208,7 +208,10 @@ public class ShowClassHierarchyController extends FreemarkerHttpServlet {
tempString += "\" " + ((vcw.getLocalNameWithPrefix() == null) ? "" : vcw.getLocalNameWithPrefix()) + "\", ";
}
tempString += "\"data\": { \"shortDef\": \"" + ((vcw.getShortDef() == null) ? "" : vcw.getShortDef()) + "\", ";
String shortDef = ((vcw.getShortDef() == null) ? "" : vcw.getShortDef()) ;
shortDef = shortDef.replace("\"","\\\"");
shortDef = shortDef.replace("\'","\\\'");
tempString += "\"data\": { \"shortDef\": \"" + shortDef + "\", ";
// Get group name if it exists
VClassGroupDao groupDao= wadf.getVClassGroupDao();