CreateUserForm.java :  » Source-Control » jcvsweb » com » ice » jcvsweb » form » Java Open Source

Java Open Source » Source Control » jcvsweb 
jcvsweb » com » ice » jcvsweb » form » CreateUserForm.java

package com.ice.jcvsweb.form;

import javax.servlet.http.HttpServletRequest;

import org.apache.struts.action.Action;
import org.apache.struts.action.ActionErrors;
import org.apache.struts.action.ActionForm;
import org.apache.struts.action.ActionMapping;


public
class    CreateUserForm
extends    ActionForm
  {
  private String    username = null;


  public
  CreateUserForm()
    {
    }

  public String
  getUsername()
    {
    return this.username;
    }

  public void
  setUsername( String username )
    {
    this.username = username;
    }

  public void
  reset( ActionMapping mapping, HttpServletRequest request )
    {
    this.username = null;
    }

  public ActionErrors
  validate( ActionMapping mapping, HttpServletRequest request )
    {
    ActionErrors errors = new ActionErrors();

    if ( this.username == null )
      {
      // UNDONE
      }

    return errors;
    }

  public String
  toString()
    {
    StringBuffer buf = new StringBuffer();

    buf.append( "[ " );
    buf.append( "user='" ).append( this.username ).append( "'" );
    buf.append( " ]" );

    return buf.toString();
    }

  }

java2s.com  | Contact Us | Privacy Policy
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.