Class ::xowiki::FormPage

::xowiki::FormPage[i] create ...

Class Relations

  • class: ::xo::db::CrClass[i]
  • superclass: ::xowiki::PageInstance[i]

Methods (to be applied on the object)

  • compute_filter_clauses (scripted, public)

     xowiki::FormPage[i] compute_filter_clauses [ -unless unless ] \
        [ -where where ]

    Compute from "-unless" or "-where" specs the "tcl", "sql" and optional "hstore" query fragments.

    Switches:
    -unless
    (optional)
    -where
    (optional)
    Returns:
    dict containing "init_vars", "uc" (unless clauses) and "wc" (where clauses)

    Partial Call Graph (max 5 caller/called nodes):
    %3 test_create_composite_test_item create_composite_test_item (test xowf) xowiki::FormPage proc compute_filter_clauses xowiki::FormPage proc compute_filter_clauses test_create_composite_test_item->xowiki::FormPage proc compute_filter_clauses

    Testcases:
    create_composite_test_item
  • fetch_object (scripted, public)

     xowiki::FormPage[i] fetch_object -item_id item_id  \
        [ -revision_id revision_id ] -object object  \
        [ -initialize on|off ]

    Load a content item into the specified object. If revision_id is provided, the specified revision is returned, otherwise the live revision of the item_id. If the object does not exist, we create it.

    Switches:
    -item_id
    (required)
    -revision_id
    (defaults to "0") (optional)
    -object
    (required)
    -initialize
    (boolean) (defaults to "true") (optional)
    Returns:
    cr item object

    Partial Call Graph (max 5 caller/called nodes):
    %3 test_link_tests link_tests (test xowiki) xowiki::FormPage proc fetch_object xowiki::FormPage proc fetch_object test_link_tests->xowiki::FormPage proc fetch_object test_path_resolve path_resolve (test xowiki) test_path_resolve->xowiki::FormPage proc fetch_object test_xowiki_test_cases xowiki_test_cases (test xowiki) test_xowiki_test_cases->xowiki::FormPage proc fetch_object db_exec db_exec (public) xowiki::FormPage proc fetch_object->db_exec db_with_handle db_with_handle (public) xowiki::FormPage proc fetch_object->db_with_handle

    Testcases:
    xowiki_test_cases, link_tests, path_resolve
  • filter_expression (scripted)

     xowiki::FormPage[i] filter_expression

    Partial Call Graph (max 5 caller/called nodes):
    %3 test_xowiki xowiki (test ) xowiki::FormPage proc filter_expression xowiki::FormPage proc filter_expression test_xowiki->xowiki::FormPage proc filter_expression test_xowiki_test_cases xowiki_test_cases (test ) test_xowiki_test_cases->xowiki::FormPage proc filter_expression xowiki::hstore::double_quote xowiki::hstore::double_quote (public) xowiki::FormPage proc filter_expression->xowiki::hstore::double_quote

    Testcases:
    xowiki_test_cases, xowiki
  • get_all_children (scripted)

     xowiki::FormPage[i] get_all_children

    Partial Call Graph (max 5 caller/called nodes):
    %3 test_includelet_childresources includelet_childresources (test ) xowiki::FormPage proc get_all_children xowiki::FormPage proc get_all_children test_includelet_childresources->xowiki::FormPage proc get_all_children test_xowiki xowiki (test ) test_xowiki->xowiki::FormPage proc get_all_children ad_log ad_log (public) xowiki::FormPage proc get_all_children->ad_log

    Testcases:
    includelet_childresources, xowiki

