- Methods: All Methods Documented Methods Hide Methods
- Source: Display Source Hide Source
- Variables: Show Variables Hide Variables
Class ::xo::Context
::xo::Contextcreate ... \
[ -actual_query (default " ") ] \
[ -invoke_object invoke_object ] \
[ -locale locale ] \
[ -package_id (default "0") ] \
[ -parameter_declaration (default "") ]
Defined in
Class Relations
- class: ::xotcl::Class
- superclass: ::xotcl::Object
- subclass: ::xowiki::Includelet
, ::xo::ConnectionContext
Methods (to be applied on instances)
actual_query (setter)
exists_query_parameter (scripted, public)
<instance of xo::Context> exists_query_parameter name
Return whether a processed query parameter exists.
- Parameters:
- name (required)
- Parameter name.
- Testcases:
- test_xo_cc
export_vars (scripted, public)
<instance of xo::Context> export_vars [ -all ] [ -level level ]
Export either the declared query variables (default) or all (when explicitly demanded).
- Switches:
- -all (optional)
- when specified, export all query variables
- -level (optional, defaults to
"1")- target level
- Testcases:
- package_normalize_path, xowiki_test_cases, link_tests, slot_interactions, path_resolve
get_all_query_parameter (scripted)
get_parameters (scripted, public)
<instance of xo::Context> get_parameters
Convenience routine for includelets. It combines the actual parameters from the call in the page (highest priority) with the values from the url (second priority) and the default values from the signature.
- Testcases:
- xowiki_test_cases
initialize (scripted)
invoke_object (setter, public)
<instance of xo::Context> invoke_object
Get or set the object selected for invocation by this context.
locale (setter)
original_url_and_query (scripted, public)
<instance of xo::Context> original_url_and_query args \ [ args... ]
Get or set the original URL and query string.
- Parameters:
- args (required)
- One argument stores an explicit value. With no argument, return the stored value or construct it from the context URL and query.
- Testcases:
- package_normalize_path, xowiki_test_cases, link_tests, slot_interactions, path_resolve
package_id (setter, public)
<instance of xo::Context> package_id
Get or set the OpenACS package instance ID associated with this context.
- Testcases:
- xotcl_core_tutorial_2, xowiki_test_cases, link_tests
parameter_declaration (setter)
process_query_parameter (scripted, public)
<instance of xo::Context> process_query_parameter \ [ -all_from_query on|off ] [ -all_from_caller on|off ] \ [ -caller_parameters caller_parameters ]
Populate the context query parameters from the request and caller. Use form values for declared parameters absent from the query, then apply caller overrides and parse the declared arguments.
- Switches:
- -all_from_query (optional, boolean, defaults to
"true")- Keep undeclared query parameters.
- -all_from_caller (optional, boolean, defaults to
"true")- Keep undeclared caller parameters.
- -caller_parameters (optional)
- Optional dictionary of dash-prefixed caller arguments.
- Testcases:
- api__context
query_parameter (scripted)
set_query_parameter (scripted)
unset_query_parameter (scripted)
- Methods: All Methods Documented Methods Hide Methods
- Source: Display Source Hide Source
- Variables: Show Variables Hide Variables
![[i]](/resources/acs-subsite/ZoomIn16.gif)