Class jabberwerx.ui.AuthenticationView
Extends
jabberwerx.ui.JWView.
View for logging into an XMPP server.
This allows the user to enter in his/her username and password and log into the XMPP server.
This class provides the following events:
Constructor Attributes | Constructor Name and Description |
---|---|
jabberwerx.ui.AuthenticationView(client, domain)
Creates a new AuthenticationView with the given client and optional domain.
|
Field Attributes | Field Name and Description |
---|---|
Dictates if usernames with the @ character are allowed by this view.
|
|
The client used to connect to the XMPP server. |
|
<static> <constant> |
jabberwerx.ui.AuthenticationView.default_error_message
The default error message "Login failed". |
The domain of the XMPP server. |
|
<static> <constant> |
jabberwerx.ui.AuthenticationView.invalid_user
Invalid user error message: "Invalid username" |
- Fields borrowed from class jabberwerx.ui.JWView:
- jq
Method Attributes | Method Name and Description |
---|---|
createDOM(doc)
Creates the DOM to display. |
|
restoreDOM(doc)
Restore the DOM to display. |
|
- Methods borrowed from class jabberwerx.ui.JWView:
- destroy, destroyDOM, dimensions, height, hide, parent, persistOptions, remove, render, restoreRender, restoreUpdate, shouldBeSavedWithGraph, show, update, wasUnserialized, width
- Methods borrowed from class jabberwerx.JWModel:
- applyEvent, event
- Methods borrowed from class jabberwerx.JWBase:
- getClassName, graphUnserialized, init, invocation, shouldBeSerializedInline, toString
Class Detail
jabberwerx.ui.AuthenticationView(client, domain)
Creates a new AuthenticationView with the given client and optional domain.
- Parameters:
- {jabberwerx.Client} client
- The client
- {String} domain Optional
- The domain portion of the JID that's used to login. If no domain is specified, the user has to specify the domain part of their jid in the username field before logging in.
- Throws:
- {TypeError}
- If {client} is not valid
- {jabberwerx.JID.InvalidJIDError}
- If {domain} isn't a valid domain.
Field Detail
{Boolean}
allowAtSymbol
Dictates if usernames with the @ character are allowed by this view.
NOTE: The user may still enter @ if #domain is not
set, in which case the username is treated as 'username@domain'.
{jabberwerx.Client}
client
The client used to connect to the XMPP server.
<static> <constant>
{String}
jabberwerx.ui.AuthenticationView.default_error_message
The default error message "Login failed".
{String}
domain
The domain of the XMPP server.
<static> <constant>
{String}
jabberwerx.ui.AuthenticationView.invalid_user
Invalid user error message: "Invalid username"
Method Detail
{Element}
createDOM(doc)
Creates the DOM to display.
It also binds to the submit action of the form to start the login process.
- Parameters:
- {Document} doc
- The document to use for creating content
- Returns:
- {Element} The generated element to display
{Element}
restoreDOM(doc)
Restore the DOM to display.
- Parameters:
- {Document} doc
- The document to use for creating content
- Returns:
- {Element} The generated element to display
willBeSerialized()