Mobile Widget Attribute display issues

0
Hi! I have created a basic mobile widget that should simply display the text contained in an input variable. For some reason, when I call alert(this.inputAttr), it alerts with the name of the attribute and not the actual string value... Any ideas why this is happening? This is how the property is defined : <property key="prefilledAttribute" type="attribute" required="false"> <caption>Prefilled Attribute</caption> <category>Data source</category> <description>This fields provides the pre-filled attribute</description> <attributeTypes> <attributeType name="String"/> </attributeTypes> </property> In the js I start off like this : dojo.declare("mywidget.widget.UsernameInput", mobile.widget._Widget, { prefilledAttribute : "", Then I call this : alert(this.prefilledAttribute);
asked
1 answers
1

You have to fetch the string value yourself. See the boolean slider for a sample. An update function will provide the current object:

   update : function(obj, callback) {

After that get the value

obj.get(prefilledAttribute)
answered