On Wednesday, July 30, 2014 4:59:41 AM UTC-4, Manuele wrote:
>
> Il 30/07/14 09:30, ceriox ha scritto: 
> > thanks Javier! 
> > but can you explain "must be a function"? 
> > i use this code in other functions (for other tables) and it work fine! 
> > how i need to change it? 
> Dear ceriox, 
> I think here lie the problem: 
> https://github.com/web2py/web2py/blob/master/gluon/sqlhtml.py#L2602-L2605 
>
> look your self, if selectable is not callable its value is passed to 
> enumerate function... 
>
> you can use selectable=lambda _: True instead 
>

You can do the above, but it will make the selection functionality useless 
(unless you are intercepting the submitted request.vars elsewhere 
manually). The "selectable" argument should be a function that takes the 
list of records selected and then does something with them (e.g., delete 
them). It can also be a list of lists if you want to allow more than one 
possible function to be applied to the list of records (in that case, each 
list should include a button label, a callback function, and a button 
class).

Anthony

 

> hope it could help 
> Cheers 
>
>     Manuele 
>

-- 
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 web2py+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to