Closed topa closed 12 years ago
So the default-value of the Schema false was casted to "false" by the Model-Class? Or is the default value of the checkbox in the dom "false" which doesn't get casted to false?
I'm not sure if i understood your problem.
Alamid doesn't cast "false" to false, because we keep it the native JavaScript-way.
I would prefer handling such stuff in the applications-code (like in the view in this case), because i don't like changing the way javascript handles the "false" string. It might confuse others if we change it. Although i agree it's stupid of JavaScript not to accept "false" as boolean false.
If the esacpe-question of commit above is clear, we can close this issue.
This commit closes this issue: https://github.com/peerigon/alamid/commit/e4727f89ee3f7c95771599a24b98b38381604167
For refactoring of
View.class
I've also refactored it's tests. So I've implemented the FormModel with it's schema formSchema.This is a property of the Model defined in schema:
But in the test occurred a problem. It seems that the default value of the
checkbox
andradio
is notfalse
but"false"
. For the moment I had to comment some parts of the View.class.test. I've marked this parts with code>//@TODO</code Is there any issue or lack of support of casting for Booleans in the Model-Class? Did I something wrong?@meaku could you please help me with this one?