luni, 13 aprilie 2015

[OmniFaces utilities (2.0)] Check whether the HTTP session was created for the first time in the current request


[OmniFaces utilities] The isSessionNew() method returns whether the HTTP session has been created for the first time in the current request (returns true). If not, returns false. This returns also false when there is no means of a HTTP session.

Method:
Usage:

boolean issessionnew = Faces.isSessionNew();
if(issessionnew){
   // do something
} else {
   // do something else
}

Niciun comentariu:

Trimiteți un comentariu