Created
February 1, 2012 08:46
-
-
Save mathieuancelin/1715999 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public class Application extends Controller { | |
@Inject static MyBean myBean; | |
public static void index() { | |
myBean.currentUserId = session.get("id"); | |
DataFromSomewhere data = myBean.getData(); | |
render(data); | |
} | |
} | |
@RequestScoped | |
public class MyBean { | |
@Inject @FromWS DataClient; | |
public String currentUserId; | |
public DataFromSomewhere getData() { ... } | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment