I called a method in a session scoped bean successfully for the first time, but nothing happened in the following calls. Here are some relative codes.
Date dt=(Date) ((UIOutput) JSFUtil.findComponent("date1")).getValue();
if (dt==null){
requestScope.put("message", "Please select a date for the arrangement.");
return;
}
requestScope is a local variable in the bean and is initialized in the constructor using
FacesContext.getCurrentInstance().getExternalContext().getRequestMap();
But if I get the requestMap each time just before I use it, everything is OK. That would be inconvenient.
Any suggestion is appreciated.