cifroes wrote:
> 
> I have ActionBean1 and ActionBean2. When I click a link in ActionBean2 I
> want a) set global errors and b) forward or redirect to ActionBean1. My
> problem is that the errors aren't passed to ActionBean1... How can i
> achieve this?

Try this:

public class MyActionBean implements ActionBean {
  
  public Resolution view() {
    if (THERE_ARE_ERRORS) {
      /* Adds global error */
      getContext().getValidationErrors().addGlobalError(new
SimpleError("There was an error."));

      /* Attaches this actionBean to the flash scope so it's available to
the next actionBean */
      return new RedirectResolution(MyOtherActionBean.class).flash(this);
    }
    return new ForwardResolution("myaction.jsp");
  }

}

-- 
View this message in context: 
http://www.nabble.com/pass-global-error-to-a-new-actionbean-tp22686735p22704063.html
Sent from the stripes-users mailing list archive at Nabble.com.
------------------------------------------------------------------------------
Apps built with the Adobe(R) Flex(R) framework and Flex Builder(TM) are
powering Web 2.0 with engaging, cross-platform capabilities. Quickly and
easily build your RIAs with Flex Builder, the Eclipse(TM)based development
software that enables intelligent coding and step-through debugging.
Download the free 60 day trial. http://p.sf.net/sfu/www-adobe-com
_______________________________________________
Stripes-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/stripes-users

Reply via email to