public static java.lang.String | buildRicoXML(java.util.HashMap map, java.lang.String element, java.lang.String message)
StringBuffer ricoXML = new StringBuffer("<ajax-response>");
String key = "";
String value = "";
// loop through all the map entries.
Iterator it = map.entrySet().iterator();
while (it.hasNext())
{
Map.Entry e = (Map.Entry) it.next();
value = (String) e.getValue();
key = (String) e.getKey();
ricoXML.append("\r\n <response type=\"element\" id=\"" + key + "\">" + "<input type=\"text\" id=\"inner"+key+"\" name=\"inner"+key+"\" value=\""+value+"\" /></response>");
}
ricoXML.append("\r\n <response type=\"element\" id=\"message\" name=\"message\">"+message+"</response>");
ricoXML.append("\r\n</ajax-response>");
return ricoXML.toString();
|