aspose file tools*
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 agree. Here's the link: http://aspose.com/file-tools
 
subject: Understanding public void prepare() +tiles
 
Similar Threads
error in validation
Action class not being called after validation
Struts 2 Validation
Struts 2.1 javascript field validate
short-circuit attribute not working in validation file