[luci] CBI: obtain values of an uncommitted map?
Luca Olivetti
luca at ventoso.org
Thu Jul 31 13:39:01 CEST 2014
I have a configuration file managed by various cbi models.
In one of the model, I need to use the values from other sections to
fill a select:
local uci = require "luci.model.uci"
local cursor = uci.cursor_state()
....
account=s:option(ListValue,"account",translate("Account"),translate("Select
the account to use"))
account:value("","")
account.datatype="minlength(1)"
account.optional=false
account.rmempty=false
cursor:foreach("svd","account", function (s)
account:value(s[".name"],s[".name"])
end)
The problem is that this way I don't see the values changed with the
"Save" button, only with the "Save and apply".
Is there a way to obtain the "current" values (saved but not committed?).
Bye
--
Luca
More information about the luci
mailing list