Differences between revisions 2 and 3
Revision 2 as of 2007-02-21 00:44:12
Size: 1060
Comment:
Revision 3 as of 2009-09-20 23:12:47
Size: 1076
Editor: localhost
Comment: converted to 1.6 markup
Deletions are marked like this. Additions are marked like this.
Line 5: Line 5:
inline:employee_list_crud.gif {{attachment:employee_list_crud.gif}}
Line 7: Line 7:
inline:employee_edit.gif {{attachment:employee_edit.gif}}

Data editing and full-blown CRUD application

Now when we know how to view and delete an employee, let us add the missing parts: creation, update and saving of modified employee data.

employee_list_crud.gif

employee_edit.gif

The EmployeeAction class handles "create", "view", "edit", "duplicate", "save", "delete" and "close" events, this is how it is configured:

{{{<action path = "/employeesListCRUD"

  • <forward name = "render" path = "/jspstruts4/employees.jsp"/>

</action>

<action path = "/employeeActionCRUD"

  • type = "actions.EmployeeAction" name = "crudform" scope = "request" validate = "false" parameter = "create,view,edit,duplicate,save=validateAndSave,delete,close">

  • <forward name = "renderedit" path = "/jspstruts4/employee-edit.jsp"/> <forward name = "renderpreview" path = "/jspstruts4/employee-view.jsp"/> <forward name = "finished" path = "/employeesListCRUD.do" redirect = "true"/>

</action>}}}

StrutsQuickStart4 (last edited 2009-09-20 23:12:47 by localhost)