Changes between Initial Version and Version 3 of Ticket #10324


Ignore:
Timestamp:
Nov 13, 2009, 3:27:16 AM (10 years ago)
Author:
bill
Comment:

Apparently the actual bug is that certain widgets, although disabled, still send their value when a form is submitted?

Looking at the code, seems like the offenders are dijit.form.Select, dijit.form.Slider, and dojox.widget.ColorPicker. Also dojox.gauge.Gauge. The widgets that already extend MappedTextBox are fine, since it has code to disable valueNode already.

I guess moving that code into _FormValueWidget makes sense. Doug what do you think?

Should also add a comment to the top of FormValueWidget defining what valueNode is, for documentation purposes:

// valueNode: [protected] DomNode
//		Hidden DomNode (usually an <input>) containing the value of this widget.
//		Used to send the value to the server when the form is submitted.
/*=====
valueNode: null,
=====*/

or something like that.

In any case I think that the code in ValidationTextBox can be removed.

On a related note:

  • shouldn't dojox.widget.ColorPicker extend FormValueWidget rather than FormWidget?
  • dojox.Gauge also has a valueNode (a hidden <input>) but it doesn't even extend FormWidget. Maybe it should also extend FormValueWidget.

Legend:

Unmodified
Added
Removed
Modified
  • Ticket #10324

    • Property Severity changed from critical to normal
    • Property Cc Douglas Hays added
    • Property Summary changed from dijit.__setDisabledAttr does not disable it's corresponding valueNode to dijit.form widgets do not disable it's corresponding valueNode
    • Property Priority changed from highest to normal
    • Property Milestone changed from tbd to 1.5
    • Property Owner set to Nathan Toone
  • Ticket #10324 – Description

    initial v3  
    77}}}
    88
    9 
    10  but it really should do this in _FormValueWidget. Right now my dijit.form.Select's hidden valueNodes don't disable when I do an attr('disabled', true) on it.
     9but it really should do this in _FormValueWidget. Right now my dijit.form.Select's hidden valueNodes don't disable when I do an attr('disabled', true) on it.
    1110
    1211We could probably remove the other dijits that do this themselves.