jbe/bsw@0: --[[-- jbe@353: view_exists = -- boolean returned if "test_existence" is set to true, otherwise no value returned jbe/bsw@0: execute.view{ jbe@353: module = module, -- module name of the view to be executed jbe@353: view = view, -- name of the view to be executed jbe@353: id = id, -- id to be returned by param.get_id(...) during execution jbe@353: params = params, -- parameters to be returned by param.get(...) during execution jbe@352: test_existence = test_existence -- do not execute view but only check if it exists jbe/bsw@0: } jbe/bsw@0: jbe/bsw@0: Executes a view directly (without associated filters). jbe/bsw@0: jbe/bsw@0: --]]-- jbe/bsw@0: jbe/bsw@0: function execute.view(args) jbe/bsw@0: local module = args.module jbe@352: local view = args.view jbe@352: local test = args.test_existence jbe@352: if not test then jbe@352: trace.enter_view{ module = module, view = view } jbe@352: end jbe@352: local result = execute.file_path{ jbe/bsw@0: file_path = encode.file_path( jbe@209: WEBMCP_BASE_PATH, 'app', WEBMCP_APP_NAME, module, view .. '.lua' jbe/bsw@0: ), jbe/bsw@0: id = args.id, jbe@352: params = args.params, jbe@352: test_existence = test jbe/bsw@0: } jbe@352: if not test then jbe@352: trace.execution_return() jbe@352: end jbe@352: if test then jbe@352: return result jbe@352: end jbe/bsw@0: end