Methods (to be applied on instances)

  • combine_data_and_form_field_default (scripted, 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 test_create_form_with_form_instance create_form_with_form_instance (test xowiki) xowiki::FormPage instproc combine_data_and_form_field_default xowiki::FormPage instproc combine_data_and_form_field_default test_create_form_with_form_instance->xowiki::FormPage instproc combine_data_and_form_field_default

    Testcases:
    create_form_with_form_instance
  • extra_html_fields (scripted, public)

     <instance of xowiki::FormPage[i]> extra_html_fields

    Should be overloaded to provide extra content to some forms. This method can be used to add additional (e.g. hidden) HTML input fields to form pages. Example: ::html::input -type hidden -name __object_name -value [::security::parameter::signed ${:name}]

    Partial Call Graph (max 5 caller/called nodes):
    %3 test_create_test_items create_test_items (test xowf) xowiki::FormPage instproc extra_html_fields xowiki::FormPage instproc extra_html_fields test_create_test_items->xowiki::FormPage instproc extra_html_fields

    Testcases:
    create_test_items
  • get_property (scripted, public)

     <instance of xowiki::FormPage[i]> get_property [ -source source ] \
        -name name  [ -default default ]

    Retrieves a FormPage property

    Switches:
    -source
    (optional)
    page name to be resolved and used instead this FormPage to fetch the property
    -name
    (required)
    -default
    (optional)

    Partial Call Graph (max 5 caller/called nodes):
    %3 test_create_test_items create_test_items (test xowf) xowiki::FormPage instproc get_property xowiki::FormPage instproc get_property test_create_test_items->xowiki::FormPage instproc get_property

    Testcases:
    create_test_items
  • is_folder_page (scripted, public)

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

    Check, if FormPage is a folder. A FormPage is a folder when its page template is the folder.form or if this is a link pointing to a folder.

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

    Partial Call Graph (max 5 caller/called nodes):
    %3 test_xowiki_test_cases xowiki_test_cases (test xowiki) xowiki::FormPage instproc is_folder_page xowiki::FormPage instproc is_folder_page test_xowiki_test_cases->xowiki::FormPage instproc is_folder_page

    Testcases:
    xowiki_test_cases
  • load_values_into_form_fields (scripted, public)

     <instance of xowiki::FormPage[i]> load_values_into_form_fields \
        form_fields

    Load either the instance variables or the instance attributes into the provided form-fields. The function sets the values based on the default values and the values for the current object.

    Parameters:
    form_fields

    Partial Call Graph (max 5 caller/called nodes):
    %3 test_create_form_with_form_instance create_form_with_form_instance (test xowiki) xowiki::FormPage instproc load_values_into_form_fields xowiki::FormPage instproc load_values_into_form_fields test_create_form_with_form_instance->xowiki::FormPage instproc load_values_into_form_fields test_create_form_with_numeric create_form_with_numeric (test xowiki) test_create_form_with_numeric->xowiki::FormPage instproc load_values_into_form_fields _ _ (public) xowiki::FormPage instproc load_values_into_form_fields->_

    Testcases:
    create_form_with_form_instance, create_form_with_numeric
  • property (scripted, public)

     <instance of xowiki::FormPage[i]> property name [ default ]

    Retrieve a FormPage property.

    Parameters:
    name - property name. Names starting with _ refer to object's members, rather than instance attributes.
    default (optional) - fallback value when property is not set.

    Partial Call Graph (max 5 caller/called nodes):
    %3 test_xowiki_test_cases xowiki_test_cases (test xowiki) xowiki::FormPage instproc property xowiki::FormPage instproc property test_xowiki_test_cases->xowiki::FormPage instproc property

    Testcases:
    xowiki_test_cases
  • render_thumbnails (scripted, public)

     <instance of xowiki::FormPage[i]> render_thumbnails upload_info

    Renderer of the thumnail file(s). This method is a stub to be refined (e.g. in xowf).

    Parameters:
    upload_info - dict containing the "file_object" and "file_name"
    Returns:
    HTML content

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

    Testcases:
    No testcase defined.
  • set_form_data (scripted, public)

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

    Store the instance attributes or default values into the form via set_form_value. This function iterates over the provided form-fields and checks, if these are known fields in the current form. These known field names are defined via the method "field_names" that extracts these names from a form. If one wants to load all values from an FormPage into the provided form-fields, use method "load_values_into_form_fields" instead.

    Parameters:
    form_fields

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

    Testcases:
    create_form_with_form_instance
  • set_live_revision (scripted, public)

     <instance of xowiki::FormPage[i]> set_live_revision \
        -revision_id revision_id  [ -publish_status publish_status ]
    Switches:
    -revision_id
    (required)
    -publish_status
    (defaults to "ready") (optional)
    one of 'live', 'ready' or 'production'

    Partial Call Graph (max 5 caller/called nodes):
    %3 test_create_folder_with_page create_folder_with_page (test xowf) xowiki::FormPage instproc set_live_revision xowiki::FormPage instproc set_live_revision test_create_folder_with_page->xowiki::FormPage instproc set_live_revision test_create_workflow_with_instance create_workflow_with_instance (test xowf) test_create_workflow_with_instance->xowiki::FormPage instproc set_live_revision xowiki::update_item_index xowiki::update_item_index (public) xowiki::FormPage instproc set_live_revision->xowiki::update_item_index

    Testcases:
    create_folder_with_page, create_workflow_with_instance
  • set_property (scripted, public)

     <instance of xowiki::FormPage[i]> set_property [ -new new ] name \
        value

    Stores a value as FormPage property

    Switches:
    -new
    (defaults to "0") (optional)
    boolean flag telling if the property is new. Setting a value on a non-existing property without specifying this flag will result in an error.
    Parameters:
    name - property name. Names starting with _ indicate an object variable rather than a property stored in instance_attributes
    value - property value
    Returns:
    value (eventually converted to a has-notation message key)

    Partial Call Graph (max 5 caller/called nodes):
    %3 test_create_form_with_form_instance create_form_with_form_instance (test xowiki) xowiki::FormPage instproc set_property xowiki::FormPage instproc set_property test_create_form_with_form_instance->xowiki::FormPage instproc set_property

    Testcases:
    create_form_with_form_instance
  • update_attribute_from_slot (scripted, public)

     <instance of xowiki::FormPage[i]> update_attribute_from_slot \
        [ -revision_id revision_id ] slot value

    Tailored version of update_attribute_from_slot to keep insert_xowiki_form_instance_item_index in sync after single attribute updates.

    Switches:
    -revision_id
    (optional)
    Parameters:
    slot
    value

    Partial Call Graph (max 5 caller/called nodes):
    %3 test_slot_interactions slot_interactions (test xowiki) xowiki::FormPage instproc update_attribute_from_slot xowiki::FormPage instproc update_attribute_from_slot test_slot_interactions->xowiki::FormPage instproc update_attribute_from_slot xowiki::update_item_index xowiki::update_item_index (public) xowiki::FormPage instproc update_attribute_from_slot->xowiki::update_item_index

    Testcases:
    slot_interactions
  • update_item_index (scripted, public)

     <instance of xowiki::FormPage[i]> update_item_index

    Tailored version of CrItem.update_item_index to keep insert_xowiki_form_instance_item_index in sync after updates.

    Partial Call Graph (max 5 caller/called nodes):
    %3 test_link_tests link_tests (test xowiki) xowiki::FormPage instproc update_item_index xowiki::FormPage instproc update_item_index test_link_tests->xowiki::FormPage instproc update_item_index xowiki::hstore::dict_as_hkey xowiki::hstore::dict_as_hkey (public) xowiki::FormPage instproc update_item_index->xowiki::hstore::dict_as_hkey

    Testcases:
    link_tests
  • www-edit (scripted, public)

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

    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
    (boolean) (defaults to "true") (optional)

    Partial Call Graph (max 5 caller/called nodes):
    %3 test_create_workflow_with_instance create_workflow_with_instance (test xowf) xowiki::FormPage instproc www-edit xowiki::FormPage instproc www-edit test_create_workflow_with_instance->xowiki::FormPage instproc www-edit ad_log ad_log (public) xowiki::FormPage instproc www-edit->ad_log ad_urlencode_url ad_urlencode_url (public) xowiki::FormPage instproc www-edit->ad_urlencode_url dom dom xowiki::FormPage instproc www-edit->dom export_vars export_vars (public) xowiki::FormPage instproc www-edit->export_vars html::CSRFToken html::CSRFToken xowiki::FormPage instproc www-edit->html::CSRFToken

    Testcases:
    create_workflow_with_instance
  • www-file-upload (scripted, 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 ad_script_abort ad_script_abort (public) security::csrf::validate security::csrf::validate (public) xowiki::FormPage instproc www-file-upload xowiki::FormPage instproc www-file-upload xowiki::FormPage instproc www-file-upload->ad_script_abort xowiki::FormPage instproc www-file-upload->security::csrf::validate

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