- Methods: All Methods Documented Methods Hide Methods
- Source: Display Source Hide Source
- Variables: Show Variables Hide Variables
Class ::xowiki::FormPage
::xowiki::FormPage create ...
Defined in
Class Relations
Methods (to be applied on the object)
compute_filter_clauses (scripted, public)
xowiki::FormPage 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)
- Testcases:
- create_composite_test_item
fetch_object (scripted, public)
xowiki::FormPage 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 (optional, defaults to
"0"
)- -object (required)
- -initialize (optional, boolean, defaults to
"true"
)- Returns:
- cr item object
- Testcases:
- xowiki_test_cases, link_tests, path_resolve
filter_expression (scripted)
xowiki::FormPage filter_expression
- Testcases:
- xowiki_test_cases, xowiki
get_all_children (scripted)
xowiki::FormPage get_all_children
- Testcases:
- includelet_childresources, xowiki
Methods (to be applied on instances)
combine_data_and_form_field_default (scripted, public)
<instance of xowiki::FormPage> combine_data_and_form_field_default \ is_new form_field data_valueCombine 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 (required)
- is this a new entry?
- form_field (required)
- object id of the form field
- data_value (required)
- the data from the instance attributes.
- Testcases:
- create_form_with_form_instance
extra_html_fields (scripted, public)
<instance of xowiki::FormPage> extra_html_fieldsShould 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}]
- Testcases:
- create_test_items
get_property (scripted, public)
<instance of xowiki::FormPage> 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)
- Testcases:
- create_test_items
is_folder_page (scripted, public)
<instance of xowiki::FormPage> 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 (optional, defaults to
"true"
)- return true, if the current page is a link to a folder.
- Returns:
- boolean
- Testcases:
- xowiki_test_cases
load_values_into_form_fields (scripted, public)
<instance of xowiki::FormPage> load_values_into_form_fields \ form_fieldsLoad 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 (required)
- Testcases:
- create_form_with_form_instance, create_form_with_numeric
property (scripted, public)
<instance of xowiki::FormPage> property name [ default ]Retrieve a FormPage property.
- Parameters:
- name (required)
- property name. Names starting with _ refer to object's members, rather than instance attributes.
- default (optional)
- fallback value when property is not set.
- Testcases:
- xowiki_test_cases
render_thumbnails (scripted, public)
<instance of xowiki::FormPage> render_thumbnails upload_infoRenderer of the thumbnail file(s). This method is a stub to be refined (e.g. in xowf).
- Parameters:
- upload_info (required)
- dict containing the "file_object" and "file_name"
- Returns:
- HTML content
- Testcases:
- No testcase defined.
set_form_data (scripted, public)
<instance of xowiki::FormPage> set_form_data form_fieldsStore 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 (required)
- Testcases:
- create_form_with_form_instance
set_live_revision (scripted, public)
<instance of xowiki::FormPage> set_live_revision \ -revision_id revision_id [ -publish_status publish_status ]
- Switches:
- -revision_id (required)
- -publish_status (optional, defaults to
"ready"
)- one of 'live', 'ready' or 'production'
- Testcases:
- create_folder_with_page, create_workflow_with_instance
set_property (scripted, public)
<instance of xowiki::FormPage> set_property [ -new new ] name \ valueStores a value as FormPage property
- Switches:
- -new (optional, defaults to
"0"
)- 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 (required)
- property name. Names starting with _ indicate an object variable rather than a property stored in instance_attributes
- value (required)
- property value
- Returns:
- value (eventually converted to a has-notation message key)
- Testcases:
- create_form_with_form_instance
update_attribute_from_slot (scripted, public)
<instance of xowiki::FormPage> update_attribute_from_slot \ [ -revision_id revision_id ] slot valueTailored 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 (required, object)
- value (required)
- Testcases:
- slot_interactions
update_item_index (scripted, public)
<instance of xowiki::FormPage> update_item_indexTailored version of CrItem.update_item_index to keep insert_xowiki_form_instance_item_index in sync after updates.
- Testcases:
- link_tests
www-edit (scripted, public)
<instance of xowiki::FormPage> 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 (optional, defaults to
"0"
)- -view (optional, boolean, defaults to
"true"
)- Testcases:
- create_workflow_with_instance
www-file-upload (scripted, public)
<instance of xowiki::FormPage> www-file-uploadThis 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)
- Testcases:
- No testcase defined.
www-toggle-modebutton (scripted, public)
<instance of xowiki::FormPage> www-toggle-modebuttonAJAX 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"
- Testcases:
- No testcase defined.
Variables
::xowiki::FormPage set __default_metaclass ::xotcl::Class ::xowiki::FormPage set __default_superclass ::xotcl::Object ::xowiki::FormPage set abstract_p f ::xowiki::FormPage set auto_save false ::xowiki::FormPage array set db_constraints {state {{default {}} {default {}}} assignee \ {{references parties(party_id)} {references parties(party_id)}}} ::xowiki::FormPage array set db_slot \ {page_template ::xowiki::PageInstance::slot::page_template page_order \ ::xowiki::Page::slot::page_order creator ::xowiki::Page::slot::creator state \ ::xowiki::FormPage::slot::state page_id ::xowiki::Page::slot::page_id creation_date \ ::xo::db::Object::slot::creation_date instance_attributes \ ::xowiki::PageInstance::slot::instance_attributes creation_user \ ::xo::db::Object::slot::creation_user object_id ::xo::db::Object::slot::object_id description \ ::xowiki::Page::slot::description creation_ip ::xo::db::Object::slot::creation_ip text \ ::xowiki::Page::slot::text nls_language ::xo::db::CrItem::slot::nls_language object_title \ ::xo::db::Object::slot::object_title package_id ::xo::db::Object::slot::package_id \ security_inherit_p ::xo::db::Object::slot::security_inherit_p context_id \ ::xo::db::Object::slot::context_id mime_type ::xo::db::CrItem::slot::mime_type name \ ::xo::db::CrItem::slot::name title ::xowiki::Page::slot::title item_id \ ::xo::db::CrItem::slot::item_id revision_id ::xo::db::CrItem::slot::revision_id publish_date \ ::xowiki::Page::slot::publish_date modifying_user ::xo::db::Object::slot::modifying_user \ last_modified ::xo::db::Object::slot::last_modified page_instance_id \ ::xowiki::PageInstance::slot::page_instance_id xowiki_form_page_id \ ::xowiki::FormPage::slot::xowiki_form_page_id modifying_ip \ ::xo::db::Object::slot::modifying_ip assignee ::xowiki::FormPage::slot::assignee} ::xowiki::FormPage set folder_id -100 ::xowiki::FormPage set id_column xowiki_form_page_id ::xowiki::FormPage array set long_text_slots \ {instance_attributes ::xowiki::PageInstance::slot::instance_attributes} ::xowiki::FormPage set mime_type text/plain ::xowiki::FormPage set name_method {} ::xowiki::FormPage set non_cached_instance_var_patterns __* ::xowiki::FormPage set object_type ::xowiki::FormPage ::xowiki::FormPage set object_type_key 0000000000001111000110010000001000000000 ::xowiki::FormPage set pretty_name {#xowiki.FormPage_pretty_name#} ::xowiki::FormPage set pretty_plural {#xowiki.FormPage_pretty_plural#} ::xowiki::FormPage set security_inherit_p t ::xowiki::FormPage set sql_package_name ::xowiki::FormPage ::xowiki::FormPage set storage_type text ::xowiki::FormPage set supertype content_revision ::xowiki::FormPage set table_name xowiki_form_page ::xowiki::FormPage set with_table true
- Methods: All Methods Documented Methods Hide Methods
- Source: Display Source Hide Source
- Variables: Show Variables Hide Variables