#4120 closed task (fixed)
Form demo
Reported by: | bill | Owned by: | bill |
---|---|---|---|
Priority: | high | Milestone: | 0.9 |
Component: | Dijit | Version: | 0.9 |
Keywords: | Cc: | ||
Blocked By: | Blocking: |
Description
Port form demo from 0.4 to 0.9, and make it better.
Change History (8)
comment:1 Changed 14 years ago by
comment:2 Changed 14 years ago by
A Date is an object, right? So your dojo.toJson call in the test file attempts to write the Date as a JSON object. But Date does not contain primitives in the traditional sense so you get nothing in the JSON. You can't expect toJson to give you an ISO string because toJson won't have the constraints object (on the widget) available, so it won't know whether to submit date or time or both.
Fortunately for you, MappedTextbox? already has a toString method that does this, so you should call it in place of getValue.
comment:3 Changed 14 years ago by
And the RadioButton? test in getValues is a bit of a hack, don't you think? What if someone makes a RadioStation? widget?
comment:4 Changed 14 years ago by
Ah you are right about the date. I forgot to add code to make dojo.json() work with dates. And as for RadioButton?... yes it's a bit of a hack. :-) Will have to live with it for the time being though.
comment:5 Changed 14 years ago by
Resolution: | → fixed |
---|---|
Status: | new → closed |
comment:6 Changed 14 years ago by
Resolution: | → fixed |
---|
(In [10164]) Refs #4120: port Form demo to 0.9 Test is ported, but I see a few problems: