public void render(
      String calledName,
      Object[] args,
      Environment env,
      Map<String, String> attrs,
      utils.LocalTemplateArguments ltas) {
    if (!skipThisTemplate) {
      tryInitializeTemplate(calledName, args, env, attrs, ltas);
      tryInitializeVarsOnce();

      java.io.StringWriter s = new java.io.StringWriter();

      PrintWriter out = new java.io.PrintWriter(s);
      ThreadLocalOut.push(out);
      beforeRender();
      renderInternal();
      afterRender();
      ThreadLocalOut.popChecked(out);
      out = ThreadLocalOut.peek();

      tryWriteSpanOpen(out);
      out.write(s.toString());
      tryWriteSpanClose(out);
    }
  }
 public String executeTemplatePhase(int phase, String name, Object[] args, Environment env) {
   java.io.StringWriter s = new java.io.StringWriter();
   PrintWriter out = new java.io.PrintWriter(s);
   ThreadLocalOut.push(out);
   try {
     TemplateServlet temp = ((TemplateServlet) env.getTemplate(name).newInstance());
     switch (phase) {
       case 2:
         temp.validateInputs(name, args, env, null, null);
         break;
       case 4:
         temp.render(name, args, env, null, null);
         break;
     }
   } catch (Exception oe) {
     try {
       TemplateCall tcall = env.getWithcall(name); // 'elements' or requires arg
       TemplateServlet temp = ((TemplateServlet) env.getTemplate(tcall.name).newInstance());
       String parent = env.getWithcall(name) == null ? null : env.getWithcall(name).parentName;
       switch (phase) {
         case 2:
           temp.validateInputs(parent, tcall.args, env, null, null);
           break;
         case 4:
           temp.render(parent, tcall.args, env, null, null);
           break;
       }
     } catch (Exception ie) {
       oe.printStackTrace();
       ie.printStackTrace();
     }
   }
   ThreadLocalOut.popChecked(out);
   return s.toString();
 }
 protected void handleActionsInternal() {
   String ident = "";
   String forelementcounter = "0";
   int fallbackcounter = 0;
   boolean inForLoop = false;
   int forLoopCounter = 0;
   PrintWriter out = ThreadLocalOut.peek();
   ident = "";
   if (inForLoop) {
     ident += forelementcounter;
   }
   ident += "tcall499";
   ThreadLocalPage.get().enterTemplateContext("tcall499");
   try {
     Object[] args1193 = {"Name: "};
     utils.LocalTemplateArguments args21192 =
         env.getExtraLocalTemplateArguments("labelcolumnsString");
     if (args21192 != null) {
       args1193 = ArrayUtils.addAll(args1193, args21192.extraArgs);
     }
     if (templatecalls.get(ident) == null) {
       templatecalls.put(
           ident, (TemplateServlet) env.getTemplate("labelcolumnsString").newInstance());
     }
     org.webdsl.lang.Environment newenv = new Environment(env);
     newenv.putWithcall(
         "elements#labelcolumnsString",
         new utils.TemplateCall(
             "customerCustomer_ta0Customer_ta0Customer",
             getElementsContext(),
             new Object[] {arg0},
             attrs));
     Map<String, String> attrsmapout = TemplateCall.EmptyAttrs;
     ((TemplateServlet) templatecalls.get(ident))
         .handleActions("labelcolumnsString", args1193, newenv, attrsmapout, args21192);
     if (ThreadLocalPage.get().hasExecutedAction) return;
   } catch (Exception ex) {
     System.out.println("Problem occurred in template call: " + "labelcolumnsString(Name: )");
     utils.Warning.printSmallStackTrace(ex);
   }
   ident = "";
   ThreadLocalPage.get().leaveTemplateContext();
   ThreadLocalTemplate.set(this);
 }
 protected void handlePhase(int phase) {
   String ident = "";
   String forelementcounter = "0";
   int fallbackcounter = 0;
   boolean inForLoop = false;
   int forLoopCounter = 0;
   PrintWriter out = ThreadLocalOut.peek();
   switch (phase) {
     case DATABIND_PHASE:
       ident = root_wireframe0$l$_next10_;
       if (threadLocalPageCached.getParammap().get(ident) != null) {
         threadLocalPageCached.actionToBeExecutedHasDisabledValidation =
             root_next0.isValidationDisabled();
       }
       break;
     case ACTION_PHASE:
       ident = root_wireframe0$l$_next10_;
       if (threadLocalPageCached.getParammap().get(ident) != null) {
         if (isAjaxSubmitRequired(false)) {
           threadLocalPageCached.enableAjaxActionExecuted();
         }
         new root_next0().run(threadLocalPageCached, getEnv(), getElementsContext(), ident);
       }
       break;
     case RENDER_PHASE:
       if (isAjaxSubmitRequired(false)) {
         out.print(
             "<button submitid=\""
                 + root_wireframe0$l$_next10_
                 + "\" onclick='javascript:serverInvoke(\""
                 + threadLocalPageCached.getAbsoluteLocation()
                 + "/"
                 + threadLocalPageCached.getActionTarget()
                 + threadLocalPageCached.getExtraQueryAruments("?")
                 + "\",\""
                 + root_wireframe0$l$_next10_
                 + "\", ["
                 + threadLocalPageCached.getHiddenPostParamsJson()
                 + "],\""
                 + threadLocalPageCached.getFormIdent()
                 + "\", this, "
                 + "true"
                 + "); return false;'");
         {
           StringBuilder classattrs = new StringBuilder();
           StringBuilder styleattrs = new StringBuilder();
           java.util.List<String> ignore = new java.util.ArrayList<String>();
           java.util.List<String> ignorecols = new java.util.ArrayList<String>();
           utils.TemplateCall.getDynamicIgnoredAttributes(attrs, ignore);
           for (String attrcolname :
               utils.TemplateCall.getDynamicSelectedAttributeCollections(attrs)) {
             if (!ignorecols.contains(attrcolname)) {
               AttributeCollectionLookup.getAttributeCollection(
                   attrcolname, classattrs, styleattrs, ignore, ignorecols, out);
             }
           }
           utils.TemplateCall.appendWithPadding(classattrs, "float-right");
           if (!ignorecols.contains("submit")) {
             AttributeCollectionLookup.getAttributeCollection(
                 "submit", classattrs, styleattrs, ignore, ignorecols, out);
           }
           utils.TemplateCall.printClassStyleAttributes(classattrs, styleattrs, out);
         }
         out.print(">");
         if (RENDER_PHASE == phase) {
           try {
             utils.RenderUtils.printPageString("Next", out, threadLocalPageCached.isRawoutput());
           } catch (NullPointerException npe) {
             utils.Warning.warn("null reference prevented rendering of template element");
           } catch (IndexOutOfBoundsException ine) {
             utils.Warning.warn("index out of bounds prevented rendering of template element");
           }
         }
         out.print("</button>");
       } else {
         out.print("<button name=\"" + root_wireframe0$l$_next10_ + "\"");
         {
           StringBuilder classattrs = new StringBuilder();
           StringBuilder styleattrs = new StringBuilder();
           java.util.List<String> ignore = new java.util.ArrayList<String>();
           java.util.List<String> ignorecols = new java.util.ArrayList<String>();
           utils.TemplateCall.getDynamicIgnoredAttributes(attrs, ignore);
           for (String attrcolname :
               utils.TemplateCall.getDynamicSelectedAttributeCollections(attrs)) {
             if (!ignorecols.contains(attrcolname)) {
               AttributeCollectionLookup.getAttributeCollection(
                   attrcolname, classattrs, styleattrs, ignore, ignorecols, out);
             }
           }
           utils.TemplateCall.appendWithPadding(classattrs, "float-right");
           if (!ignorecols.contains("submit")) {
             AttributeCollectionLookup.getAttributeCollection(
                 "submit", classattrs, styleattrs, ignore, ignorecols, out);
           }
           utils.TemplateCall.printClassStyleAttributes(classattrs, styleattrs, out);
         }
         out.print(">");
         if (RENDER_PHASE == phase) {
           try {
             utils.RenderUtils.printPageString("Next", out, threadLocalPageCached.isRawoutput());
           } catch (NullPointerException npe) {
             utils.Warning.warn("null reference prevented rendering of template element");
           } catch (IndexOutOfBoundsException ine) {
             utils.Warning.warn("index out of bounds prevented rendering of template element");
           }
         }
         out.print("</button>");
       }
       break;
   }
 }