• Publicity: Public Only All

xowiki-www-procs.tcl

XoWiki - www procs. These procs are the methods called on xowiki pages via the web interface.

Location:
packages/xowiki/tcl/xowiki-www-procs.tcl
Created:
2006-04-10
Author:
Gustaf Neumann
CVS Identification:
$Id: xowiki-www-procs.tcl,v 1.368.2.52 2019/11/26 12:54:00 gustafn Exp $

Procedures in this file

Detailed information

::xowiki::File instproc www-download (public)

 <instance of ::xowiki::File[i]> www-download

This web-callable method downloads the file content of the current File object. The following query parameter can be used to influence the behavior

Partial Call Graph (max 5 caller/called nodes):
%3 ad_tmpdir ad_tmpdir (public) ::xowiki::File instproc www-download ::xowiki::File instproc www-download ::xowiki::File instproc www-download->ad_tmpdir

Testcases:
No testcase defined.

::xowiki::FormPage instproc combine_data_and_form_field_default (public)

 <instance of ::xowiki::FormPage[i]> combine_data_and_form_field_default \
    is_new form_field data_value

Combine the value of the form field (e.g. determined by the default) with the value in the instance attributes. This function decides, whether it should honor the data value or the form field value for e.g. rendering forms.

Parameters:
is_new - is this a new entry?
form_field - object id of the form field
data_value - the data from the instance attributes.

Partial Call Graph (max 5 caller/called nodes):
%3

Testcases:
No testcase defined.

::xowiki::FormPage instproc set_form_data (public)

 <instance of ::xowiki::FormPage[i]> set_form_data form_fields

Store the instance attributes or default values in the form.

Parameters:
form_fields

Partial Call Graph (max 5 caller/called nodes):
%3 require_html_procs require_html_procs ::xowiki::FormPage instproc set_form_data ::xowiki::FormPage instproc set_form_data ::xowiki::FormPage instproc set_form_data->require_html_procs

Testcases:
No testcase defined.

::xowiki::FormPage instproc www-edit (public)

 <instance of ::xowiki::FormPage[i]> www-edit \
    [ -validation_errors validation_errors ] \
    [ -disable_input_fields disable_input_fields ] [ -view view ]

This web-callable method renders a form page in "edit" mode (i.e. provide input fields). The following query parameters can be used to influene the results "return_url", "title", "detail_link", "text", and "description".

Switches:
-validation_errors (optional)
-disable_input_fields (defaults to "0") (optional)
-view (defaults to "true") (optional)

Partial Call Graph (max 5 caller/called nodes):
%3 _ _ (public) ad_conn ad_conn (public) dom dom export_vars export_vars (public) require_html_procs require_html_procs ::xowiki::FormPage instproc www-edit ::xowiki::FormPage instproc www-edit ::xowiki::FormPage instproc www-edit->_ ::xowiki::FormPage instproc www-edit->ad_conn ::xowiki::FormPage instproc www-edit->dom ::xowiki::FormPage instproc www-edit->export_vars ::xowiki::FormPage instproc www-edit->require_html_procs

Testcases:
No testcase defined.

::xowiki::FormPage instproc www-file-upload (public)

 <instance of ::xowiki::FormPage[i]> www-file-upload

This web-callable method can be used for uploading files using the current object as parent object for the new content. This method is typically called via drop-zone in a POST request, where the FormPage is a folder (which is treated as parent object)

Partial Call Graph (max 5 caller/called nodes):
%3

Testcases:
No testcase defined.

::xowiki::FormPage instproc www-toggle-modebutton (public)

 <instance of ::xowiki::FormPage[i]> www-toggle-modebutton

AJAX called function, called via POST. The function toggles the state of a button in the backend. The client provides the name of the button as form field named "button". If none is provided, the button is named as default "admin"

Partial Call Graph (max 5 caller/called nodes):
%3

Testcases:
No testcase defined.

::xowiki::Page instproc get_form_data (public)

 <instance of ::xowiki::Page[i]> get_form_data \
    [ -field_names field_names ] form_fields

Get the values from the form and store it in the form fields and finally as instance attributes. If the field names are not specified, all form parameters are used.

Switches:
-field_names (optional)
Parameters:
form_fields

Partial Call Graph (max 5 caller/called nodes):
%3 _ _ (public) ::xowiki::Page instproc get_form_data ::xowiki::Page instproc get_form_data ::xowiki::Page instproc get_form_data->_

Testcases:
No testcase defined.

::xowiki::Page instproc www-bulk-delete (public)

 <instance of ::xowiki::Page[i]> www-bulk-delete

