0
有什么区别:getExternalContext()getSessionMap()获得( “豆”)
public class GameController implements Serializable{
@ManagedProperty(value="#{Gamebean}")
private Game game;
和
public class GameController implements Serializable{
private Game game;
public GameController(){
game =(Game)FacesContext.getCurrentInstance().getExternalContext().getSessionMap().get("Gamebean");
}
,如果没有什么区别哪种方法更好? 干杯。
感谢您回复:D – gastonovic