PropertyEventMethodIndex
WebSquare.session - 5.0_4.4547B.20211124.201933

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
nametyperequireddescription
keyStringYKey in the browser session
Return
typedescription
ObjectInstance for the specified retType
Sample
WebSquare.session.getAttribute( "custInfo" );
removeAttribute( key )
Removes the session attributes. Returns the existing data.
Parameter
nametyperequireddescription
keyStringYKey in the browser session
Return
typedescription
ObjectRemoved session value
Sample
WebSquare.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
nametyperequireddescription
keyStringYName in the browser session
valueStringYKey in the browser session
Sample
WebSquare.session.setAttribute("userName", "Sam");