hi,
I have authenticator method, and afterr successfull login user is redirected to second
page.
On second page some values are getted from bean "gameAction" (SFSB).
I thought that to create this SFSB in authenticator bean and set this values and inject
this bean to session.
Here I found an example how to access to bean from another bean.
| Map session = FacesContext.getCurrentInstance().getExternalContext().getSessionMap();
| GameAction backBean = (GameAction)session.get("gameAction");
|
when user first time login my GameAction bean is always null so, i check this and create
my new bean.
| if (backBean == null) {
| backBean = new GameAction(Long id, String name);
| backBean.setPlanetName("Earth");
| session.put("gameAction", backBean);
| }
|
and on my page i get planetName like <h:output....
Is this right idea? or maybe is better way to create new bean and set fields?
View the original post :
http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4057756#...
Reply to the post :
http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&a...