webmcp
diff framework/env/param/exchange.lua @ 0:9fdfb27f8e67
Version 1.0.0
author | jbe/bsw |
---|---|
date | Sun Oct 25 12:00:00 2009 +0100 (2009-10-25) |
parents | |
children |
line diff
1.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 1.2 +++ b/framework/env/param/exchange.lua Sun Oct 25 12:00:00 2009 +0100 1.3 @@ -0,0 +1,14 @@ 1.4 +--[[-- 1.5 +param.exchange( 1.6 + id, 1.7 + params 1.8 +) 1.9 + 1.10 +This function exchanges the id and/or parameters which are returned by param.get_id(...), param.get(...), etc. It should not be called explicitly, but is used implicitly, if you pass an 'id' or 'params' option to execute.view{...} or execute.action{...}. The function param.restore() is used to revert the exchange. 1.11 + 1.12 +--]]-- 1.13 + 1.14 +function param.exchange(id, params) 1.15 + table.insert(param._saved, param._exchanged) 1.16 + param._exchanged = { id = id, params = params } 1.17 +end