Skip to content

Instantly share code, notes, and snippets.

@mathieuancelin
Created February 1, 2012 08:46
Show Gist options
  • Save mathieuancelin/1715999 to your computer and use it in GitHub Desktop.
Save mathieuancelin/1715999 to your computer and use it in GitHub Desktop.
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