You have to take that relationship on faith.  Perhaps
it's not the best example, but suffice it to say that
I have many-to-many types of relationships in my data,
and that the Forms are best segregated for re-use.  It
is highly inefficient for me to make a separate form
for each combination of data relationship.
Futhermore, there are many levels involved here.
Distributions have Shipments, Shipments have Orders,
Orders Have Items, Items have Tasks, Tasks have
TaskDetails.  Are you really suggesting I put all this
in one Form?  If I make a screen to query for
TaskDetails which then uses the same jsp to display
the results as the one that is linked to by the Task
screen, then I must use this giant Form with mostly
inconsequential fields, and add my TaskDetail query
screen specifics to it, too.

If you have a generic query result page then you need to supply it with a generic result bean to display the data. Your TaskDetailQueryForm object is handled by your TaskDetailQueyAction which then puts your generic result bean in the request and forwards to the result page. I don't see why you would need action chaining here.


David

Where does it end?  My
other options are to make a new jsp, or make a jsp
with some really nasty scriptlet in it to handle
different forms.  Right?


--- David Graham <[EMAIL PROTECTED]> wrote: > > >There are, however, situations where the second > screen > >really has nothing to do with the first. For > example, > >an Order screen and an OrderItem screen. When > >navigating from Order to OrderItem, I should not go > >directly to OrderItem.jsp for two reasons. The > >OrderItemForm is unrelated to the OrderForm and > should > >not be part of the OrderForm object. Given this, > it > >*could* still be ok to go to OrderItem.jsp when it > >uses it's own Form object, but not if you need to > pass > >through OrderItemAction to verify the user is > logged > >in. The other options are action chaining from the > >OrderAction to the OrderItem mapping, or linking > from > >the Order.jsp to the OrderItem mapping, both of > which > >are considered bad. What else is there? > > Why is an order unrelated to its items? I would > have one class called > OrderForm that contained a List or array of all the > items being ordered. > One ActionForm object does not necessarily map to > one HTML form. You can > split up the view however you like but store all the > data in one form > object. > > David > > > > >m > > > > > >--- David Graham <[EMAIL PROTECTED]> wrote: > > > >So if I understand what you're suggesting, I > put > > > >multiple html forms into editPage.jsp, one of > which > > > >maps to ConfirmEditAction. Not bad, although, > what > > > I > > > >have in this form now is a drop down for the > user > > > to > > > >specify what they intend to do. > > > > > > Sorry, I think the steps would actually be like > > > this: > > > GetEditPageAction --> editPage.jsp --> > > > GetConfirmPageAction --> confirm.jsp > > > --> SaveFormAction --> index.jsp > > > > > > Just use different submit buttons for different > > > actions like Update and > > > Delete. Your SaveFormAction will perform > different > > > operations based on > > > which button they pressed. > > > > > > >Also, if I want to use > > > >this single, generic, confirmation page in > multiple > > > >places, which I do, I'll have to use scriptlet > > > rather > > > >than the html:form tag to render the correct > action > > > >attribute to take them back to the edit they > came > > > >from, right? > > > > > > Then you will also need a generic SaveFormAction > to > > > save the data from your > > > generic confirm page. You might look at using > > > DispatchAction to use one > > > action to route to different pages based on a > > > request parameter. > > > > > > David > > > > > > > > > > >m > > > > > > > >--- David Graham <[EMAIL PROTECTED]> > wrote: > > > > > >If my need, for example, is to go from > > > > > >an "Edit X" screen, to a "Confirm X > deletion" > > > > > screen, > > > > > >how is this related to business logic, and > how > > > > > would I > > > > > >refactor? > > > > > > > > > > GetEditPageAction --> editPage.jsp --> > > > > > ConfirmEditAction --> index.jsp > > > > > > > > > > > > > > > David > > > > > > > > > > > > > > > > >_________________________________________________________________ > > > > > Help STOP SPAM with the new MSN 8 and get 2 > > > months > > > > > FREE* > > > > > http://join.msn.com/?page=features/junkmail > > > > > > > > > > > > > > > > > > > > > >--------------------------------------------------------------------- > > > > > To unsubscribe, e-mail: > > > > > [EMAIL PROTECTED] > > > > > For additional commands, e-mail: > > > > > [EMAIL PROTECTED] > > > > > > > > > > > > > > > > >__________________________________ > > > >Do you Yahoo!? > > > >The New Yahoo! Search - Faster. Easier. Bingo. > > > >http://search.yahoo.com > > > > > > > > > > >--------------------------------------------------------------------- > > > >To unsubscribe, e-mail: > > > [EMAIL PROTECTED] > > > >For additional commands, e-mail: > > > [EMAIL PROTECTED] > > > > > > > > > > > >_________________________________________________________________ > > > Tired of spam? Get advanced junk mail protection > > > with MSN 8. > > > http://join.msn.com/?page=features/junkmail > > > > > > > > > > >--------------------------------------------------------------------- > > > To unsubscribe, e-mail: > > > [EMAIL PROTECTED] > > > For additional commands, e-mail: > > > [EMAIL PROTECTED] > > > > > > > > >__________________________________ > >Do you Yahoo!? > >Yahoo! Calendar - Free online calendar with sync to > Outlook(TM). > >http://calendar.yahoo.com > > > >--------------------------------------------------------------------- > >To unsubscribe, e-mail: > [EMAIL PROTECTED] > >For additional commands, e-mail: > [EMAIL PROTECTED] > > > > _________________________________________________________________ > Protect your PC - get McAfee.com VirusScan Online > http://clinic.mcafee.com/clinic/ibuy/campaign.asp?cid=3963 > > > --------------------------------------------------------------------- > To unsubscribe, e-mail: > [EMAIL PROTECTED] > For additional commands, e-mail: > [EMAIL PROTECTED] >


__________________________________ Do you Yahoo!? Yahoo! Calendar - Free online calendar with sync to Outlook(TM). http://calendar.yahoo.com

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


_________________________________________________________________
MSN 8 helps eliminate e-mail viruses. Get 2 months FREE*. http://join.msn.com/?page=features/virus



--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]



Reply via email to