William,

The action does not directly know the next view or previous view. The
action object returns a generic ActionForward object with a  "success",
"failure", etc. or a more specific "contacts", "roles", etc if you have
sub-screens with that information.  The controller uses struts-config.xml
to find the location of the next page based on the actionforward object.
If your formbean contains all the fields in your views that it serves, then
you should not have a problem.  Note that in the case I am describing here
I would have a parent bean then child beans that are populated with user
data (contact, roles) as necessary.

If contact information appears in a different view, then I just re-use that
bean in a new parent formbean again.

This is the way I approached the multiple page / Tab page view problem.
Maybe someone else had a different approach...

Brian




                                                                                       
                               
                    William Lyvers                                                     
                               
                    <wlyvers@channel        To:     "'[EMAIL PROTECTED]'" 
                               
                    point.com>              <[EMAIL PROTECTED]>           
                               
                                            cc:                                        
                               
                    08/14/2001 10:32        Subject:     FormBean Pre-popping?         
                               
                    AM                                                                 
                               
                    Please respond                                                     
                               
                    to struts-user                                                     
                               
                                                                                       
                               
                                                                                       
                               




Our company is considering adopting the Strut framework into our web
development.  One thing that has grabbed my attention is that the
pre-popping of FormBeans from MT objects occurs in an Action before
forwarding the page to the next View.  This seems to dictate that the each
action directly knows the next view as well as the previous view.
Consequently, the action classes are tied to particular flows throughout
the
website.  This seems somewhat awkward -- especially when a form can be
appear in multiple flows.  Am I missing something or is this the intended
design?

Thanks,
Billy




Reply via email to