package demo.helloworld;

import act.Act;
import org.osgl.mvc.annotation.GetAction;

import static act.controller.Controller.Util.render;

/**
 * The simple hello world app.
 * <p>Run this app, try to update some of the code, then
 * press F5 in the browser to watch the immediate change
 * in the browser!</p>
 */
@SuppressWarnings("unused")
public class HelloWorldApp {

    @GetAction
    public void home(String who) {
        who = null == who ? "world" : who;
        render(who);
    }

    public static void main(String[] args) throws Exception {
        Act.start("Hello World");
    }

}

@@ -35,16 +35,42 @@
 ct.Act;%0A
+import act.inject.DefVal;%0A
 import o
@@ -432,64 +432,38 @@
 ome(
-String who) %7B%0A        who = null == who ? %22world%22 :
+@DefVal(%22world%22) String
  who
-;
+) %7B
 %0A   

update HelloWorld sample with new @DefVal annotation