Thanks very much for that. I took the option of adding a listener for each (including changeSelection for a list) and used the UserData property to maintain a boolean flag.
Extending the form seems much cleaner though - I'll probably adapt that. Thanks again for the input. Christian Schmidt-18 wrote: > > Hi, > > I would also add a listener on each field, but I wouldn't use > addState(), because addState() is used from the appearance system. I > would prefer to save the stat on a member variable or I would use the > method setUserData(). > > Cheers, > Chris > > sub schrieb: >> I wanted to check the state of my form to check if there are any modified >> fields before certain actions (EG close app, edit a different row etc). >> >> I was going to have a listener on each field and thought of using the >> hasState, addState methods to track changes. The best simplest way to do >> this was at the form level itself but hasState, addState are only >> available >> for widgets. >> >> It will be quite easy to code up another way of doing this, I just wanted >> to >> hear how others are tackling this as it would be common scenario. Is >> there a >> built in way to do this which I didn't see? If not, would it be a good >> idea >> to include something (form.modified)? >> >> Thanks >> > > > -- > Christian Schmidt > Software Entwickler > > 1&1 Internet AG - Web Technologies > Ernst-Frey-Straße 9 · DE-76135 Karlsruhe > [email protected] > > Amtsgericht Montabaur / HRB 6484 > Vorstände: Henning Ahlert, Ralph Dommermuth, Matthias Ehrlich, Thomas > Gottschlich, Robert Hoffmann, Markus Huhn, Hans-Henning Kettler, Dr. > Oliver Mauss, Jan Oetjen > Aufsichtsratsvorsitzender: Michael Scheeren > > > ------------------------------------------------------------------------------ > Come build with us! The BlackBerry® Developer Conference in SF, CA > is the only developer event you need to attend this year. Jumpstart your > developing skills, take BlackBerry mobile applications to market and stay > ahead of the curve. Join us from November 9-12, 2009. Register > now! > http://p.sf.net/sfu/devconf > _______________________________________________ > qooxdoo-devel mailing list > [email protected] > https://lists.sourceforge.net/lists/listinfo/qooxdoo-devel > > -- View this message in context: http://www.nabble.com/Easy-way-to-check-if-a-form-is-modified-tp25680632p25706586.html Sent from the qooxdoo-devel mailing list archive at Nabble.com. ------------------------------------------------------------------------------ Come build with us! The BlackBerry® Developer Conference in SF, CA is the only developer event you need to attend this year. Jumpstart your developing skills, take BlackBerry mobile applications to market and stay ahead of the curve. Join us from November 9-12, 2009. Register now! http://p.sf.net/sfu/devconf _______________________________________________ qooxdoo-devel mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/qooxdoo-devel
