Examples of RenderResult


Examples of cn.bran.japid.template.RenderResult

    @Override
    protected void doLayout() {
    }
   
    public RenderResult render(String str, Integer i) {
      return new RenderResult();
    }
View Full Code Here

Examples of cn.bran.japid.template.RenderResult

    public Foo2(StringBuilder out) {
      super(out);
    }

    public RenderResult render(List<String> lists) {
      return new RenderResult();
    }
View Full Code Here

Examples of cn.bran.japid.template.RenderResult

    public Bar(StringBuilder out) {
      super(out);
    }
   
    public RenderResult render() {
      return new RenderResult();
    }
View Full Code Here

Examples of cn.bran.japid.template.RenderResult

    try {
      play.classloading.enhancers.ControllersEnhancer.ControllerInstrumentation.initActionCall();
      runPlayAction();
      throw new RuntimeException("No render result from running play action. Probably the action was not using Japid templates.");
    } catch (JapidResult jr) {
      RenderResult rr = jr.getRenderResult();
//      if (shouldCache()) {
////        play.cache.Cache.set(keyString, jr, cacheForVal);
//        System.out.println("put in result cache");
//        RenderResultCache.set(keyString, rr, cacheForVal);
//      }
View Full Code Here

Examples of cn.bran.japid.template.RenderResult

   * @param args
   *            arguments
   */
  public static <T extends JapidTemplateBase> void render(Class<T> c, Object... args) {
    try {
      RenderResult rr = invokeRender(c, args);
      throw new JapidResult(rr);
    } catch (Exception e) {
      if (e instanceof JapidResult)
        throw (JapidResult) e;
      // e.printStackTrace();
View Full Code Here

Examples of cn.bran.japid.template.RenderResult

    try {
      // String methodName = "render";
      Constructor<T> ctor = c.getConstructor(StringBuilder.class);
      StringBuilder sb = new StringBuilder(8000);
      T t = ctor.newInstance(sb);
      RenderResult rr = (RenderResult) RenderInvokerUtils.render(t, args);
      // RenderResult rr = (RenderResult) MethodUtils.invokeMethod(t,
      // methodName, args);
      return rr;
    } catch (NoSuchMethodException e) {
      throw new RuntimeException("Could not match the arguments with the template args.");
View Full Code Here

Examples of cn.bran.japid.template.RenderResult

      String templateFileName = templateClassName.replace(DOT, '/') + HTML;
      throw new RuntimeException("Could not find a Japid template with the name of: " + templateFileName);
    } else {
      Class tClass = appClass.javaClass;
      if (JapidTemplateBase.class.isAssignableFrom(tClass)) {
        RenderResult rr;
        // render(tClass, args);
        rr = invokeRender(tClass, args);
        return (rr);
      } else {
        throw new RuntimeException("The found class is not a Japid template class: " + templateClassName);
View Full Code Here

Examples of cn.bran.japid.template.RenderResult

      // assuming second
      ttl += "s";
    }

    String base = StackTraceUtils.getCaller();
    RenderResult rr = getFromCache(base, objects);
    if (rr == null) {
      rr = runner.run();
      cache(rr, ttl, base, objects);
    }
    // System.out.println("render show took ms: " + rr.getRenderTime());
View Full Code Here

Examples of cn.bran.japid.template.RenderResult

   * downstream of the pipeline
   *
   * @param r
   */
  protected static void render(CacheableRunner r) {
    RenderResult rr = r.run();
    throw new JapidResult(rr);
  }
View Full Code Here

Examples of org.olat.core.gui.render.RenderResult

            // session, can be used as a bookmark. that is, urls from our framework are bookmarkable, but require some little
            // coding effort: setting an appropriate business path and launching for each controller.
            // note: the businesspath may also be used as a easy (but of course not perfect) back-button-solution:
            // if the timestamp of a request is outdated, simply jump to its bookmarked business control path.
            URLBuilder ubu = new URLBuilder(uriPrefix, getInstanceId(), newTimestamp, wbackofficeImpl);
            RenderResult renderResult = new RenderResult();
           
            // if we have an around-component-interception
            // set the handler for this render cycle
            InterceptHandler interceptHandler = wbackofficeImpl.getInterceptHandler();
            if (interceptHandler != null) {
              InterceptHandlerInstance dhri = interceptHandler.createInterceptHandlerInstance();
              renderResult.setInterceptHandlerRenderInstance(dhri);
            }
           
            Renderer fr = Renderer.getInstance(top, top.getTranslator(), ubu, renderResult, gsettings);
            long rstart = 0;
            if (isDebugLog) {
              rstart = System.currentTimeMillis();
            }
            result = fr.render(top).toString();
            if (isDebugLog) {
              long rstop = System.currentTimeMillis();
              long diff = rstop - rstart;
              debugMsg.append("render:").append(diff).append(LOG_SEPARATOR);
            }
            if (renderResult.getRenderException() != null) throw new OLATRuntimeException(Window.class, renderResult.getLogMsg(),
                renderResult.getRenderException());
   
            // after rendering we know if some component awaits further async
            // calls
            // like images, so get a handler
            AsyncMediaResponsible amr = renderResult.getAsyncMediaResponsible();
            setAsyncMediaResponsible(amr); // if amr == null -> we are not
            // excepting
            // any async calls in the near future...
            latestTimestamp = newTimestamp;
          }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.