• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Design Question

 
bill mcclure
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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) {
mapping.findForward("product1");
} else if (isProduct2) {
mapping.findForward("product2");
}...

Seems like there should be a better way. Any ideas?
 
Marc Peabody
pie sneak
Sheriff
Posts: 4727
Mac Ruby VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic