plugin_lazy_options_widget trigger event

Showing 1-4 of 4 messages
plugin_lazy_options_widget trigger event Jim S 5/15/12 12:46 PM

I'm trying to use the plugin_lazy_options_widget to build a dependent
select list.  I have to fields on the screen, both with the IS_IN_DB
validator and values available in the second depend on what is selected
in the first.  This widget from s-cubism seems like just the thing, but
I can't figure out how to pass the right event that will trigger the
population of the second widget.

The example shows it working with another widget from s-cubism which
triggers an event on the 'body' element but I can't see how to trigger
the right event to get mien working off another SELECT element.

Can someone give me some pointers on how to determine the event to watch


Re: plugin_lazy_options_widget trigger event kenji4569 5/16/12 5:30 PM
Hi Jim,

In puling_suggest_widget, trigger events are invoked from a js file:
$input.trigger($input.attr('id') + '__unselected');
$input.trigger($input.attr('id') + '__selected', [val]);
To setup your trigger events, first you need to create a custom widget for a field, and then trigger events inside the widget using the jQuery trigger method.


2012年5月16日水曜日 4時46分20秒 UTC+9 Jim S:
Re: [web2py] Re: plugin_lazy_options_widget trigger event Richard 5/17/12 7:22 AM
What to do to not have dependency, I don't like to have autocomplete, but in the pass I didn't find how to avoid of using Suggest Widget.


Re: [web2py] Re: plugin_lazy_options_widget trigger event Jim S 5/17/12 7:26 AM
Thanks Kenji - I was trying to do this with the default widgets provided by web2py.  Thanks for the info though, I will go down this path when I get the time to dig deeper.