It's not a secret anymore!
The moose likes Struts and the fly likes Understanding public void prepare() +tiles Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


JavaRanch » Java Forums » Frameworks » Struts
Bookmark "Understanding public void prepare() +tiles" Watch "Understanding public void prepare() +tiles" New topic
Author

Understanding public void prepare() +tiles

E Robb
Ranch Hand

Joined: Aug 27, 2010
Posts: 111
I have a tiles layout and I want the initial display to use prepare() in the page to populate a field.

If I use prepare() and specify the action then validation is run when the page is initally loaded. Validation errors are returned. If I dont specify result type an error is thrown by Struts.

Bottom line is I want to use one action to set the variables the page may need and the same action execute the page. I dont want multiple actions for every page unless there is a good reason.

Struts.xml:





Validation.xml:
 
I’ve looked at a lot of different solutions, and in my humble opinion Aspose is the way to go. Here’s the link: http://aspose.com
 
subject: Understanding public void prepare() +tiles
 
It's not a secret anymore!