• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Struts2 Design Question - Solid Opinions Needed...

 
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
All-

My environment: Struts2, Spring, Annotated Hibernate, Sitemesh

I have a subclass hierarchy in my Hibernate "model"....

Product
+SomeCustomProduct (extends Product)
+AnotherCustomProduct (extends Product)

I want to create an "extendable" user interface/action design that can quickly allow me to create new views for addtional custom products. These custom products need to have validation on certain fields etc.

Here is what I was thinking...

- Create an abstract "ProductAction" that handles the simple stuff
- Create a concrete "SomeCustomProductAction", that handles the saving etc.

The issue is that I need to have a new set of views for the "CustomProduct" so I can capture that information, however, I am finding that when I go down this road, my struts.xml is getting quite complex.

Is there a way in Struts "out of the box" to handle this? Are there any approaches anyone can propose to make extending "actions/views" easier?

Thanks in advance!





 
Author
Posts: 12617
IntelliJ IDE Ruby
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Without knowing more I'd point you first at wildcards in results, and dynamic result parameters, which can be used to pass action properties to result configuration.
 
reply
    Bookmark Topic Watch Topic
  • New Topic