Re: [web2py] Acces to row object with widget (widget=lambda field, value, row: ...)

2014-02-07 Thread Richard Vézina
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 wrote: > So, is : >> >> widget=lambda field, value, row: ... >> >> Working out of the box in last web2

Re: [web2py] Acces to row object with widget (widget=lambda field, value, row: ...)

2014-02-07 Thread Anthony
> > 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" argume

Re: [web2py] Acces to row object with widget (widget=lambda field, value, row: ...)

2014-02-07 Thread Richard Vézina
Notting, it just don't work... Notice, I am using web2py 2.4.7... So passing row not seems an option... Also, the lazy_option plugin is bizz, I don't fully understand how it get to know the value, and field already is used for something else and not seems to be used as it normal in the custom widg

Re: [web2py] Acces to row object with widget (widget=lambda field, value, row: ...)

2014-02-07 Thread Anthony
Then what's wrong with just doing: widget=lambda field, value, row=row: lazy_options_widget(field=field, on_key='no_table_master_field__selected', off_key='master_field__unse

Re: [web2py] Acces to row object with widget (widget=lambda field, value, row: ...)

2014-02-07 Thread Richard Vézina
Kind of... Richard On Thu, Feb 6, 2014 at 6:14 PM, Anthony wrote: > Don't have time to process all this, but are you saying you have a row > object and just need to know how to pass it to a custom widget? > > > On Thursday, February 6, 2014 4:14:26 PM UTC-5, Richard wrote: >> >> Hello, >> >> I

Re: [web2py] Acces to row object with widget (widget=lambda field, value, row: ...)

2014-02-06 Thread Anthony
Don't have time to process all this, but are you saying you have a row object and just need to know how to pass it to a custom widget? On Thursday, February 6, 2014 4:14:26 PM UTC-5, Richard wrote: > > Hello, > > I may ask something not realistic, I didn't think that much to this... > > But I fou

[web2py] Acces to row object with widget (widget=lambda field, value, row: ...)

2014-02-06 Thread Richard
Hello, I may ask something not realistic, I didn't think that much to this... But I found my self, I would really need to know the value of another fields the than the field on which the widget is apply in other to init my widget correctly. I found a workaround that would be as easy as passing