dojo - What is the trick to changing currency of CurrencyTextBox -


i have currencytextbox set currency default currency. user can change making selection in currency drop down on same form. thought change currency attribute on textbox dynamically nothing happens. symbol not change. there trick make work? i've seen related posts had destroy , recreate widget. seems there might better way?

i'd set currency of unitcostid widget user's selected currency on fly. result currency symbol change match newly selected currency.

  new currencytextbox ({         id: "unitcostid",         name: "price",           currency: "usd",         required: true,         value: "",         placeholder: "enter price"     }, "unitcostnode"); ----------------------------------------------------   new select({         id: "currencyoptionsid",         name: "currency_code",         value: "usd",         options: currencyoptions,         required: true,         onchange: function(val) {            var currency_id = this.get("value");            registry.byid("unitcostid").set("currency",this.get("value");         // registry.byid("unitcostid").reset();          }         }, "currencynode"); 

any appreciated!

unfortunately, currency property has no setter logic, , documented constant. however, due how underlying code works, can still manage change setting via constraints instead:

registry.byid("unitcostid").set("constraints", { currency: this.get("value") }); 

Comments

Popular posts from this blog

php - Zend Framework / Skeleton-Application / Composer install issue -

c# - Better 64-bit byte array hash -

python - PyCharm Type error Message -