webmcp

view framework/env/execute/filtered_action.lua @ 402:04172238d79b

Do not require "engine" field to be set for mondelefant.connect{...}; Fixed bugs in mondelefant.connect{...} that could have crashed Lua; Shortened Lua registry key for mondelefant library
author jbe
date Wed Jan 06 02:39:50 2016 +0100 (2016-01-06)
parents eb3e236d261d
children
line source
1 --[[--
2 action_status = -- status code returned by the action (a string)
3 execute.filtered_action{
4 module = module, -- module name of the action to be executed
5 action = action, -- name of the action 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 }
10 Executes an action with associated filters.
12 --]]--
14 function execute.filtered_action(args)
15 local result
16 execute.multi_wrapped(
17 execute._create_sorted_execution_list(
18 function(add_by_path)
19 add_by_path("_filter")
20 add_by_path("_filter_action")
21 add_by_path(WEBMCP_APP_NAME, "_filter")
22 add_by_path(WEBMCP_APP_NAME, "_filter_action")
23 add_by_path(WEBMCP_APP_NAME, args.module, "_filter")
24 add_by_path(WEBMCP_APP_NAME, args.module, "_filter_action")
25 end,
26 function(full_path, relative_path)
27 trace.enter_filter{ path = relative_path }
28 execute.file_path{ file_path = full_path }
29 trace.execution_return()
30 end
31 ),
32 function()
33 result = execute.action(args)
34 end
35 )
36 return result
37 end

Impressum / About Us