%3 ::xo::db::CrCache::Item ::xo::db::CrCache::Item ::xotcl::Object ::xotcl::Object ::xo::db::CrCache::Item->::xotcl::Object ::xowiki::Page ::xowiki::Page → find_slot anchor create_form_fields_from_form_constraints create_link find_slot get_form_data include is_folder_page pretty_link render resolve_included_page_name save_new substitute_markup www-autosave-attribute www-bulk-delete www-clipboard-add www-clipboard-clear www-clipboard-content www-clipboard-copy www-clipboard-export www-create-new www-create-or-use www-csv-dump www-delete www-delete-revision www-diff www-duplicate www-edit www-list www-make-live-revision www-popular-tags www-revisions www-save-attributes www-save-tags www-toggle-publish-status www-validate-attribute www-view ::xo::db::CrItem ::xo::db::CrItem ::xowiki::Page->::xo::db::CrItem ::xowiki::File ::xowiki::File www-download ::xowiki::File->::xowiki::Page ::xowiki::PageTemplate ::xowiki::PageTemplate www-delete ::xowiki::PageTemplate->::xowiki::Page ::xowiki::PageInstance ::xowiki::PageInstance get_from_template www-use-template ::xowiki::PageInstance->::xowiki::Page ::xowiki::PlainPage ::xowiki::PlainPage ::xowiki::PlainPage->::xowiki::Page ::xowiki::PodcastItem ::xowiki::PodcastItem ::xowiki::PodcastItem->::xowiki::File ::xowiki::Form ::xowiki::Form ::xowiki::Form->::xowiki::PageTemplate ::xowiki::FormPage ::xowiki::FormPage → compute_filter_clauses → fetch_object → filter_expression → get_all_children combine_data_and_form_field_default extra_html_fields get_property is_folder_page load_values_into_form_fields property render_thumbnails set_form_data set_live_revision set_property update_attribute_from_slot update_item_index www-edit www-file-upload www-toggle-modebutton ::xowiki::FormPage->::xowiki::PageInstance ::xowiki::Object ::xowiki::Object ::xowiki::Object->::xowiki::PlainPage

Class ::xowiki::Page

::xowiki::Page[i] create ... \
           [ -absolute_links (default "0") ] \
           [ -do_substitutions (default "1") ] \
           [ -render_adp (default "1") ]

Defined in

Class Relations

  • class: ::xo::db::CrClass[i]
  • superclass: ::xo::db::CrItem[i]
  • subclass: ::xowiki::File[i], ::xowiki::PageTemplate[i], ::xowiki::PageInstance[i], ::xowiki::PlainPage[i]

Methods (to be applied on the object)

