Base solution for your next web application
Open Closed

jtable listaction #1221


User avatar
0
julianrobertshawe created

Hi there, I am trying to pass a value to the function on the listAction of a jtable

I have tested the function inside firefox console but when loading the table I get the following error TypeError: originalListAction.method is not a function This is the code actions: { listAction: { method: _customerService.getProducts(4) } },

thanks Julian


1 Answer(s)
  • User Avatar
    0
    ismcagdas created
    Support Team

    Hi,

    JTable is waiting for a method but you are executing the method in your case, Change your jtable method definition like this

    listAction: {
    method: _customerService.getProducts
    }
    

    and send parameter when you load the jtable like this

    jtable('load', {id: 4});
    

    Change your application service method's input as well,

    GetProducts(IdInput input)
    

    I hope it helps.