On 06-06-2009 at 21:07, AKahn wrote:
[...]
> 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?

Yes, because it's the Resolution object that tells Stripes what page to
display next.


> Also, is there an alternate method I should be considering to achieve the 
> functionality in the 2nd, alternative approach?

Yes: in order to have the methods itemFound and itemLost work like an event
handler, you don't want to throw away the result of view(). Hence, do
something like this:

AddItemFormActionBean.java (Alternate)
==========================
public Resolution view() {
    // common biz logic here...
    return new ForwardResolution(ITEM_FORM);
}
  
public Resolution itemFound() {
    // minor, un-common biz logic here...
    return this.view();
}

public Resolution itemLost() {
    // minor, un-common biz logic here...
    return this.view();
}


Oscar

-- 
   ,-_  Oscar Westra van holthe - Kind      http://www.xs4all.nl/~kindop/
  /() )
 (__ (  Progress is made by lazy men looking for easier ways to do things.
=/  ()  -- Robert Heinlein

------------------------------------------------------------------------------
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

Reply via email to