jbe/bsw@11: --[[-- jbe/bsw@11: ui.partial{ jbe@12: module = module, -- module to be used to reload inner contents jbe@12: view = view, -- view to be used to reload inner contents jbe@12: id = id, -- id to be used to reload inner contents jbe@12: params = params, -- params to be used to reload inner contents jbe@12: target = target, -- id of HTML element containing contents to be replaced jbe/bsw@11: content = function() jbe@12: ... jbe/bsw@11: end jbe/bsw@11: } jbe/bsw@11: jbe@12: Calling this function declares that the inner contents can be requested jbe@12: directly via the given module, view, id and params. The parameter "target" jbe@12: specifies the id of the HTML element, which should be replaced when jbe@12: reloading partially. jbe@12: jbe@12: The function has an effect on inner calls of ui.link{..., partial = {...}} jbe@12: and ui.form{..., partial = {...}}. jbe/bsw@11: jbe/bsw@11: --]]-- jbe/bsw@11: jbe/bsw@11: function ui.partial(args) jbe/bsw@11: local old_state = ui._partial_state jbe/bsw@11: ui._partial_state = table.new(args) jbe/bsw@11: ui._partial_state.param_name_hash = {} jbe/bsw@11: if args.param_names then jbe/bsw@11: ui.add_partial_param_names(args.param_names) jbe/bsw@11: end jbe/bsw@11: args.content() jbe/bsw@11: ui._partial_state = old_state jbe/bsw@11: end