Exemplo n.º 1
0
  @Override
  public void doAdmin(
      HttpServletRequest request, HttpServletResponse response, SWBParamRequest paramReq) {
    SWBResourceURL url = paramReq.getActionUrl();
    Resource base = getResourceBase();
    try {
      VelocityContext context = new VelocityContext();
      WebPage hp = base.getWebSite().getHomePage();
      LinkedHashMap<String, String> pages = SWBEmbedPages.getPages(hp, "-");
      context.put("pages", pages);
      context.put("actionURL", url);

      context.put("msg", request.getParameter("msg"));
      context.put("sitePage", base.getAttribute("sitePage", "0"));
      context.put("pageItems", base.getAttribute("pageItems", "0"));
      context.put("newWindow", base.getAttribute("newWindow", "0"));
      SWBEmbedTemplates.buildTemplate(response, context, "SWBEmbedWidgetAdmin", base);
    } catch (Exception e) {
      log.error(
          "Ocurrió un error durante la construcción de la vista de administración. "
              + e.getMessage());
      e.printStackTrace();
    }
  }