webmcp

view framework/env/ui/partial.lua @ 14:a29c8ffb3f82

New function ui.filters{...}

Also changed version information to "1.0.8"
author jbe/bsw
date Sat Feb 20 21:00:58 2010 +0100 (2010-02-20)
parents f3d3203cd2e4
children
line source
1 --[[--
2 ui.partial{
3 module = module, -- module to be used to reload inner contents
4 view = view, -- view to be used to reload inner contents
5 id = id, -- id to be used to reload inner contents
6 params = params, -- params to be used to reload inner contents
7 target = target, -- id of HTML element containing contents to be replaced
8 content = function()
9 ...
10 end
11 }
13 Calling this function declares that the inner contents can be requested
14 directly via the given module, view, id and params. The parameter "target"
15 specifies the id of the HTML element, which should be replaced when
16 reloading partially.
18 The function has an effect on inner calls of ui.link{..., partial = {...}}
19 and ui.form{..., partial = {...}}.
21 --]]--
23 function ui.partial(args)
24 local old_state = ui._partial_state
25 ui._partial_state = table.new(args)
26 ui._partial_state.param_name_hash = {}
27 if args.param_names then
28 ui.add_partial_param_names(args.param_names)
29 end
30 args.content()
31 ui._partial_state = old_state
32 end

Impressum / About Us