Ahhh. Interesting discussion! Let me add some opinion also.


> -----Urspr�ngliche Nachricht-----
> Von: Daniel Lopez [mailto:[EMAIL PROTECTED]]
> Gesendet am: Freitag, 14. April 2000 15:41
> An: [EMAIL PROTECTED]
> Betreff: Re: Model 2 and multi-page techniques
>
> Hi,
>
> I'll add some comments of my own.
>
> Kevin Duffey escribi�:
>
> > Hi,
> >
> > >* Would multiple forms/pages require a different
> validation bean for each
> > >page?

> > Actually, I prefer client-side validation using JavaScript.

> Eummm, actually I always recommend and implement doing it the
> other way
> round

I have to totally agree here. Only the server is a trustworthy node in the
process. One cannot assume that javascript has correctly validated the data.
Any validation done on the client should be considered an extra service, not
a replacement for serverside validations.


> > But, if you were to do server-side, I would definitely use
> page per page
> > validation!

> Here I agree with Kevin :). I would use "per-action"

Agree here also. Just the development of a monster validation would be
unpleasant. The view/controller pairs validating and forwarding the data to
a single over-all-the-pages bean is the way to go. (HTML to java interface
and then a Java to backoffice interface.)


> > >* Choosing the finish option would (naturally!) post to the
> > >UserRegistration.do according to good model 2 design. Is
> it OK to have the
> > >back/next "events" directly navigate to the previous/next
> .jsp page?

> If you have to perform some logic, like checking if the user has
> performed all the
> necessary previous steps to do what he wants to do, I'd still
> go through
> the controller
>  -  action - view pattern.

When the user has accepted the data in the form, you should go through the
controller. Otherwise you can step anywhere, because there is nothing to
process. Consider what happens if the user uses "previous" and "forward" in
the browser to your controller workflow.

> > I do. I have a JSP page per form that is to be displayed.
> And I have an
> > action per form. You can have multiple forms submit to the
> same action, but
> > then you'll need some sort of hidden command code system to
> figure out the
> > specific action to take.
>
> Exactly. You can also use the same JSP for different actions which is
> one of the advantages
> of using model 2, the URL looks different but the JSP is the same but
> after performing a
> different action.

Hmmm. Does this mean an action equals a command bean? When can I get a quick
summary of this concept? I've worked out a system based on request based
workflow beans and wrapper pages (posted already to this list).

Tom

===========================================================================
To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff JSP-INTEREST".
Some relevant FAQs on JSP/Servlets can be found at:

 http://java.sun.com/products/jsp/faq.html
 http://www.esperanto.org.nz/jsp/jspfaq.html
 http://www.jguru.com/jguru/faq/faqpage.jsp?name=JSP
 http://www.jguru.com/jguru/faq/faqpage.jsp?name=Servlets

Reply via email to