Code Monkey home page Code Monkey logo

Comments (2)

artdaw avatar artdaw commented on May 24, 2024

From [email protected] on August 12, 2011 01:53:45
Proposed implementation:

/**
 * Renders results with a template.
 *
 * This call must be the last call in the action.
 *
 @param template - template name, can be "list"  - for a view whose name is different than the name of this action, or
 *             "/another_controller/any_view" - this is a reference to a view from another controller. The format of this
 * parameter should be either a single word or words separated by slash: '/'. If this is a single word, than
 * it is assumed that template belongs to current controller, if there is a slash used as a separator, then the
 * first word is assumed to be a name of another controller.
 * @param values map with values to pass to view.
 * @return instance of {@link RenderBuilder}, which is used to provide additional parameters.
 */
@Override
protected RenderBuilder render(String template, Map values) {
    String targetTemplate = template.startsWith("/")? template: Router.getControllerPath(getClass())
            + "/" + template;
    return super.render(targetTemplate, values);    
}

from activeweb.

ipolevoy avatar ipolevoy commented on May 24, 2024

this does not produce an exception anymore, closing

from activeweb.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.