This web-callable method performs a bulk delete based on the object names provided by the form-variable "objects" and refresh then the caller page. This method is e.g. called by the folder-procs.

Partial Call Graph (max 5 caller/called nodes):
%3

Testcases:
No testcase defined.

::xowiki::Page instproc www-clipboard-add (public)

 <instance of ::xowiki::Page[i]> www-clipboard-add

This web-callable method adds elements to the clipboard based on the names provided by the form variable "objects". The objects are resolved below the current object, which is treated as containing folder. After a adding elements to the clipboard, redirect either to the return_url of the calling page.

Partial Call Graph (max 5 caller/called nodes):
%3

Testcases:
No testcase defined.

::xowiki::Page instproc www-clipboard-clear (public)

 <instance of ::xowiki::Page[i]> www-clipboard-clear

This web-callable method clears the clibpboard contents. Finally redirect either to the return_url of the calling page.

Partial Call Graph (max 5 caller/called nodes):
%3

Testcases:
No testcase defined.

::xowiki::Page instproc www-clipboard-content (public)

 <instance of ::xowiki::Page[i]> www-clipboard-content

This web-callable method displays the content of the clipboard. Finally redirect either to the return_url of the calling page.

Partial Call Graph (max 5 caller/called nodes):
%3 util_user_message util_user_message (public) ::xowiki::Page instproc www-clipboard-content ::xowiki::Page instproc www-clipboard-content ::xowiki::Page instproc www-clipboard-content->util_user_message

Testcases:
No testcase defined.

::xowiki::Page instproc www-clipboard-copy (public)

 <instance of ::xowiki::Page[i]> www-clipboard-copy

This web-callable method copies the content of the clipboard to the current folder. After a copying the elements from the clipboard, redirect either to the return_url of the calling page.

Partial Call Graph (max 5 caller/called nodes):
%3 ad_try ad_try (public) util_user_message util_user_message (public) ::xowiki::Page instproc www-clipboard-copy ::xowiki::Page instproc www-clipboard-copy ::xowiki::Page instproc www-clipboard-copy->ad_try ::xowiki::Page instproc www-clipboard-copy->util_user_message

Testcases:
No testcase defined.

::xowiki::Page instproc www-clipboard-export (public)

 <instance of ::xowiki::Page[i]> www-clipboard-export

This web-callable method exports the content of the clipboard in form of an xowiki dump. Then clear the clipboard and stop the script.

Partial Call Graph (max 5 caller/called nodes):
%3 ad_script_abort ad_script_abort (public) ::xowiki::Page instproc www-clipboard-export ::xowiki::Page instproc www-clipboard-export ::xowiki::Page instproc www-clipboard-export->ad_script_abort

Testcases:
No testcase defined.

::xowiki::Page instproc www-create-new (public)

 <instance of ::xowiki::Page[i]> www-create-new \
    [ -parent_id parent_id ] [ -view_method view_method ] \
    [ -name name ] [ -nls_language nls_language ] \
    [ -publish_status publish_status ]

This web-callable method creates a new page, typically an instance of a form page. The method accesses several form variables such as "__form_redirect", "__text_to_html", "last_page_id", "name", "nls_language", "package_id", "package_instance", "page_order", "parent_id", "publish_status", "source_item_id", "title" The call redirects either to the "__form_redirect" or to the created page.

Switches:
-parent_id (defaults to "0") (optional)
-view_method (defaults to "edit") (optional)
-name (optional)
-nls_language (optional)
-publish_status (optional)

Partial Call Graph (max 5 caller/called nodes):
%3 _ _ (public) ad_text_to_html ad_text_to_html (public) ad_try ad_try (public) export_vars export_vars (public) ::xowiki::Page instproc www-create-new ::xowiki::Page instproc www-create-new ::xowiki::Page instproc www-create-new->_ ::xowiki::Page instproc www-create-new->ad_text_to_html ::xowiki::Page instproc www-create-new->ad_try ::xowiki::Page instproc www-create-new->export_vars

Testcases:
No testcase defined.

::xowiki::Page instproc www-create-or-use (public)

 <instance of ::xowiki::Page[i]> www-create-or-use \
    [ -parent_id parent_id ] [ -view_method view_method ] \
    [ -name name ] [ -nls_language nls_language ]

This web-callable method calls www-create-new, unless overloaded from some other package, as done e.g. by xowf.

Switches:
-parent_id (defaults to "0") (optional)
-view_method (defaults to "edit") (optional)
-name (optional)
-nls_language (optional)

Partial Call Graph (max 5 caller/called nodes):
%3

