All Downloads are FREE. Search and download functionalities are using the official Maven repository.

spark.template.rocker.RockerEngine Maven / Gradle / Ivy

The newest version!
package spark.template.rocker;

import java.util.Map;

import com.fizzed.rocker.Rocker;
import spark.ModelAndView;
import spark.TemplateEngine;

/**
 */
public class RockerEngine extends TemplateEngine {

    /**
     * {@inheritDoc}
     */
    @Override
    public String render(ModelAndView modelAndView) {
	return Rocker.template(modelAndView.getViewName())
	    .bind((Map)modelAndView.getModel())
	    .render()
	    .toString();
    }

}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy