• 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 and State Control

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

I am fairly new to the Struts2 framework and J2EE in general and currently am struggling with find the best way to maintain state models for the objects in my domain.

For example, I may have an object called Account. When the account status is "active', it should only be updated by Users with roles A and B, readonly for roles C and E, and invisible to E. However, when the status is "Completed", the Account should be visible to everyone.

I would like to ask the experts out there and see what type of design patterns, or framework features I can use to implement this type of logic. Would it be mostly coding the UI layer based on the various state values, perhaps clone the pages for different roles and states? I would hate to do this and would love to hear any elegant methods commonly used for this.

thanks in advance.
-mark
 
Greenhorn
Posts: 14
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
you can has two status property in your user class and <s:if> tag

 
Acetylsalicylic acid is aspirin. This could be handy too:
a bit of art, as a gift, that will fit in a stocking
https://gardener-gift.com
reply
    Bookmark Topic Watch Topic
  • New Topic