Page 1 of 1
Adding custom property
Posted: Tue Apr 22, 2014 3:21 pm
by mpilo0
We're creating a widget from scratch, however we have a few problems because we want to bind a dictionnary field into the new property. When i create the new widget, i have my property who appears and everything, however i don't have the option to bind to a dictionnary field. I've read the documentation on pui.addCustomProperty and cannot find a way to do it. Please help.
Re: Adding custom property
Posted: Tue Apr 22, 2014 3:43 pm
by Scott Klement
Not exactly sure what you mean by "bind a dictionary field to a new property." Are you referring to the translation dictionary? Or something like a field reference file (data dictionary)? Or...?
Maybe you are just looking to set up your widget so that the default value of a property is bound to a particular field? If so, this would be done with the 'defaults' property on the pui.toolbox.add() API.
Re: Adding custom property
Posted: Wed Apr 23, 2014 7:40 am
by mpilo0
Sorry, I should've specified but i do indeed mean the translation dictionnary.
Re: Adding custom property
Posted: Wed Apr 23, 2014 9:22 am
by David
Sorry, the 'pui.addCustomProperty()' document needed an update -- I've done so now. If you pass a property "translate" set to true, the option will appear to translate your custom property.
Re: Adding custom property
Posted: Wed Apr 23, 2014 11:14 am
by mpilo0
Ok, Thank you both for your help.