There is a local problem here.
Right now you can do

form1=SQLFORM(db.table1)
form2=SQLFORM(db.table2)
form1.accepts(request.vars,formname='form1')
form2.accepts(request.vars,formname='form2')
div=DIV(form1,form2)
return dict(div=div)

Now you want to do

form1=SQLFORM(db.table1)
form2=SQLFORM(db.table2)
div=DIV(form1,form2)
div.accepts(request.vars)
return dict(div=div)

and one would expect div.accepts to traverse the tree and try accepts
all forms in it. This could be implemented but it is not the case now.
In fact there are workflow issues since one will need to be able to
attach actions to each of the forms, else web2py would not know what
to do when a form is or is not accepted. For now I think we should
stick to the current way of doing things.

Massimo


On Nov 3, 10:05 am, "José Deodoro de Oliveira Filho"
<[EMAIL PROTECTED]> wrote:
> Hi,
>
> I wrote some code that wraps up a SQLFORM into a DIV such as:
>
> def layout_form(item):
>      f = SQLFORM(db.whatever, item)
>      return DIV(f, _class='form_div')
>
> And I just noticed that DIV.accepts doesn't call SQLFORM.accepts (it calls
> rec_accepts for the child elements). Shouldn't SQLFORM.accepts be split in
> two (accepts and rec_accepts) like the INPUT and DIV ?
>
> Deodoro Filho
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"web2py Web Framework" group.
To post to this group, send email to web2py@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/web2py?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to