I noticed that if I pass an event param to stripes:link tag to call a method,
the method is /only/ called if the method returns type Resolution. So, this
WORKS:
home.jsp
========
<s:link href="/ilostandfound/AddItemForm.action"
event="itemFound">Report a found item</s:link>
<s:link href="/ilostandfound/AddItemForm.action" event="itemLost">Report
a lost item</s:link>
AddItemFormActionBean.java
==========================
public Resolution itemFound() {
// big biz logic here...
return new ForwardResolution(ITEM_FORM);
}
public Resolution itemLost() {
// big biz logic here...
return new ForwardResolution(ITEM_FORM);
}
BUT, it seems that I want to have both of the methods above call single "work"
method, I'm out of luck:
(assume same home.jsp)
AddItemFormActionBean.java (Alternate)
==========================
public Resolution view() {
// common biz logic here...
return new ForwardResolution(ITEM_FORM);
}
public void itemFound() {
// minor, un-common biz logic here...
this.view();
}
public void itemLost() {
// minor, un-common biz logic here...
this.view();
}
Is this by design, and if so, why?
Also, is there an alternate method I should be considering to achieve the
functionality in the 2nd, alternative approach?
Thanks in advance.
------------------------------------------------------------------------------
OpenSolaris 2009.06 is a cutting edge operating system for enterprises
looking to deploy the next generation of Solaris that includes the latest
innovations from Sun and the OpenSource community. Download a copy and
enjoy capabilities such as Networking, Storage and Virtualization.
Go to: http://p.sf.net/sfu/opensolaris-get
_______________________________________________
Stripes-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/stripes-users