[luci] Problem with the Button class

Mervyn McMurray mervyn_mcmurray at hotmail.com
Tue Oct 27 13:57:29 CET 2009


Hi,

I have tried to use the Button class but cannot get the test.write method to be called
when I press the button on the webpage.

(I see syslog output for cbid & cfgvalue functions but not write function)

1.Does anyone know what I am missing?

2. Is there useful documentation for this method somewhere?

3. Assuming it is possible to get the test.write method to work what is the best way of displaying 
a new page with traceroute data on it.

Thanks,

Mervyn


code segment..

local test =s:option(Button, "_test", "testing")
test.inputstyle = "find"

function test.write(self, section, value)
       luci.sys.exec("logger write")
end
function test.cbid(self, section)
        luci.sys.exec("logger cbid")
        return AbstractValue.cbid(self, section)
end
function test.cfgvalue(self, section)
        luci.sys.exec("logger cfgvalue")
        return "test"
end


 		 	   		  
_________________________________________________________________
New Windows 7: Find the right PC for you. Learn more.
http://www.microsoft.com/uk/windows/buy/
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.subsignal.org/pipermail/luci/attachments/20091027/b1941aff/attachment.htm 


More information about the luci mailing list