#10477 closed defect (fixed)
CurrencyTextBox: currency symbol does not change upon change of the currency property
Reported by: | Jean-Rubin Leonard | Owned by: | Douglas Hays |
---|---|---|---|
Priority: | high | Milestone: | 1.5 |
Component: | Dijit - Form | Version: | 1.4.0b |
Keywords: | CurrencyTextBox currency symbol remains unchanged | Cc: | |
Blocked By: | Blocking: |
Description
Hi, As per Bill (wildbill) Keese's answer to my post on dojo-interest : "Sounds like a bug. Looking at the code I see that this.currency is reference from postCreate() rather than a _setCurrencyAttr() method, which is surely the problem (why changing currency after creation isn't working).
So, please file a ticket." Bill's answer says it all. When setting the currency at creation time, the currency symbol is what it's supposed to be but any later change to the currency attribute of the cTB leaves the currency symbol whereas it should change to match the currency. Thanks for correcting. Test case attached.
Attachments (3)
Change History (14)
Changed 11 years ago by
Attachment: | currenctyTextBox.zip added |
---|
comment:1 Changed 11 years ago by
Owner: | set to Douglas Hays |
---|---|
Summary: | CurrencyTextBox currency symbol does not change upon change of the currency property → CurrencyTextBox: currency symbol does not change upon change of the currency property |
comment:2 Changed 11 years ago by
Milestone: | tbd → 1.5 |
---|
comment:3 Changed 11 years ago by
Changed 11 years ago by
Attachment: | 10477.patch added |
---|
marked currency as const and added attr('constraints', object) API, and added automated tests
Changed 11 years ago by
Attachment: | 10477.2.patch added |
---|
after initial feedback, renamed postCreate in RangeBoundTextbox? and postMixInProperties in CurrencyTextBox? and NumberTextbox? to _setConstraintsAttr
comment:5 Changed 11 years ago by
Resolution: | → fixed |
---|---|
Status: | new → closed |
(In [21359]) Fixes #10477 !strict. Marked CurrencyTextBox::currency as const and added attr('constraints',object) API to ValidationTextBox? and subclasses, and added automated tests. Moved constraints processing from postMixinProperties and postCreate methods into _setConstraintsAttr methods.
comment:6 Changed 11 years ago by
Resolution: | fixed |
---|---|
Status: | closed → reopened |
Something about [21359] is breaking DateTextBox, in test_DateTextBox.html in the firebug console if you type
dijit.byId("german").attr("value")
it returns undefined, rather than the date it should return.
comment:7 Changed 11 years ago by
Resolution: | → fixed |
---|---|
Status: | reopened → closed |
comment:8 Changed 11 years ago by
Resolution: | fixed |
---|---|
Status: | closed → reopened |
Hi, I updated my trunks and that issue does not seem to be resolved. I am still not getting the currency symbol updated.
comment:9 Changed 11 years ago by
Resolution: | → fixed |
---|---|
Status: | reopened → closed |
If you run dijit/tests/form/robot/test_validate.html with the latest trunk, there is a test at the very end that changes the currency symbol using
textWidget.attr('constraints', {currency:'USD', locale:'en-us'});
This test correctly runs and changes the test's currency symbol from Euro to "$". If you cannot get this to work, then please reopen after attaching a testcase using attr('constraints',blah).
comment:10 Changed 11 years ago by
My bad. I wasn't using attr('constraints',blah) was going with straight attr.('blah')
comment:11 Changed 10 years ago by
Component: | Dijit → Dijit - Form |
---|
This issue is currently a serious blocking issue for our application - do you know if theres a workaround that could be used until 1.5 arrives? Thanks in advance!