Right now the pattern below is peppered all over my code. It annoys me,
having to create these booleans all the time. I think most of the time I
need to do things after the submitted data is sent in, so I can't do it in
the onSelected itself.


Anyone have any alternatives?




public class Page
{
  private boolean button1Clicked;
  private boolean button2Clicked;

  void onSelectedFromButton1()
  {
     button1Clicked = true;
  }

  void onSelectedFromButton2()
  {
     button2Clicked = true
  }

  void onSuccess()
  {
     if (button1Clicked)
     //do foo

    if (button2Clicked)
    //do bar
  }


--
View this message in context: 
http://tapestry-users.832.n2.nabble.com/Easier-way-to-have-multiple-submits-doing-different-things-tp6351722p6351722.html
Sent from the Tapestry Users mailing list archive at Nabble.com.

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org
For additional commands, e-mail: users-h...@tapestry.apache.org

Reply via email to