You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user-java@ibatis.apache.org by Mike Wilson <mw...@yahoo.com> on 2006/04/04 20:48:31 UTC

Handling an existing userid

Hello, in the AccountBean I'm doing this for the new account information, but need to add validation to handle an existing userid:
   
    public String newAccount() {
    try {
      accountService.insertAccount(account);
      account = accountService.getAccount(account.getUsername());
      authenticated = true;
      repeatedPassword = null;
      return SUCCESS;
    } catch (Exception e) {
      throw new BeanActionException ("There was a problem creating your Account Information.  Cause: " + e, e);
    }
  }
   
  I thought I could add another errors to the messages.properties file and return to the jsp, but not sure how. Could someone give me a quick example?
   
  Thanks in advance,
  M

		
---------------------------------
New Yahoo! Messenger with Voice. Call regular phones from your PC for low, low rates.

Re: Handling an existing userid

Posted by Clinton Begin <cl...@gmail.com>.
Mike,

I have to be clear about this....


   - We do not support the JPetStore presentation layer on this mailing
   list.  JPetStore is not supported at all -- it's an example app.
   - Furthermore, we don't recommend modifying it to use in a production
   system -- which is what it seems like you're trying to do.
   - Your question really has nothing to do with iBATIS.  Sorry, but we
   have to keep the list clean we'll have to ask you to take the discussion
   elsewhere.

You might want to start with a JSP support list or maybe the Struts folks
will help you (if your question is about Struts).

Cheers,
Clinton



On 4/4/06, Mike Wilson <mw...@yahoo.com> wrote:
>
> Hello, in the AccountBean I'm doing this for the new account information,
> but need to add validation to handle an existing userid:
>
>   public String newAccount() {
>     try {
>       accountService.insertAccount(account);
>       account = accountService.getAccount(account.getUsername());
>       authenticated = true;
>       repeatedPassword = null;
>       return SUCCESS;
>     } catch (Exception e) {
>       throw new BeanActionException ("There was a problem creating your
> Account Information.  Cause: " + e, e);
>     }
>   }
>
> I thought I could add another errors to the messages.properties file and
> return to the jsp, but not sure how. Could someone give me a quick example?
>
> Thanks in advance,
> M
>
> ------------------------------
> New Yahoo! Messenger with Voice.<http://us.rd.yahoo.com/mail_us/taglines/postman4/*http://us.rd.yahoo.com/evt=39666/*http://beta.messenger.yahoo.com>Call regular phones from your PC for low, low rates.
>
>