Opened 11 years ago

Closed 10 years ago

#8204 closed defect (fixed)

[patch][cla]dtl fails to update checkbox checked state

Reported by: liucougar Owned by: Neil Roberts
Priority: high Milestone: 1.3
Component: DojoX DTL Version: 1.2.1
Keywords: Cc:
Blocked By: Blocking:

Description

load this test case:

<html>
	<head>
	    <script type="text/javascript" src="../../../dojo/dojo.js"
				djConfig="isDebug: true, parseOnLoad: true"</script>
	    <script type="text/javascript">
					dojo.require("dojox.dtl._HtmlTemplated");

					dojo.declare("Fruit", [dijit._Widget, dojox.dtl._HtmlTemplated], {
						onClick: function(e){
							this.checked=!this.checked;
							this.render();
						},
						templateString: '<div><input type="checkbox" checked="{{ checked}}"><input type="button" dojoattachevent="onclick:onClick" value="change checked state"></div>'
					});

	        dojo.require("dojo.parser");
	    </script>
	</head>
	<body class="tundra">
		<div dojoType="Fruit" id="dtl"></div>
	</body>
</html>

click on the button does not actually change the checked state of the checkbox

the reason of this bug is dojo.attr(checkbox,'checked','false') does not work, it has to be: dojo.attr(checkbox,'checked',false) (without the quote around false)

Attachments (2)

8204.patch (637 bytes) - added by liucougar 11 years ago.
8204.1.patch (4.0 KB) - added by liucougar 11 years ago.

Download all attachments as: .zip

Change History (8)

comment:1 Changed 11 years ago by Adam Peller

Owner: changed from Adam Peller to Neil Roberts

comment:2 Changed 11 years ago by Adam Peller

Summary: dtl fails to update checkbox checked state[patch][cla]dtl fails to update checkbox checked state

Changed 11 years ago by liucougar

Attachment: 8204.patch added

comment:3 Changed 11 years ago by Neil Roberts

Resolution: fixed
Status: newclosed

(In [15985]) Fixes #8204. Enforce boolean for setter attributes !strict

comment:4 Changed 11 years ago by liucougar

Milestone: tbd1.3
Resolution: fixed
Status: closedreopened

the fix does not work in IE, will attach a new patch which works in FF/IE/Webkit and it will contain a UT

Changed 11 years ago by liucougar

Attachment: 8204.1.patch added

comment:5 Changed 11 years ago by Adam Peller

Component: DojoxDojoX DTL

comment:6 Changed 10 years ago by Neil Roberts

Resolution: fixed
Status: reopenedclosed

(In [16537]) Fixes #8204

  • More HTML tests and updates to test framework
  • Support for style/checked/disabled/readonly
  • Updates to widget nesting
  • !strict
Note: See TracTickets for help on using tickets.