|actions||A request may contain one or more actions; these are represented as Jifty::Request::Action objects. Each action request has a moniker, a set of submitted arguments, and an implementation class. By default, all actions that are submitted are run; it is possible to only mark a subset of the submitted actions as active, and only the active actions will be run. These will eventually become full-fledged Jifty::Action objects.|
|state variables||State variables are used to pass around bits of information which are needed more than once but not often enough to be stored in the session. Additionally, they are per-browser window, unlike session information.|
|continuations||Continuations can be called or created during the course of a request, though each request has at most one current continuation. See Jifty::Continuation.|
|(optional) fragments||Fragments are standalone bits of reusable code. They are most commonly used in the context of AJAX, where fragments are the building blocks that can be updated independently. A request is either for a full page, or for multiple independent fragments. See Jifty::Web::PageRegion.|
Creates a new request object. For each key in the PARAMHASH, the method of that name is called, with the PARAMHASHs value as its sole argument.
Copies the bare minimals of the plack environment from the top request; this is called in BUILD if the request is a subrequest.
Return a copy of the request.
Attempt to fill in the request from any number of various methods YAML, JSON, etc. Falls back to query parameters. Takes a Plack::Request object.
Fills in the request from a data structure. This is called once the YAML or JSON has been parsed. See SERIALIZATION for details of how to construct a proper data structure.
Calls from_webform with the parameters in Plack::Request after splitting |s in argument names. See argument munging.
from_webform CW%QUERY_ARGSParses web form arguments into the Jifty::Request data structure. Takes in the query arguments. See SERIALIZATION for details of how query parameters are parsed.
Merges a single query parameter into the request. This may add actions, change action arguments, or change state variables.
Sets an argument for the current template. Template arguments, unlike values set via argument, <B>cannotB> add actions, change action argument, or change state variables. They are also not stored in continuations.
Removes the argument supplied this is the opposite of argument, above.
Takes a form field name generated by a Jifty action. Returns a tuple of
type A slightly-too-opaque identifier moniker The moniker for this fields action. argument name The argument name.
Converts the data from a webforms %args to the data structure that Jifty::Request uses internally.
XXX TODO: ALEX: DOC ME
Gets or sets the ID of the current continuation associated with the request.
Returns the current Jifty::Continuation object associated with this request, if any.
Gets or sets the ID of the continuation that we are about to return or call into.
Returns the Jifty::Continuation that we are about to return or call into, if any.
Saves the current request and response if weve been asked to. If we save the continuation, we redirect to the next page the call to save_continuation never returns.
Calls the Jifty::Continuation associated with this request, if there is one. Returns true if the continuation was called successfully if calling the continuation requires a redirect, this function will throw an exception to its enclosing dispatcher.
Returns from the current continuation, if there is one. If the request path doesnt match, we call the continuation again, which should redirect to the right place. If we have to do this, we return true, which should be taken as a sign to not process the request further.
Returns the path that was requested
This method returns true if the request was merely for validation. If this flag is set, then all active actions are validated, but no actions are run.
Returns an array of all of this requests state variables, as Jifty::Request::StateVariables.
Returns the Jifty::Request::StateVariable object for the variable named NAME, or undef of there is no such variable.
Adds a state variable to this requests internal representation. Takes a key and a value; returns the newly-added Jifty::Request::StateVariable.
Removes the given state variable. The opposite of add_state_variable, above.
Remove all the state variables.
Returns a list of the actions in the request, as Jifty::Request::Action objects.
Returns a Jifty::Request::Action object for the action with the given moniker, or undef if no such action was sent.
Required argument: moniker.
Optional arguments: class, order, active, arguments.
Adds a Jifty::Request::Action with the given moniker to the request. If the request already contains an action with that moniker, it merges it in, overriding the implementation class, active state, and <B>individualB> arguments. Returns the newly added Jifty::Request::Action.
Removes all actions from this request
Removes an action with the given moniker.
Returns a list of fragments requested, as Jifty::Request::Fragment objects.
Returns the requested fragment with that name
Required arguments: name, path
Optional arguments: arguments, wrapper
Takes two possible arguments, request and response; they default to the current Jifty::Request and the current Jifty::Response. Calls map in Jifty::Request::Mapper on every argument of this request, pulling arguments and results from the given request and response.
Returns the top-level request for this request; if this is a subrequest, this is the user-created request that the handler got originally. Otherwise, returns itself;
A small package that encapsulates the bits of an action request:
argument NAME [VALUE]
A small package that encapsulates the bits of a state variable:
A small package that encapsulates the bits of a fragment request:
argument NAME [VALUE]
The primary source of Jifty requests through the website are CGI query parameters. These are requests submitted using CGI GET or POST requests to your Jifty application.
For each action, the client sends a query argument whose name is J:A-moniker and whose value is the fully qualified class name of the actions implementation class. This is the action registration. The registration may also take the form J:A-order-moniker, which also sets the actions run order.
The actions arguments are specified with query arguments of the form J:A:F-argumentname-moniker. To cope with checkboxes and the like (which dont submit anything when left unchecked) we provide a level of fallback, which is checked if the first doesnt exist: J:A:F:F-argumentname-moniker.
State variables are set via J:V-name being set to the value of the state parameter.
The current continuation set by passing the parameter J:C, which is set to the id of the continuation. To create a new continuation, the parameter J:CREATE is passed. Calling a continuation is a simple as passing J:CALL with the id of the continuation to call; this will redirect to the appropriate url, with <J:RETURN> set.
The existence of J:VALIDATE says that the request is only validating arguments. J:ACTIONS is set to a semicolon-separated list of monikers; the actions with those monikers will be marked active, while all other actions are marked inactive. In the absence of J:ACTIONS, all actions are active.
|perl v5.20.3||JIFTY::REQUEST (3)||2011-04-25|