webmcp

annotate framework/env/execute/multi_wrapped.lua @ 11:d76a8857ba62

Added ui.partial and other functions, which allow partial content replacement using XMLHttpRequests; Image support for ui.link

Also includes following changes:
- Fix for rocketcgi library to accept POST data content-types, which contain additional charset information.
- Support arrays passed as params to encode.url (only for keys ending with "[]")
- Version information changed to "1.0.7"

Documentation for added functions is not yet complete.
author jbe/bsw
date Fri Feb 12 18:40:22 2010 +0100 (2010-02-12)
parents 9fdfb27f8e67
children
rev   line source
jbe/bsw@0 1 --[[--
jbe/bsw@0 2 execute.multi_wrapped(
jbe/bsw@0 3 wrapper_funcs, -- multiple wrapper functions (i.e. filters)
jbe/bsw@0 4 inner_func -- inner function (i.e. an action or view)
jbe/bsw@0 5 )
jbe/bsw@0 6
jbe/bsw@0 7 This function does the same as execute.wrapped(...), but with multiple wrapper functions, instead of just one wrapper function. It is used by execute.filtered_view{...} and execute.filtered_action{...} to wrap multiple filters around the view or action.
jbe/bsw@0 8
jbe/bsw@0 9 --]]--
jbe/bsw@0 10
jbe/bsw@0 11 function execute.multi_wrapped(wrapper_funcs, inner_func)
jbe/bsw@0 12 local function wrapped_execution(pos)
jbe/bsw@0 13 local wrapper_func = wrapper_funcs[pos]
jbe/bsw@0 14 if wrapper_func then
jbe/bsw@0 15 return execute.wrapped(
jbe/bsw@0 16 wrapper_func,
jbe/bsw@0 17 function()
jbe/bsw@0 18 wrapped_execution(pos+1)
jbe/bsw@0 19 end
jbe/bsw@0 20 )
jbe/bsw@0 21 else
jbe/bsw@0 22 return inner_func()
jbe/bsw@0 23 end
jbe/bsw@0 24 end
jbe/bsw@0 25 return wrapped_execution(1)
jbe/bsw@0 26 end

Impressum / About Us