jQuery in Action, 3rd edition
The moose likes Struts and the fly likes Design Question Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Frameworks » Struts
Bookmark "Design Question" Watch "Design Question" New topic

Design Question

bill mcclure

Joined: Sep 13, 2005
Posts: 2
I have an application with the following page flow:
choose Product Type --> choose Product Model --> create/edit chosen model

Currently we only have one form for all the product types. We now want to expand this to have a different edit form per Product Type.

Should we have a forward for each of the various product type editors? Something like this logic in the Action (after choose Model):
if (isProduct1) {
} else if (isProduct2) {

Seems like there should be a better way. Any ideas?
Marc Peabody
pie sneak

Joined: Feb 05, 2003
Posts: 4727

Howdy Bill!

Have you ever messed around with map backed forms? Using a map backed form might be just what you need to make your ActionForm generic enough to hold any of the different Product Types.

A good workman is known by his tools.
I agree. Here's the link: http://aspose.com/file-tools
subject: Design Question
It's not a secret anymore!