sf.net.kayestry.components.login
Class LoginComponent

java.lang.Object
  extended by org.apache.tapestry.spec.BaseLocatable
      extended by org.apache.tapestry.AbstractComponent
          extended by org.apache.tapestry.BaseComponent
              extended by sf.net.kayestry.KayaBaseComponent
                  extended by sf.net.kayestry.components.login.LoginComponent
All Implemented Interfaces:
org.apache.tapestry.IComponent, org.apache.tapestry.ILocatable, org.apache.tapestry.ILocationHolder, org.apache.tapestry.IRender

public abstract class LoginComponent
extends KayaBaseComponent

Componente para realizar el login a la aplicacion.

Author:
lparra TODO este no es el lugar pero en BrowseButtons no se genera un div para el btn de eliminar

Constructor Summary
LoginComponent()
           
 
Method Summary
protected abstract  org.apache.tapestry.valid.IValidationDelegate getDelegate()
           
protected abstract  java.lang.String getPassword()
           
protected abstract  java.lang.String getUsername()
           
 void login(org.apache.tapestry.IRequestCycle cycle)
          Valida que el usuario y clave ingresadas sea correcto.
protected  void renderComponent(org.apache.tapestry.IMarkupWriter writer, org.apache.tapestry.IRequestCycle cycle)
           
protected abstract  void setPassword(java.lang.String passw)
           
 
Methods inherited from class sf.net.kayestry.KayaBaseComponent
getVisit
 
Methods inherited from class org.apache.tapestry.BaseComponent
addOuter, finishLoad
 
Methods inherited from class org.apache.tapestry.AbstractComponent
addAsset, addBody, addComponent, cleanupAfterRender, finishLoad, fireObservedChange, fireObservedChange, fireObservedChange, fireObservedChange, fireObservedChange, fireObservedChange, fireObservedChange, fireObservedChange, fireObservedChange, format, format, format, format, formatString, formatString, formatString, formatString, generateAttributes, getAsset, getAssets, getBeans, getBinding, getBindingNames, getBindings, getBody, getBodyCount, getChangeObserver, getComponent, getComponents, getContainer, getExtendedId, getId, getIdPath, getListeners, getMessage, getMessages, getNamespace, getPage, getProperty, getSpecification, getString, pageEndRender, prepareForRender, render, renderBody, renderInformalParameters, setBinding, setContainer, setId, setNamespace, setPage, setProperty, setSpecification, toString
 
Methods inherited from class org.apache.tapestry.spec.BaseLocatable
getLocation, setLocation
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface org.apache.tapestry.ILocationHolder
setLocation
 
Methods inherited from interface org.apache.tapestry.ILocatable
getLocation
 

Constructor Detail

LoginComponent

public LoginComponent()
Method Detail

renderComponent

protected void renderComponent(org.apache.tapestry.IMarkupWriter writer,
                               org.apache.tapestry.IRequestCycle cycle)
Overrides:
renderComponent in class org.apache.tapestry.BaseComponent

getUsername

protected abstract java.lang.String getUsername()

getPassword

protected abstract java.lang.String getPassword()

setPassword

protected abstract void setPassword(java.lang.String passw)

getDelegate

protected abstract org.apache.tapestry.valid.IValidationDelegate getDelegate()

login

public void login(org.apache.tapestry.IRequestCycle cycle)
Valida que el usuario y clave ingresadas sea correcto. Si los datos ingresados estan bien, se obtiene el usuario y se lo guarda en el objeto visit. Luego redirige al home. TODO: al componente se le debe poder pasar un callback opcional que se lo llama cuando se loguea el usuario, para poder realizar alguna otra operacion. TODO: hacia donde redirige tendria que poder pasarse como parametro al componente.

Parameters:
cycle -


Copyright © 2006 Kaya. All Rights Reserved.