Manages the sessions stored on the browser.
WebSquare.session.getAttribute Gets the session attribute.
WebSquare.session.removeAttribute Removes the session attribute. The previously stored value will be returned.
WebSquare.session.removeSession Removes all sessions in the browser.
WebSquare.session.setAttribute Sets a session attribute in the browser. Or overwrites.
Type
- engine
Property Summary
Event Summary
Method Summary
- getAttribute( key )
- Gets the session attribute.
- removeAttribute( key )
- Removes the session attribute.
- removeSession( )
- Removes all sessions in the browser.
- setAttribute( key , value )
- Sets (or overwrites) a session attribute in the browser.
Property Detail
Event Detail
Method Detail
- getAttribute( key )
-
Gets the session attribute.
Parameter name type required description key String Y Key in the browser session Return type description Object Instance for the specified retType SampleWebSquare.session.getAttribute( "custInfo" ); - removeAttribute( key )
-
Removes the session attributes. Returns the existing data.
Parameter name type required description key String Y Key in the browser session Return type description Object Removed session value SampleWebSquare.session.removeAttribute( "custInfo" ); - removeSession( )
-
Removes all sessions in the browser.Sample
WebSquare.session.removeSession(); - setAttribute( key , value )
-
Sets (or overwrites) a session attribute in the browser. The existing data, if any, will be overwritten.
Parameter name type required description key String Y Name in the browser session value String Y Key in the browser session SampleWebSquare.session.setAttribute("userName", "Sam");