Let me bounce this design (that might extend Struts 1.1 functionality) for
suggestions/code snippets:
Q1.I want to create a base Action that "developers" will use instead of Action.
In baseAction.execute() I want to have logic that will call:
executeRet() to populate the formBean
executeUp() to validate and save the formBean
executeDel() to request a delete from a formBean
and executeNew() to insert a row in a formBean
How do I do this?
I like isCancelled() on Action, that tells me the user clicked cancel button design.
One possibility?
<html:submit property="X" value="X"/>
or
<input type="submit" name="edit" value="10">
Then in baseAction, do a request.getParameter("X")? and call the right method?
Is there a bette way to find out button clicked?
Is there another way?
TIA,
Vic
ps.
Q2. Also... I want to call Save,New,Delete from a menu sometimes and not a button. How
would I do it then?
Have a SaveAction that would detect the form or action used and then ask the right
form to save?
Q3. If the user changes a page, and clicks on menu to go to another page, how do I pop
up a message saying changes made/ do you want to save? And then go to the proper page
requested orginally?
Should I code the button and/or menu to to call a javascript that would check for
changes?
--
To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>