Re: [web2py] Re: plugin_lazy_options_widget trigger event
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. Thanks Richard On Wed, May 16, 2012 at 8:30 PM, kenji4569 hos...@s-cubism.jp wrote: Hi Jim, In puling_suggest_widget, trigger events are invoked from a js file: https://github.com/sqlabs/sqlabs/blob/master/static/plugin_suggest_widget/suggest.js by $input.trigger($input.attr('id') + '__unselected'); $input.trigger($input.attr('id') + '__selected', [val]); methods. 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. Regards, Kenji 2012年5月16日水曜日 4時46分20秒 UTC+9 Jim S: Hi 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 for? -Jim
Re: [web2py] Re: plugin_lazy_options_widget trigger event
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. -Jim On 5/16/2012 7:30 PM, kenji4569 wrote: Hi Jim, In puling_suggest_widget, trigger events are invoked from a js file: https://github.com/sqlabs/sqlabs/blob/master/static/plugin_suggest_widget/suggest.js by $input.trigger($input.attr('id') + '__unselected'); $input.trigger($input.attr('id') + '__selected', [val]); methods. 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. Regards, Kenji 2012年5月16日水曜日 4時46分20秒 UTC+9 Jim S: Hi 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 for? -Jim