RE: Checking if component is in a Form inside the components code

2005-11-01 Thread Tony De Keizer
; -Original Message- > From: Richard Clark [mailto:[EMAIL PROTECTED] > Sent: Tuesday, 1 November 2005 17:31 > To: Tapestry users > Subject: Re: Checking if component is in a Form inside the components code > > > Oops, missed a detail (I was cutting and pasting from existin

Re: Checking if component is in a Form inside the components code

2005-10-31 Thread Richard Clark
Oops, missed a detail (I was cutting and pasting from existing code and editing madly.) Here's new code: public abstract class CollectionEditPage extends BasePage implements PageRenderListener { public abstract ListEditMap getMap(); public abstract void setMap(ListEditMap map); publi

Re: Checking if component is in a Form inside the components code

2005-10-31 Thread Richard Clark
Hi Tony, Assume you have a page with 3 tabs (and one collection per tab): A, B, and C. Since the user could make a few changes in one tab then switch to another and do more, Tapestry has to collect the changes from all of the tabs. This collection happens during the rewind. For sake o

RE: Checking if component is in a Form inside the components code

2005-10-31 Thread Tony De Keizer
n [mailto:[EMAIL PROTECTED] > Sent: Tuesday, 1 November 2005 05:28 > To: Tapestry users > Subject: RE: Checking if component is in a Form inside the components code > > > Sorry - just read the end of the question! Not sure how you could > trigger a submit, as by the time your comp

RE: Checking if component is in a Form inside the components code

2005-10-31 Thread Joe Trewin
keListener method, but you'd want to be careful to check that that wasn't how your component came to be rewinding in the first place. -Original Message- From: Joe Trewin [mailto:[EMAIL PROTECTED] Sent: 31 October 2005 18:24 To: Tapestry users Subject: RE: Checking if component is

RE: Checking if component is in a Form inside the components code

2005-10-31 Thread Joe Trewin
Yes it is (assuming Tap 4.0 here, but probably a similar method for 3.0). I use something along the lines of: IForm form = (IForm) cycle.getAttribute(TapestryUtils.FORM_ATTRIBUTE); boolean inForm = (form != null); if (inForm) { // ... do something } else { // ... d