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);
 }
コード例 #2
0
 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;
   }
 }