How to add callback/listner on textInput object (bokeh)?

I have added a text input into my current document to parameterize one underlying sql query of mine through

textInput = TextInput(title=“query_parameters”, name=‘id’, value=‘my sine wave’)

curdoc().add(textInput)

how can I attach a listener/callback function to this textInput widget in current document ?

More information is needed. If you are using the (new) Bokeh server in the latest dev builds, you can follow this example, for instance:

  https://github.com/bokeh/bokeh/blob/master/examples/app/sliders.py

If you are not using a Bokeh server, thenn there is no way to run python callbacks. You are limited to JavaScript callbacks (which could certainly make an AJAX or REST API call), since in that case everything is running in the browser. These are described in the user's guide:

  http://bokeh.pydata.org/en/latest/docs/user_guide/interaction.html#defining-callbacks

And there are several additional examples under the "examples" folder in the GH repository as well.

Bryan

···

On Dec 7, 2015, at 6:50 AM, [email protected] wrote:

I have added a text input into my current document to parameterize one underlying sql query of mine through

    textInput = TextInput(title="query_parameters", name='id', value='my sine wave')

    curdoc().add(textInput)

how can I attach a listener/callback function to this textInput widget in current document ?

--
You received this message because you are subscribed to the Google Groups "Bokeh Discussion - Public" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [email protected].
To post to this group, send email to [email protected].
To view this discussion on the web visit https://groups.google.com/a/continuum.io/d/msgid/bokeh/92944e60-f1fa-4f6d-8f52-e7f285c28dcc%40continuum.io.
For more options, visit https://groups.google.com/a/continuum.io/d/optout.