This week's book giveaway is in the OCMJEA forum.
We're giving away four copies of OCM Java EE 6 Enterprise Architect Exam Guide and have Paul Allen & Joseph Bambara on-line!
See this thread for details.
The moose likes Struts and the fly likes Struts2 and State Control Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of OCM Java EE 6 Enterprise Architect Exam Guide this week in the OCMJEA forum!
JavaRanch » Java Forums » Frameworks » Struts
Bookmark "Struts2 and State Control" Watch "Struts2 and State Control" New topic
Author

Struts2 and State Control

mark newtojava
Greenhorn

Joined: Feb 28, 2011
Posts: 1
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
Manuel Schenkhuizen
Greenhorn

Joined: Apr 20, 2011
Posts: 14
you can has two status property in your user class and <s:if> tag

 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Struts2 and State Control