I have a WaveMaker 6.7 app where I need to change the dojo ToolTip object for the rangeMessage property. For example, the javascript below changes the 'rangeMessage' property of a wavemaker number editor widget:
var page = wm.getPage('Main');
page["flowStdEditor"].setValue('rangeMessage','New Range Message Text');
alert(page["flowStdEditor"].rangeMessage); // Shows 'New Range Message Text' set above
On data entry where I enter a number that is out of range, I still receive the old 'rangeMessage' from when the app first started up in the clients web browser. Any ideas on how to change the 'rangeMessage' property on a number editor widget dynamically?? or after changing the 'rangeMessage' property, how do I refresh the dojo ToolTip object so it picks up the latest text??
Thx!!
Got it working, although it's not completely clean... using inspect in the web browser I found the dijit ID for the 'flowStdEditor' wavemaker object. I did this by entering a value out of range, right-clicking the tooltip and selecting 'inspect element'. It showed me the HTML for the tooltip:
I used
idid="dijit_form_NumberTextBox_14" in the html to do the following:Everything looks OK and when I enter a number that is out of ranged in the number editor widget, it now shows the new message 'New Range Message Text'.
What I don't like is hard coding the 'dijit_form_NumberTextBox_14' in my app. Does anyone know a way of retrieving the dijit.id for a WaveMaker wm.number editor widget?? (Updated!! See below)
This will retrieve what I need to make the tooltip change programmatically. It will grab 'dijit_form_NumberTextBox_14' in the example sited above.
Here is some code that loops through all the wavemaker page components looking for 'rangeMessage' and 'invalidMessage' properties: