File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
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

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.


I agree. Here's the link:
subject: Understanding public void prepare() +tiles
jQuery in Action, 3rd edition