struts-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Ted Husted" <>
Subject Re: [PROPOSAL] Merge Able/Code Behind/Zero-Config/SmartURLs into view-behind specification
Date Sat, 03 Nov 2007 08:16:53 GMT
The question would be how do we GET add or edit and invoke Prepare,
and then how do we POST to save, update, or delete, and invoke Prepare
if validation fails?

On Nov 2, 2007 3:30 PM, Brian Pontarelli <> wrote:
> I think my simple CRUD example will shed a lot of light on my methods,
> but here's a rough run down:
> Actions
> ------------
> Add - Empty
> Edit - Fetch entity by id
> Prepare - Prepares selects and other associations for the form
> Save - Validates and inserts
> Update - Validates and updates
> Delete - Deletes entity or multiple entities
> Index - Displays the list of entities
> Views
> ----------
> add.jsp - Header block and includes form.jsp
> edit.jsp - Header block and includes form.jsp
> form.jsp - The form (uses the Prepare action)
> index.jsp - The list page
> The form has a cancel button that uses the "redirect-action:index"
> syntax. The edit form also has a delete button that uses the action syntax.
> The only place I use the input result is in the Save and Update classes
> for results that go back to the add and edit JSPs. These two classes can
> also be collapsed into a single class or use a parent class to reduce
> overhead. Those two and delete are the only ones with annotations for
> different results and redirects.

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message