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::Action::Record::Update(3pm)			User Contributed Perl Documentation			Jifty::Action::Record::Update(3pm)

NAME
Jifty::Action::Record::Update - Automagic update action DESCRIPTION
This class is used as the base class for Jifty::Actions that are merely updating Jifty::Record objects. To use it, subclass it and override the "record_class" method to return the name of the Jifty::Record subclass that this action should update. METHODS
arguments Overrides the "arguments" in Jifty::Action::Record method to further specify that all of the primary keys must have values when submitted; that is, they are constructors. validate_arguments We only need to validate arguments that got submitted -- thus, a mandatory argument that isn't submitted isn't invalid, as it's not going to change the record. This is opposed to the behavior inherited from Jifty::Action, where mandatory arguments must be present for the action to run. However, constructor arguments are still required. take_action Overrides the virtual "take_action" method on Jifty::Action to call the appropriate "Jifty::Record"'s "set_" methods when the action is run, thus updating the object in the database. report_success Sets the "message" in Jifty::Result to default success message, "Updated". Override this if you want to report some other more user- friendly result. possible_columns Update actions do not provide fields for columns marked as "private" or "protected". _extra_validator_args Passes "for => 'update'" to validators. _extra_canonicalizer_args Passes "for => 'update'" to canonicalizers. _extra_autocompleter_args Passes "for => 'update'" to autocompleters. SEE ALSO
Jifty::Action::Record, Jifty::Record LICENSE
Jifty is Copyright 2005-2010 Best Practical Solutions, LLC. Jifty is distributed under the same terms as Perl itself. perl v5.14.2 2011-02-10 Jifty::Action::Record::Update(3pm)
Man Page