Methods (to be applied on instances)

  • anchor (scripted)

     <instance of xowiki::Page[i]> anchor

    Testcases:
    nested_self_references, xowiki
  • create_form_fields_from_form_constraints (scripted, public)

     <instance of xowiki::Page[i]> create_form_fields_from_form_constraints \
        [ -lookup ] form_constraints

    Create form-fields from form constraints. When "-lookup" is specified, the code reuses existing form-field instead of recreating it. Since create_raw_form_field uses destroy_on_cleanup, we do not have to care here about destroying the objects.

    Switches:
    -lookup (optional)
    Parameters:
    form_constraints (required)
    Returns:
    potentially empty list of form-field objects

    Testcases:
    form_fields_from_form_constraints
  • create_link (scripted)

     <instance of xowiki::Page[i]> create_link

    Testcases:
    path_resolve, xowiki, nested_self_references
  • find_slot (scripted)

     <instance of xowiki::Page[i]> find_slot

    Testcases:
    slot_interactions, xowiki
  • get_form_data (scripted, 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 (required)

    Testcases:
    create_form_with_form_instance
  • include (scripted, public)

     <instance of xowiki::Page[i]> include [ -configure configure ] arg

    Include the html of the includelet. The method generates an includelet object (might be another xowiki page) and renders it and returns either html or an error message.

    Switches:
    -configure (optional)
    Parameters:
    arg (required)

    Testcases:
    includelet_toc, includelet_childresources, create_form_with_form_instance
  • is_folder_page (scripted, public)

     <instance of xowiki::Page[i]> is_folder_page \
        [ -include_folder_links include_folder_links ]

    Check, if page is a folder. This function is typically overlaaded by specializations. Plain xowiki::Pages are never folders.

    Switches:
    -include_folder_links (optional, defaults to "true")
    return true, if the current page is a link to a folder.
    Returns:
    boolean

    Testcases:
    xowiki_test_cases
  • pretty_link (scripted, public)

     <instance of xowiki::Page[i]> pretty_link [ -anchor anchor ] \
        [ -query query ] [ -absolute on|off ] [ -siteurl siteurl ] \
        [ -lang lang ] [ -download download ] [ -path_encode on|off ]

    This method is a convenience stub for Package->pretty_link and can be overloaded for different pages types. Note that it is necessary to initialize the package before this method can be used.

    Switches:
    -anchor (optional)
    anchor to be added to the link
    -query (optional)
    query parameters to be added literally to the resulting URL
    -absolute (optional, boolean, defaults to "false")
    make an absolute link (including protocol and host)
    -siteurl (optional)
    -lang (optional)
    use the specified 2 character language code (rather than computing the value)
    -download (optional, defaults to "false")
    create download link (without m=download)
    -path_encode (optional, boolean, defaults to "true")
    control encoding of the url path. Returns the URL path urlencoded, unless path_encode is set to false.
    Returns:
    the pretty_link for the current page
    See Also:

    Testcases:
    xowiki_test_cases, nested_self_references
  • render (scripted, public)

     <instance of xowiki::Page[i]> render \
        [ -update_references update_references ] [ -with_footer on|off ]

    Render a wiki page with some optional features, such as including a footer or updating references for this page.

    Switches:
    -update_references (optional, defaults to "unresolved")
    might be "all", "unresolved" or "never"
    -with_footer (optional, boolean, defaults to "true")
    boolean value
    Returns:
    rendered HTML content.

    Testcases:
    xowiki_test_cases, link_tests
  • resolve_included_page_name (scripted, public)

     <instance of xowiki::Page[i]> resolve_included_page_name page_name

    Determine the page object for the specified page name. The specified page name might have the form //some_other_instance/page_name, in which case the page is resolved from some other package instance. If the page_name does not contain a language prefix, the language prefix of the including page is used.

    Parameters:
    page_name (required)

    Testcases:
    No testcase defined.
  • save_new (scripted)

     <instance of xowiki::Page[i]> save_new

    Testcases:
    nested_self_references, xowiki
  • substitute_markup (scripted)

     <instance of xowiki::Page[i]> substitute_markup

    Testcases:
    nested_self_references, xowiki
  • www-autosave-attribute (scripted, public)

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

    The web-callable method which is a simplified version of save-attributes, but which does NOT perform input validation, which might be a problem in case of partial input.

    Testcases:
    No testcase defined.
  • www-bulk-delete (scripted, 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. By passing the "instantiate_p" one can decide whether each item should be instantiated (useful when the delete logic from the whole item ancestry is required), or if we will rely on the cheaper deletion at the package level. The default is false.

    Testcases:
    No testcase defined.
  • www-clipboard-add (scripted, 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 adding elements to the clipboard, redirect either to the return_url of the calling page.

    Testcases:
    No testcase defined.
  • www-clipboard-clear (scripted, 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.

    Testcases:
    No testcase defined.
  • www-clipboard-content (scripted, 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.

    Testcases:
    No testcase defined.
  • www-clipboard-copy (scripted, public)

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

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

    Testcases:
    No testcase defined.
  • www-clipboard-export (scripted, 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.

    Testcases:
    No testcase defined.
  • www-create-new (scripted, 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 (optional, defaults to "0")
    -view_method (optional, defaults to "edit")
    -name (optional)
    -nls_language (optional)
    -publish_status (optional)

    Testcases:
    create_test_items, create_composite_test_item, xowiki_test_cases, create_form_with_form_instance, create_form_with_numeric, form_validate, create_folder_and_configure
  • www-create-or-use (scripted, 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 (optional, defaults to "0")
    -view_method (optional, defaults to "edit")
    -name (optional)
    -nls_language (optional)

    Testcases:
    create_test_items
  • www-csv-dump (scripted, public)

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

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

    Testcases:
    No testcase defined.
  • www-delete (scripted, public)

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

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

    Switches:
    -return_url (optional)

    Testcases:
    xowiki_test_cases
  • www-delete-revision (scripted, 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.

    Testcases:
    No testcase defined.
  • www-diff (scripted, 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 fancy diff raises an exception.

    Testcases:
    No testcase defined.
  • www-duplicate (scripted, public)

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

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

    Testcases:
    No testcase defined.
  • www-edit (scripted, 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 (optional, boolean, defaults to "false")
    is this an edit-new operation?
    -autoname (optional, boolean, defaults to "false")
    value to be passed to getFormClass
    -validation_errors (optional)
    ignored in this class, but used for compatibility with FormPage.www-edit

    Testcases:
    xowiki_test_cases, create_form_with_form_instance, create_form_with_numeric, form_validate
  • www-list (scripted, 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.

    Testcases:
    No testcase defined.
  • www-make-live-revision (scripted, 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, or when this is not available, the parameter "local_return_url".

    Testcases:
    No testcase defined.
  • www-popular-tags (scripted, public)

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

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

    Testcases:
    No testcase defined.
  • www-revisions (scripted, 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.

    Testcases:
    xowiki_test_cases
  • www-save-attributes (scripted, 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.

    Testcases:
    No testcase defined.
  • www-save-tags (scripted, public)

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

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

    Testcases:
    No testcase defined.
  • www-toggle-publish-status (scripted, public)

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

    This web-callable method toggles from "production" to "ready", and from "ready" or "archived" to "production". The return_url can be passed in for cases, where some proc calls internally this function, since update_publish_status might have to initialize some related objects, which might modify the return_url as well (e.g., workflows with specialized return_url handling).

    Switches:
    -return_url (optional)

    Testcases:
    No testcase defined.
  • www-validate-attribute (scripted, public)

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

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

    Testcases:
    No testcase defined.
  • www-view (scripted, 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 as web API call, when the xowiki page is viewed. It is not intended for e.g. embedded wiki pages (use includes), since it contains full framing, etc. In most cases, the argument "content" is not provided, and it is computed via the "render" method of the current object. It is as well possible to reuse the rendering logic of the method for other pages, where some HTML content is already computed, but it should be viewed exactly as in the page viewing cases.

    Parameters:
    content (optional)

    Testcases:
    xowiki_test_cases