@Override
 public String put(K key, String value) {
   value = TemplateEngineHelper.externalizeTemplateString(template.getTemplateInfo(), value);
   String v = super.put(key, value);
   template.setDirty();
   return v;
 }
 @Override
 public void putAll(Map<? extends K, ? extends String> map) {
   for (K key : map.keySet()) {
     String value = map.get(key);
     value = TemplateEngineHelper.externalizeTemplateString(template.getTemplateInfo(), value);
     super.put(key, value);
   }
   template.setDirty();
 }