webmcp

view framework/env/execute/view.lua @ 466:2751b6b81c23

Minor efficiency enhancement in <db_object>:try_save() method
author jbe
date Mon Nov 07 19:32:51 2016 +0100 (2016-11-07)
parents f28b3c671378
children
line source
1 --[[--
2 view_exists = -- boolean returned if "test_existence" is set to true, otherwise no value returned
3 execute.view{
4 module = module, -- module name of the view to be executed
5 view = view, -- name of the view to be executed
6 id = id, -- id to be returned by param.get_id(...) during execution
7 params = params, -- parameters to be returned by param.get(...) during execution
8 test_existence = test_existence -- do not execute view but only check if it exists
9 }
11 Executes a view directly (without associated filters).
13 --]]--
15 function execute.view(args)
16 local module = args.module
17 local view = args.view
18 local test = args.test_existence
19 if not test then
20 trace.enter_view{ module = module, view = view }
21 end
22 local result = execute.file_path{
23 file_path = encode.file_path(
24 WEBMCP_BASE_PATH, 'app', WEBMCP_APP_NAME, module, view .. '.lua'
25 ),
26 id = args.id,
27 params = args.params,
28 test_existence = test
29 }
30 if not test then
31 trace.execution_return()
32 end
33 if test then
34 return result
35 end
36 end

Impressum / About Us