Testcases:
No testcase defined.

::xowiki::Page instproc www-csv-dump (public)

 <instance of ::xowiki::Page[i]> www-csv-dump

This web-callable method produces a cvs dump based on the includelet "form-usages".

Partial Call Graph (max 5 caller/called nodes):
%3

Testcases:
No testcase defined.

::xowiki::Page instproc www-delete (public)

 <instance of ::xowiki::Page[i]> www-delete

This web-callable method deletes a page via the delete method of the package.

Partial Call Graph (max 5 caller/called nodes):
%3

Testcases:
No testcase defined.

::xowiki::Page instproc www-delete-revision (public)

 <instance of ::xowiki::Page[i]> www-delete-revision

This web-callable method deletes a single revision of a Page, which is actually performed by the "delete_revision" method of the package, which is responsible for caching. Since we instantiate the Page based on the "revision_id" query parameter, it is sufficient to delete here just based on the current instance variable of the revision_id.

Partial Call Graph (max 5 caller/called nodes):
%3 export_vars export_vars (public) ::xowiki::Page instproc www-delete-revision ::xowiki::Page instproc www-delete-revision ::xowiki::Page instproc www-delete-revision->export_vars

Testcases:
No testcase defined.

::xowiki::Page instproc www-diff (public)

 <instance of ::xowiki::Page[i]> www-diff

This web-callable method produces a "diff" of two pages based on the current page and the revision_id provided as query parameter by "compare_revision_id". We can choose here between the more fancy "::util::html_diff" and a plain text diff. The latter is used, when the query variable "plain_text_diff" is provided, or when the fnacy diff raises an exception.

Partial Call Graph (max 5 caller/called nodes):
%3 ad_html_text_convert ad_html_text_convert (public) ad_try ad_try (public) ::xowiki::Page instproc www-diff ::xowiki::Page instproc www-diff ::xowiki::Page instproc www-diff->ad_html_text_convert ::xowiki::Page instproc www-diff->ad_try

Testcases:
No testcase defined.

::xowiki::Page instproc www-duplicate (public)

 <instance of ::xowiki::Page[i]> www-duplicate

This web-callable method duplcated the current object. It uses the same mechanisms as the clipboard-copy operation. After a adding elements to the clipboard, redirect either to the return_url of the calling page (as handled by www-clipboard-copy)

Partial Call Graph (max 5 caller/called nodes):
%3 ad_try ad_try (public) ::xowiki::Page instproc www-duplicate ::xowiki::Page instproc www-duplicate ::xowiki::Page instproc www-duplicate->ad_try

Testcases:
No testcase defined.

::xowiki::Page instproc www-edit (public)

 <instance of ::xowiki::Page[i]> www-edit [ -new on|off ] \
    [ -autoname on|off ] [ -validation_errors validation_errors ]

This web-callable method renders a page in "edit" mode (i.e. provide input fields). This is the old-style edit based on the old-style xowiki-form-procs. FormPages should be used when possible for better user experience.

Switches:
-new (boolean) (defaults to "false") (optional)
is this an edit-new operation?
-autoname (boolean) (defaults to "false") (optional)
value to be passed to getFormClass
-validation_errors (optional)
ignored in this class, but used for compatibility with FormPage.www-edit

Partial Call Graph (max 5 caller/called nodes):
%3 export_vars export_vars (public) ::xowiki::Page instproc www-edit ::xowiki::Page instproc www-edit ::xowiki::Page instproc www-edit->export_vars

Testcases:
No testcase defined.

::xowiki::Page instproc www-list (public)

 <instance of ::xowiki::Page[i]> www-list

This web-callable method provides a listing of pages. When the query parameter "children" is used, it returns the children of this item via the "child-resources" includelet. Otherwise, when this method is called on any kind of Form, it returns the form instances via the "form-usages" includelet. Otherwise, when this method is called on any kind of folder pages, it returns the elements of this folder via the "child-resources" includelet. If the above fails, it redirects to the starting page.

Partial Call Graph (max 5 caller/called nodes):
%3

Testcases:
No testcase defined.

::xowiki::Page instproc www-make-live-revision (public)

 <instance of ::xowiki::Page[i]> www-make-live-revision

This web-callable method makes the revision specified by parameter "revision_id" the live revision.

Partial Call Graph (max 5 caller/called nodes):
%3 export_vars export_vars (public) ::xowiki::Page instproc www-make-live-revision ::xowiki::Page instproc www-make-live-revision ::xowiki::Page instproc www-make-live-revision->export_vars

Testcases:
No testcase defined.

