+ maps = luci.cbi.load(model, ...)
+
+ local state = nil
+
+ for i, res in ipairs(maps) do
+ if config.autoapply then
+ res.autoapply = config.autoapply
+ end
+ local cstate = res:parse()
+ if not state or cstate < state then
+ state = cstate
+ end
+ end
+
+ if config.state_handler then
+ if not config.state_handler(state, maps) then
+ return
+ end
+ end
+
+ local pageaction = true
+ http.header("X-CBI-State", state or 0)
+ luci.template.render("cbi/header", {state = state})
+ for i, res in ipairs(maps) do
+ res:render()
+ if res.pageaction == false then
+ pageaction = false
+ end