corelib.services.web.components.security
Class LoginForm

java.lang.Object
  extended by corelib.services.web.components.WebComponent
      extended by corelib.services.web.components.VisualComponent
          extended by corelib.services.web.components.security.LoginForm

public class LoginForm
extends VisualComponent

Uses this component for inject Logon form on your web pages. The focus is initialy set on the login TextBox component.

This component can be bound on the Ellipse security framework (used dataSourceName property to do this).

Since:
0.4.0
Author:
Alexia Ramaļoli & Dominique Liard

Field Summary
 
Fields inherited from class corelib.services.web.components.VisualComponent
cssClass, cssStyle, toolTipText, visible
 
Fields inherited from class corelib.services.web.components.WebComponent
dataBindings, webPage, xmlNode
 
Constructor Summary
LoginForm()
          Class constructor.
 
Method Summary
 void addLoginFormListener(LoginFormListener listener)
          Add a listener to this component.
 void component_init(WebPageEvent event)
          Fired when the web page begin his initialization.
 void component_load(WebPageEvent event)
           When this event fired, the component checks the posted credentials.
 void component_renderBegin(WebPageEvent event)
           
 void component_renderEnd(WebPageEvent webPageEvent)
           
 void fireAccountDisabledEvent()
          Invoked by the web page event dispatcher, when it's necessary to fire account disabled event.
 void fireLoginFormFailedEvent()
          Invoked by the web page event dispatcher, when it's necessary to fire failed login event.
 void fireLoginFormSuccessedEvent()
          Invoked by the web page event dispatcher, when it's necessary to fire successed login event.
 java.lang.String getDataSourceName()
          Get the dataSourceName value.
 java.lang.String getTextButtonConnect()
          Get the button value.
 java.lang.String getTextLogin()
          Get the label text for login.
 java.lang.String getTextPassword()
          Get the label text for password.
 TextBox getTxtLogin()
          Get the Login TextBox component.
 TextBox getTxtPassword()
          Get the Password TextBox component.
 void removeLoginFormListener(LoginFormListener listener)
          Remove the specifier listener to this component.
 void setDataSourceName(java.lang.String dataSourceName)
          Fixes the dataSourceName value.
 void setTextButtonConnect(java.lang.String value)
          Fixes the button value.
 void setTextLogin(java.lang.String value)
          Fixes the label text for login.
 void setTextPassword(java.lang.String value)
          Fixes the label text for password.
 
Methods inherited from class corelib.services.web.components.VisualComponent
component_postRender, component_preRender, component_renderChildren, component_renderJavascriptLocalisation, encodeAttributeValue, getCssClass, getCssStyle, getOnClickListener, getSharedAttributesHtmlEncoding, getToolTipText, isVisible, renderElement, setCssClass, setCssStyle, setOnClickListener, setToolTipText, setVisible
 
Methods inherited from class corelib.services.web.components.WebComponent
addBindingExpression, addChildComponent, component_preRepeaterDuplications, getChildComponents, getDataBinding, getElementsByTagName, getId, getWebPage, getXmlNode, setId, setWebPage, setXmlNode
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

LoginForm

public LoginForm()
Class constructor.

Method Detail

setTextLogin

public void setTextLogin(java.lang.String value)
Fixes the label text for login.

Parameters:
value - String, by default "Login :".

getTextLogin

public java.lang.String getTextLogin()
Get the label text for login.

Returns:
The label text for login.

setTextPassword

public void setTextPassword(java.lang.String value)
Fixes the label text for password.

Parameters:
value - String, by default "Password :".

getTextPassword

public java.lang.String getTextPassword()
Get the label text for password.

Returns:
The label text for password.

setTextButtonConnect

public void setTextButtonConnect(java.lang.String value)
Fixes the button value.

Parameters:
value - String, by default "Connect".

getTextButtonConnect

public java.lang.String getTextButtonConnect()
Get the button value.

Returns:
The button value.

getTxtLogin

public TextBox getTxtLogin()
Get the Login TextBox component.

Returns:
The Login TextBox component.

getTxtPassword

public TextBox getTxtPassword()
Get the Password TextBox component.

Returns:
The Password TextBox component.

getDataSourceName

public java.lang.String getDataSourceName()
Get the dataSourceName value.

Returns:
The dataSourceName value.

setDataSourceName

public void setDataSourceName(java.lang.String dataSourceName)
Fixes the dataSourceName value.

Parameters:
dataSourceName - String, must a xml file name.

addLoginFormListener

public void addLoginFormListener(LoginFormListener listener)
Add a listener to this component.

Parameters:
listener - The listener to add.

removeLoginFormListener

public void removeLoginFormListener(LoginFormListener listener)
Remove the specifier listener to this component.

Parameters:
listener - The listener to remove.

fireLoginFormSuccessedEvent

public void fireLoginFormSuccessedEvent()
Invoked by the web page event dispatcher, when it's necessary to fire successed login event.


fireLoginFormFailedEvent

public void fireLoginFormFailedEvent()
Invoked by the web page event dispatcher, when it's necessary to fire failed login event.


fireAccountDisabledEvent

public void fireAccountDisabledEvent()
Invoked by the web page event dispatcher, when it's necessary to fire account disabled event.


component_init

public void component_init(WebPageEvent event)
Description copied from class: WebComponent
Fired when the web page begin his initialization.

Overrides:
component_init in class WebComponent
Parameters:
event - Qualify the current web page event.

component_load

public void component_load(WebPageEvent event)

When this event fired, the component checks the posted credentials. If this component is running in a request in GET mode or if form's validation failed, this method does nothing.

Registered FormLoginListener are notify of the success or the failure of this method.

Overrides:
component_load in class WebComponent
Parameters:
event - The event instance associated to this handling page event method.

component_renderBegin

public void component_renderBegin(WebPageEvent event)
Overrides:
component_renderBegin in class VisualComponent

component_renderEnd

public void component_renderEnd(WebPageEvent webPageEvent)
Overrides:
component_renderEnd in class VisualComponent


CAUTION: Ellipse is proposed to you in BETA version to allow evaluation of this framework. Infini Software is released from any responsibility for the use of Ellipse Framework.

Copyright 2012 Infini Software - All Rights Reserved.