checkbox return off
Now, how this relates to Ext. Standard Ext checkboxes return a value of "on" if they're successful. If they are not, they do as they should just like standard HTML checkboxes and return nothing. Now, personally, I don't like checking the value of a string server-side, so a simple tweak was to specify what the value ought to be, in my case 1.
In closing, in my opinion Ext treating the checkbox differently than the HTML checkbox with what is considered successful/unsuccessful and what to do in each of those cases is a bad idea.
BTW, I also think that not sending unchecked value to the server was not good design decision. It makes automation at backend more complicated. One old math professor taught us that zero is number and not "nothing" so here it is same unchecked checkbox has state of "off", not nothing... Just my 2 cents...
thanks for that wonderful contribution. I will try it out.
as for the debate on whether the standard html checkbox is a good design, I posted somewhere else to find out what people are doing to get around the non-returned uncheck. what I found out is that people are adding on a hidden checkbox, with javascripts which turns on the hidden checkbox, and force it to return the "off" value. that being the case, it make total sense that Extjs package all that in as a design option. it would be of service to many folks filling in javascripts themselves. for those who are die hard standard watchers. they can simply ignore the option.
other wise, if I may ask, are we expect to simply not use checkbox for boolean form fields? like stick to a pair of radios for true/false?
Thanks.
#If you have any other info about this subject , Please add it free.# |