001 package com.khubla.pragmatach.examples.routesexample;
002
003 import com.khubla.pragmatach.framework.annotation.Controller;
004 import com.khubla.pragmatach.framework.annotation.Route;
005 import com.khubla.pragmatach.framework.annotation.RouteParameter;
006 import com.khubla.pragmatach.framework.annotation.View;
007 import com.khubla.pragmatach.framework.api.PragmatachException;
008 import com.khubla.pragmatach.framework.api.Response;
009 import com.khubla.pragmatach.plugin.freemarker.FreemarkerController;
010
011 @Controller(name = "ExampleRoutesController2")
012 @View(view = "exampleRoutesController2.ftl")
013 public class ExampleRoutesController2 extends FreemarkerController {
014 /**
015 * the message
016 */
017 private String message = "hello world";
018
019 public String getMessage() {
020 return message;
021 }
022
023 @Route(uri = "/exampleRoutesController2/@str1/ststst/@str2")
024 public Response render(@RouteParameter(name = "str1") String string1, @RouteParameter(name = "str2") String string2) throws PragmatachException {
025 message = string1 + string2;
026 return super.render();
027 }
028 }