[luci] DummyValue class not available as part of CBI taboption ?

Ken Bantoft kbantoft at satcomdirect.com
Tue Aug 5 19:07:04 CEST 2014


I've got a ListValue as part of a taboption that I'd like to make
read-only.  We have the DummyValue class available for s:option()
sections, but it doesn't seem to work on taboption() sections.

Original code:

myoption = s:taboption("general", ListValue, "myoption", translate("My
Option"))


Tried to use:

myoption = s:taboption("general", DummyValue, "myoption", translate("My
Option"))

This kicks back with a


/usr/lib/lua/luci/dispatches.lua:448: Failed to execute arcombine
dispatcher target for entry "/admin/network/config/somesection'..
The called action terminated with an exception:
/usr/lib/lua/luci/model/cbi/admin_network/config.lua:199: attempt to call
method 'value' (a nil value)


Is there a way to make DummyValue work work taboption() or an alliterative
way to make the field read-only?

Thanks, 

Ken




More information about the luci mailing list