::xowiki::Page instproc www-popular-tags (public)

 <instance of ::xowiki::Page[i]> www-popular-tags

AJAX called function, returns an HTML snippet with the popular tags.

Partial Call Graph (max 5 caller/called nodes):
%3 _ _ (public) ad_script_abort ad_script_abort (public) ad_urlencode ad_urlencode (public) ::xowiki::Page instproc www-popular-tags ::xowiki::Page instproc www-popular-tags ::xowiki::Page instproc www-popular-tags->_ ::xowiki::Page instproc www-popular-tags->ad_script_abort ::xowiki::Page instproc www-popular-tags->ad_urlencode

Testcases:
No testcase defined.

::xowiki::Page instproc www-revisions (public)

 <instance of ::xowiki::Page[i]> www-revisions

This web-callable method lists the revisions based. The rendering is actually performed in the cr-procs, but can overloaded per package.

Partial Call Graph (max 5 caller/called nodes):
%3 _ _ (public) ::xowiki::Page instproc www-revisions ::xowiki::Page instproc www-revisions ::xowiki::Page instproc www-revisions->_

Testcases:
No testcase defined.

::xowiki::Page instproc www-save-attributes (public)

 <instance of ::xowiki::Page[i]> www-save-attributes

The web-callable method save-attributes is typically callable over the REST interface. It allows one to save attributes of a page without adding a new revision.

Partial Call Graph (max 5 caller/called nodes):
%3

Testcases:
No testcase defined.

::xowiki::Page instproc www-save-tags (public)

 <instance of ::xowiki::Page[i]> www-save-tags

This web-callable method saves tags (provided via form parameter "new_tags").

Partial Call Graph (max 5 caller/called nodes):
%3

Testcases:
No testcase defined.

::xowiki::Page instproc www-toggle-publish-status (public)

 <instance of ::xowiki::Page[i]> www-toggle-publish-status

This web-callable method toggles from arbitrary states to "ready" and from "ready" to "production".

Partial Call Graph (max 5 caller/called nodes):
%3 ad_return_url ad_return_url (public) ::xowiki::Page instproc www-toggle-publish-status ::xowiki::Page instproc www-toggle-publish-status ::xowiki::Page instproc www-toggle-publish-status->ad_return_url

Testcases:
No testcase defined.

::xowiki::Page instproc www-validate-attribute (public)

 <instance of ::xowiki::Page[i]> www-validate-attribute

This web-callable method can be used to validate form attributes, typically called via AJAX.

Partial Call Graph (max 5 caller/called nodes):
%3

Testcases:
No testcase defined.

::xowiki::Page instproc www-view (public)

 <instance of ::xowiki::Page[i]> www-view [ content ]

This web-callable method is called when viewing wiki content. The method "view" is used primarily for the toplevel call, when the xowiki page is viewed. It is not intended for e.g. embedded wiki pages (see include), since it contains full framing, etc. When "content" is not provided via the method parameter - the common case - the rendered content is the result of the "render" method of the current object.

Parameters:
content (optional)

Partial Call Graph (max 5 caller/called nodes):
%3 _ _ (public) ad_return_complaint ad_return_complaint (public) ad_return_url ad_return_url (public) ad_script_abort ad_script_abort (public) ad_try ad_try (public) ::xowiki::Page instproc www-view ::xowiki::Page instproc www-view ::xowiki::Page instproc www-view->_ ::xowiki::Page instproc www-view->ad_return_complaint ::xowiki::Page instproc www-view->ad_return_url ::xowiki::Page instproc www-view->ad_script_abort ::xowiki::Page instproc www-view->ad_try

Testcases:
No testcase defined.

::xowiki::PageInstance instproc www-use-template (public)

 <instance of ::xowiki::PageInstance[i]> www-use-template

This web-callable method can be used to change the "template" of a PageInstance. The caller provides the "form" as query parameter which should be used in future for handling the instance parameters of the PageInstance. This method can be as well be used for changing the associated workflow of an workflow instance.

Partial Call Graph (max 5 caller/called nodes):
%3

Testcases:
No testcase defined.

::xowiki::PageTemplate instproc www-delete (public)

 <instance of ::xowiki::PageTemplate[i]> www-delete

This web-callable method deletes a page via the delete method of the package. This method checks first, if there exists still instances of this page (depending on it).

Partial Call Graph (max 5 caller/called nodes):
%3 _ _ (public) ::xowiki::PageTemplate instproc www-delete ::xowiki::PageTemplate instproc www-delete ::xowiki::PageTemplate instproc www-delete->_

Testcases:
No testcase defined.
[ show source ]