Exemplo n.º 1
0
 @Override
 public void renderMenuClose(Appendable writer, Map<String, Object> context, ModelMenu menu)
     throws IOException {
   Map<String, Object> parameters = null;
   if (ModelWidget.widgetBoundaryCommentsEnabled(context)) {
     parameters = new HashMap<String, Object>();
     StringBuilder sb = new StringBuilder("End Menu Widget ");
     sb.append(menu.getBoundaryCommentName());
     parameters.put("boundaryComment", sb.toString());
   }
   try {
     executeMacro(writer, "renderMenuEnd", parameters);
   } catch (TemplateException e) {
     throw new IOException(e);
   }
 }
Exemplo n.º 2
0
 @Override
 public void renderMenuOpen(Appendable writer, Map<String, Object> context, ModelMenu menu)
     throws IOException {
   Map<String, Object> parameters = new HashMap<String, Object>();
   if (ModelWidget.widgetBoundaryCommentsEnabled(context)) {
     StringBuilder sb = new StringBuilder("Begin Menu Widget ");
     sb.append(menu.getBoundaryCommentName());
     parameters.put("boundaryComment", sb.toString());
   }
   parameters.put("id", menu.getId());
   parameters.put("style", menu.getMenuContainerStyle(context));
   parameters.put("title", menu.getTitle(context));
   try {
     executeMacro(writer, "renderMenuBegin", parameters);
   } catch (TemplateException e) {
     throw new IOException(e);
   }
 }