xowf::WorkflowPage instproc www-view (public)
<instance of xowf::WorkflowPage> www-view [ content ]
Defined in /var/www/openacs.org/packages/xowf/tcl/xowf-procs.tcl
Provide additional view modes: - edit: instead of viewing a page, it is opened in edit mode - view_user_input: show user the provided input - view_user_input_with_feedback: show user the provided input with feedback
- Parameters:
- content (optional)
- Testcases:
- create_test_items, create_workflow_with_instance
Source code: # The edit method calls view with an HTML content as argument. # To avoid a loop, when "view" is redirected to "edit", # we make sure that we only check the redirect on views # without content. #:msg "view [self args] [:is_wf_instance]" if {[:is_wf_instance] && $content eq ""} { set ctx [::xowf::Context require [self]] set method [$ctx get_view_method] set s [$ctx current_state] :include_header_info -css [$s extra_css] -js [$s extra_js] if {$method ne "" && $method ne "view"} { #:msg "view redirects to $method in state [$ctx get_current_state]" switch -- $method { view_user_input { #:msg "calling edit with disable_input_fields=1" return [:www-edit -disable_input_fields 1] } view_user_input_with_feedback { set :__feedback_mode 1 #:msg "calling edit with disable_input_fields=1" return [:www-edit -disable_input_fields 1] } default { #:msg "calling $method" return [::${:package_id} invoke -method $method] } } } } nextXQL Not present: Generic, PostgreSQL, Oracle