Jifty::Plugin::AutoReference::Widget.3pm

Langue: en

Autres versions - même langue

Version: 2007-12-26 (ubuntu - 08/07/09)

Section: 3 (Bibliothèques de fonctions)

NAME

Jifty::Plugin::AutoReference::Widget - an autocomplete widget for references

SYNOPSIS

   use MyApp::Record schema {
       column employer =>
           references MyApp::Model::Company,
           label is 'Employer',
           is AutoReference,
           ;
   };
 
 

DESCRIPTION

Provides a special autocomplete widget that can be useful when there are too many items for a Select box to be practical.

WARNING: As of this writing, it should be noted that this widget does not degrade gracefully. If you need a widget that operates properly even when JavaScript is unavailable, this widget won't do that job at this time.

METHODS

render

Overrides the field renderer to force autocompletion to be turned on.

render_widget

Overrides the widget renderer to draw both a hidden field that stores the actual referenced ID and a text field that is autocompleted using the records brief description.

render_value

Overrides the value renderer to show the brief description of the referenced record.

autocomplete_javascript

Overrides the JavaScript autocompletion widget to use "Jifty.Plugin.AutoReference" instead of the regular "Jifty.Autocompleter".

AUTHORS

Andrew Sterling Hanenkamp "<hanenkamp@cpan.org>" Copyright 2007 Boomer Consulting, Inc. All Rights Reserved.

This program is free software and may be modified and distributed under the same terms as Perl itself.