Opened 12 years ago

Closed 12 years ago

Last modified 12 years ago

#2560 closed defect (fixed)

Form widget : null point exception

Reported by: guest Owned by: bill
Priority: high Milestone:
Component: Widgets Version: 0.4.1
Keywords: widget Form NullPointException Cc: joose.vettenranta@…
Blocked By: Blocking:

Description

at function "getValues" on widget/Form.js, there is code such as:

if(elm.name == '') {continue;}

it's too simple for elm.name checking, because elm.name might be undefined ( some element doesn't need the name property, eg: label,fieldset ). So there is a null point exception will be throwned. it should be changed like:

if(elm.name && elm.name == '') {continue;}

Attachments (1)

Form3.patch (1.6 KB) - added by joose 12 years ago.
Fixes name problem (if empty or not defined) and adds support for Combobox and adds a comment =)

Download all attachments as: .zip

Change History (4)

comment:1 Changed 12 years ago by li.jianye@…

We used dojo toolkit several months. I want to use it to make a js full stack web application.

comment:2 Changed 12 years ago by Adam Peller

Resolution: fixed
Status: newclosed

(In [7552]) Fixes #2560

comment:3 Changed 12 years ago by Adam Peller

Cc: joose.vettenranta@… added
Joose - please double check me on this. Seems like the proposed fix should have been an
or just !elm.name

Changed 12 years ago by joose

Attachment: Form3.patch added

Fixes name problem (if empty or not defined) and adds support for Combobox and adds a comment =)

Note: See TracTickets for help on using tickets.