Skip to main content

how get values?

3 replies [Last post]
muneer123
Offline
Joined: 2008-09-22
Points: 0

i am newbie in ajax jmaki
i am using netbeans id. i install all required plugins and run a project successfully.

Now i want ti get value of widget. is possible? if yes how can it do it?
early thanks for reply

Reply viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.
sloanb
Offline
Joined: 2003-09-14
Points: 0

With widgets there should always a public function called getValue which will return the current value of the widget. You can get this by using either using your glue.js to a simple on click etc.. from within your form.

Example glue.js gettting dojo.datepicker value

[code]

var dpWidget = jmaki.getWidget("dp1"); // dp1 is the uuid of the widget
if(widgetValue){
var widgetValue = dpWidget.getValue();
}

[/code]

From here there are several ways to go about getting it into your form. Some people use hidden fields and submit like a normal form. Others create an async call using jmaki.doAjax. If you look at the componnent.js file of the dojo.combox widget you will see the getValue function.Let me know if this helps you out. I can post more examples if you need them.

Regards,

--SB

sloanb
Offline
Joined: 2003-09-14
Points: 0

Which widget specifically are you wanting to get the value of?

muneer123
Offline
Joined: 2008-09-22
Points: 0

[b][/b]
OR
other like
combo box, editor