Mashup Builder > Widgets > Logout Button Widget
  
Logout Button Widget
The Logout Button Widget enables developers to display a Logout Button in a mashup that allows you to logout at runtime.
Configuration and Usage
Drag the logout button widget onto the mashup as desired.
Place the logout button inside a panel to see a more button like shape. The following dialog box appears when you drag the widget onto mashup and you can add a panel by clicking YES.
* 
The dialog box to add a panel appears when you select a responsive layout while designing the mashup. It does not appear for static layout.
The logout button is a responsive widget that can take up the whole space, if it is placed in a column of a layout by itself.
The logout button authentication works like the Platform. The Tomcat Session Manager manages the sessions on the client(browser) side by storing a cookie with a JSESSIONID in the browser. When a session is invalidated, the Tomcat Manager does not remove the cookie with JSESSIONID on the browser, but instead marks the cookie as invalid. When the browser attempts to use that invalid cookie to login, Tomcat Session Manager notifies ThingWorx that the cookie is invalid, and ThingWorx invokes the Authenticators again. If the authentication is successful, then a new session is created by Tomcat Session Manager and a new cookie is set on the browser with that new session’s JSESSIONID.
The logout button adds additional functionality, the feature which allows for redirection to another mashup or page upon logout.
* 
The Logout Button widget includes Beta style theme support.
The properties of logout button are listed below.
Property Name
Description
Base Type
Default Value
Bindable? (Y/N)
Localizable? (Y/N)
CustomClass
User defined CSS class to apply to the top div of the widget. Multiple classes can be entered, separated by a space.
STRING
n/a
Y
N
Label
The text that appears on the button.
STRING
Logout
N
Y
TabSequence
You can add index to the logout button in the tab sequence in the mashup.
NUMBER
0
N
N
RedirectMashup
You can specify the mashup to redirect to. No mashup will cause a reload. You can enter text in or bind to this property to redirect to another page on logout.
* 
You should enter the correct protocol, For eg: http://www.thingworx.com works but www.thingworx.com does not.
STRING
n/a
Y
N
ConfirmationRequired
You can set whether a confirmation is required while logging out.
BOOLEAN
False
N
N
ConfirmationTitle
You can specify the title for the optional confirmation dialog. You can modify the text on this dialog box.
STRING
Confirm Action
N
Y
ConfirmationPrompt
You can specify the prompt for the optional confirmation dialog.
STRING
Do Action?
N
Y
ConfirmationButton1Label
The Label for the first confirmation dialog button.
STRING
Yes
N
Y
ConfirmationButton2Label
The label for the second confirmation dialog button.
STRING
No
N
Y
DefaultConfirmationButton
You can set the default button for the confirmation dialog.
STRING
First Button
N
N
CancelConfirmationButton
You can set the cancel button for the confirmation dialog.
STRING
Second Button
N
N
RoundedCorners
You can make the corners of the widget rounded by selecting this.
BOOLEAN
True
N
N
Disabled
It disables the logout button in the mashup during run time.
BOOLEAN
False
Y
N
Style
You can set the logout button Style.
STYLEDEFINITION
DefaultButtonstyle
N
N
HoverStyle
You can set the logout button hover Style.
STYLEDEFINITION
DefaultButtonHoverstyle
N
N
ActiveStyle
You can set the logout button active Style.
STYLEDEFINITION
DefaultButtonActiveStyle
N
N
FocusStyle
The Style used when the logout button is in focus.
STYLEDEFINITION
DefaultButtonFocusStyle
N
N
DisabledStyle
The Style used when the logout button is disabled.
STYLEDEFINITION
DefaultButtonDisabledstyle
N
N
IconAlignment
You can align the icon for the button to the left or right of the text.
STRING
Left
N
N
Events
Clicked: This event is triggered when the widget is clicked.
Upon clicking the logout button, the following dialog box appears. Click YES to logout from the session.
* 
The header and text in the dialog box can be configured. As described in the properties table, using the properties ConfirmationTitle and ConfirmationPrompt, you can modify the Confirm Action header and Do Action? text respectively.