I took the lastest JPetStore as a starting point for my application.
The problem I have now: I want to have multiple actions in one form. I have a set of objects belonging to a user and this are displayed together with a checkbox for each object. I want the users to be able to check a few boxes and let them choose to delete those, or edit them all at once, etc...
Normall I think one should implement a class that inherits from the DispatchAction Class.
I guess using the BaseBean and BeanAction class, this should even be simpler. Should I use the same tactic as the DispatchAction class uses ? Something like:
public Class TreeLevel extends BaseBean {
private String method;
public String formAction { if (method == "foo") { return foo(); } else { return bar(); } }
private String foo() { // }
private String bar() { } }
And then in my jsp page:
<html:form action="/formAction"> <html:submit property="method" value="foo" /> <html:submit property="method" value="bar" /> </html:form>