Nice trick!!

Many thanks for that, I read read too fast your preceding post... I will
see what I can do with that, it should solve my issue...

Richard


On Fri, Feb 7, 2014 at 1:51 PM, Anthony <abasta...@gmail.com> wrote:

> So, is :
>>
>> widget=lambda field, value, row: ...
>>
>> Working out of the box in last web2py stable?
>>
>
> No, web2py will not pass a row to a widget -- it only passes a field and
> value. That's why I said to do:
>
> lambda field, value, row=row: ...
>
> In that case, you are specifying the "row" argument of the lambda with a
> default value (notice the "=row"), which of course you must define yourself
> in the preceding code (that's why I asked if you already had a row object).
> When web2py calls the widget, it will pass in the field and value, and the
> lambda function itself will then have access to the field, value, and row.
>
> Anthony
>
> --
> 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/groups/opt_out.
>

-- 
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/groups/opt_out.

Reply via email to