Linux and UNIX Man Pages

Linux & Unix Commands - Search Man Pages

jifty::request::mapper(3pm) [debian man page]

Jifty::Request::Mapper(3pm)				User Contributed Perl Documentation			       Jifty::Request::Mapper(3pm)

NAME
Jifty::Request::Mapper - Maps response values into arbitrary query parameters DESCRIPTION
"Jifty::Request::Mapper" is used to insert values into parameters that you can't know when you originally constructed the request. The prime example of this is a Create action to a View page -- where you can't know what ID to supply to the View page until after the Create action has run. This problem can be fixed by establishing a mapping between some part of the Jifty::Result of the Create action, and the ID query parameter. METHODS
query_parameters HASH Extended syntax for generating query parameters. This is used by Jifty::Web::Form::Clickable for its "parameters" argument, as well as for "results" of continuations. Possible formats for each key => value pair in the "HASH" are: "KEY => STRING" The simplest form -- the "KEY" will have the literal value of the "STRING" supplied "KEY => { result => ACTION }" The "KEY" will take on the value of the content named "KEY" from the result of the "ACTION". "ACTION" may either be a Jifty::Action object, or a moniker thereof. "KEY => { result => ACTION, name => STRING }" The "KEY" will take on the value of the content named "STRING" from the result of the "ACTION". "ACTION" may either be a Jifty::Action object, or a moniker thereof. "KEY => { request_argument => STRING }" The "KEY" will take on the value of the argument named "STRING" from the request. "KEY => { argument => ACTION }" The "KEY" will take on the value of the argument named "KEY" from the "ACTION". "ACTION" may either be a Jifty::Action object, or a moniker thereof. "KEY => { argument => ACTION. name => STRING }" The "KEY" will take on the value of the argument named "STRING" from the "ACTION". "ACTION" may either be a Jifty::Action object, or a moniker thereof. "result_of" and "argument_to" are valid synonyms for "result" and "argument", above. map PARAMHASH Responsible for doing the actual mapping that "query_parameters" above sets up. That is, takes magical query parameters and extracts the values they were meant to have. destination The "key" from a query parameter source The "value" of a query parameter request The Jifty::Request object to pull action arguments from. Defaults to the current request. response The Jifty::Response object to pull results from. Defaults to the current response. Returns a key => value pair. perl v5.14.2 2010-12-08 Jifty::Request::Mapper(3pm)

Check Out this Related Man Page

Jifty::Action::Record::Create(3pm)			User Contributed Perl Documentation			Jifty::Action::Record::Create(3pm)

NAME
Jifty::Action::Record::Create - Automagic creation action DESCRIPTION
This class is used as the base class for Jifty::Actions that are merely creating 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 creates. METHODS
arguments Set the default value in each of the fields to whatever the default of the column is in the model take_action Overrides the virtual "take_action" method on Jifty::Action to call the appropriate "Jifty::Record"'s "create" method when the action is run, thus creating a new object in the database. The "id" of the new row is returned in the "id" content of the Jifty::Result for the action. You can use this in conjunction with request mapping in order to give later parts of the request access to the "id". create_record This method actually performs the call to "record->create". It receives as arguments the parameter hash and should return the message for the user, indicating success or failure. report_success Sets the "message" in Jifty::Result to default success message, "Created". Override this if you want to report some other more user- friendly result. possible_columns Create actions do not provide fields for columns marked as "private" or "protected". _extra_validator_args Passes "for => 'create'" to validators. _extra_canonicalizer_args Passes "for => 'create'" to canonicalizers. _extra_autocompleter_args Passes "for => 'create'" 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 2010-12-10 Jifty::Action::Record::Create(3pm)
Man Page