Hello Greg,
The recursion only happens when you try selecting a date because of the
target2model converter that I decided to add like this:
  
     //model2target works okay
    {
        converter: function(data){
                if (data == null || data instanceof Date) {
                        return data;
                }
                return new Date(data);          
        }
    },
   
   //target2model causes too much recursion. Without it everything works
well
   {
        converter: function(data){//alert(data);
                return dateFormat.format(data);
        }
    } 
   
As I said, I added the target2model converter to automatically handle
formatting of dates before I send them off to the server. The issue is that
you get a "too much recursion" error when you try to select a date. The
converter gets called recursively, first with"data" holding the initial
value of the date field and then new value. However, the target2model works
as expected after the browser gets out of the recursion. 

Please note that if you uncomment "alert(data)" above and try to select a
different date, you'll end up with a never-ending loop. You'll have to kill
the browser process to get out of it!

I guess the target2model converter isn't necessary or I'm probably writing
it wrongly!

Regards,

Paul

-- 
View this message in context: 
http://qooxdoo.678.n2.nabble.com/Problem-with-Datefield-and-Form-Controller-tp5152037p5159519.html
Sent from the qooxdoo mailing list archive at Nabble.com.

------------------------------------------------------------------------------
ThinkGeek and WIRED's GeekDad team up for the Ultimate 
GeekDad Father's Day Giveaway. ONE MASSIVE PRIZE to the 
lucky parental unit.  See the prize list and enter to win: 
http://p.sf.net/sfu/thinkgeek-promo
_______________________________________________
qooxdoo-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/qooxdoo-devel

Reply via email to