Linux and UNIX Man Pages

Linux & Unix Commands - Search Man Pages

jifty::param::schema(3pm) [debian man page]

Jifty::Param::Schema(3pm)				User Contributed Perl Documentation				 Jifty::Param::Schema(3pm)

NAME
Jifty::Param::Schema - Declare parameters of a Jifty action with ease. SYNOPSIS
package MyApp::Action::Login; use Jifty::Param::Schema; use Jifty::Action schema { param email => label is 'Email address', is mandatory, ajax validates; param password => type is 'password', label is 'Password', is mandatory; param remember => type is 'checkbox', label is 'Remember me?', hints is 'If you want, your browser can remember your login for you', default is 0; }; DESCRIPTION
This module provides a simple syntax to declare action parameters. It re-exports "defer" and "lazy" from Scalar::Defer, for setting parameter fields that must be recomputed at request-time: param name => default is defer { Jifty->web->current_user->name }; See Scalar::Defer for more information about "defer". schema The "schema" block from a Jifty::Action subclass describes an action for a Jifty application. Within the "schema" block, the localization function "_" is redefined with "defer", so that it resolves into a dynamic value that will be recalculated upon each request, according to the user's current language preference. param Each "param" statement inside the "schema" block sets out the name and attributes used to describe one named parameter, which is then used to build a Jifty::Param object. That class defines possible field names to use in the declarative syntax here. The "param" function is not available outside the "schema" block. ALIASES
In addition to the labels provided by Jifty::Web::Form::Field and Jifty::Param, this module offers the following aliases: ajax validates, # ajax_validates is 1 ajax canonicalizes, # ajax_canonicalizes is 1 order is -1, # sort_order is -1 default is 0, # default_value is 0 valid are qw( 1 2 3 ), # valid_values are qw( 1 2 3 ) available are qw( 1 2 3 ), # available_values are qw( 1 2 3 ) render as 'select', # render_as is 'select' SEE ALSO
Object::Declare, Scalar::Defer merge_params HASHREF HASHREF Takes two hashrefs. Merges them together and returns the merged hashref. - Empty fields in subclasses don't override nonempty fields in superclass anymore. - Arrays don't merge; e.g. if parent class's valid_values is [1,2,3,4], and subclass's valid_values() is [1,2], they don't somehow become [1,2,3,4,1,2]. BUG: This should either be a private routine or factored out into Jifty::Util perl v5.14.2 2010-09-25 Jifty::Param::Schema(3pm)

Check Out this Related Man Page

Jifty::Plugin::Chart::Renderer(3pm)			User Contributed Perl Documentation		       Jifty::Plugin::Chart::Renderer(3pm)

NAME
Jifty::Plugin::Chart::Renderer - Base class for chart rendering classes SYNOPSIS
In your config.yml: Plugins: - Chart: DefaultRenderer: MyApp::Renderer In lib/MyApp/Renderer.pm: package MyApp::Renderer; use base qw/ Jifty::Plugin::Chart::Renderer /; sub init { my $self = shift; # Handle any required initialization, like required CSS, JS, etc. } sub render { my $self = shift; my %args = @_; # Output your chart Jifty->web->out( #{ Output your chart here... } ); # You could also return it as a string... return; } METHODS
Your renderer implementation must subclass this package and implement the following methods: new This is the constructor. Don't override this directly. Instead implement "init". init $renderer->init(); This is called by "new" immediately after constructing the object. It is passed a param hash from the config file. Subclasses should implement this method to do any required initialization such as letting Jifty know about required CSS files, JS files, etc. render Jifty->web->out($renderer->render(%args)); See Jifty::Plugin::Chart::Web for the arguments. It must (at least) accept the arguments given to the "chart" in Jifty::Plugin::Chart::Web method. The "render" method may either return it's output or print it out using Jifty::Web::out. SEE ALSO
Jifty::Plugin::Chart::Web, Jifty::Plugin::Chart::Renderer::Chart AUTHOR
Andrew Sterling Hanenkamp "<andrew.hanenkamp@boomer.com>" COPYRIGHT AND LICENSE
Copyright 2007 Boomer Consulting, Inc. This is free software and may be modified and distributed under the same terms as Perl itself. perl v5.12.4 2009-03-09 Jifty::Plugin::Chart::Renderer(3pm)
Man Page