Hello, I have a component which has an SQLFORM.grid and an oncreate and
ondelete callbacks on which I execute a response.js. When I delete a record
the response.js javascript function is executed but when I create a record
the response.js javascript function does not get executed (but the python's
oncreate function gets executed)
This is my controller code:
def oncreate_empleado(form):
# This method executes but the response_gestor_empleados javascript
function is not executed
response.js = 'response_gestor_empleados(%i);' % form.vars.id
def ondelete_empleado(table, id):
# Here the response_gestor_empleados javascript function gets executed
response.js = 'response_gestor_empleados(5);'
def index():
grid_empleados = SQLFORM.grid(db.empleado,
orderby=[db.empleado.apellidos,
db.empleado.nombres],
links=[dict(header='',
body=lambda registro:
crear_boton_seleccionar_empleado(registro))],
details=False,
csv=False,
formname='grid_empleados',
oncreate=oncreate_empleado,
ondelete=ondelete_empleado)
return dict(grid_empleados=grid_empleados)
Is this a bug or am I doing something wrong? Thank you!
--
Resources:
- http://web2py.com
- http://web2py.com/book (Documentation)
- http://github.com/web2py/web2py (Source code)
- https://code.google.com/p/web2py/issues/list (Report Issues)
---
You received this message because you are subscribed to the Google Groups
"web2py-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
For more options, visit https://groups.google.com/d/optout.