Opened 12 years ago

Closed 12 years ago

Last modified 12 years ago

#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 12 years ago by bill

(In [10164]) Refs #4120: port Form demo to 0.9 Test is ported, but I see a few problems:

  • formatting problems (slider is block formatting; is that intended?)
  • Webkit gets errors
  • submitting form doesn't copy the dateOfBirth
  • editor minimimum height isn't working

comment:2 Changed 12 years ago by haysmark

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 12 years ago by haysmark

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 12 years ago by bill

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 12 years ago by bill

Resolution: fixed
Status: newclosed

comment:6 Changed 12 years ago by bill

Resolution: fixed

(In [10183]) Fixes #4120: various fixes to form test

comment:7 Changed 12 years ago by bill

(In [10184]) Refs #4120: few more fixes to form test

comment:8 Changed 12 years ago by bill

(In [10289]) move form demo to demos directory. refs #4120.

Note: See TracTickets for help on using tickets.