function Node._run_hook(self, hook)
if type(self[hook]) == "function" then
return self[hook](self)
function Node._run_hook(self, hook)
if type(self[hook]) == "function" then
return self[hook](self)
function Map.render(self, ...)
self:_run_hooks("on_init")
Node.render(self, ...)
function Map.render(self, ...)
self:_run_hooks("on_init")
Node.render(self, ...)
if not Map.formvalue(self, "cbi.delg.current") then
self:_run_hooks("on_init")
end
if not Map.formvalue(self, "cbi.delg.current") then
self:_run_hooks("on_init")
end
self.current = self.current or self:get_active()
self.active = self.active or self:get(self.current)
assert(self.active, "Invalid state")
self.current = self.current or self:get_active()
self.active = self.active or self:get(self.current)
assert(self.active, "Invalid state")
table.insert(self.section.error[section], "invalid")
else
self.section.error = {[section] = {"invalid"}}
table.insert(self.section.error[section], "invalid")
else
self.section.error = {[section] = {"invalid"}}