hello,
I'm trying to call a service from menu buttons,
and I read somewhere in the manual, you should always use URL()
Now this works:
LSB_Menu.append ( [ 'Stef3',"call/run/Set_Page/77" ])
But the following don't (while printing the URL result, looks ok), why ??
#LSB_Menu.append ( [ 'Stef4',URL("call", "run", "Set_Page", args="77" ) ])
#LSB_Menu.append ( [ 'Stef5',URL("call", "run", "Set_Page", vars="77" ) ])
#LSB_Menu.append ( [ 'Stef5',URL("call", "run", "Set_Page", "77" )])
# this is the service
from gluon.tools import Service
service = Service(globals())
def call():
return service()
@service.run
def Set_Page(Nr):
return dict ( m='aap',b=99,c=Nr)
thanks,
Stef Mientki