Guys,

I added the widget in web2pyslices.com. Following url:
http://www.web2pyslices.com/main/slices/take_slice/11

Please let me know the problems and feel free to improve it.


On Oct 17, 3:20 pm, Renato-ES-Brazil <caliari.ren...@gmail.com> wrote:
> I solved this problem. Now my widget returns the SELECT (combo box)
> object and the "add" link inside a DIV object. So, the form.accepts
> reads just one object (the DIV) from the <TD>, working properly.
>
> Now, the return of my widget is as follows:
> return DIV(select, " ", add_link)
>
> On Oct 16, 7:27 pm, Renato-ES-Brazil <caliari.ren...@gmail.com> wrote:
>
> > mr.freeze,
>
> > Yes, the link is inside the form. Each "add" link is next to your own
> > "select" (combo box) object. The "add" link is created by a widget set
> > in my model, hence it is rendered by SQLFORM inside the form.
>
> > On 16 out, 16:24, "mr.freeze" <nat...@freezable.com> wrote:
>
> > > Is the link inside the form? If so, try moving it outside and see if
> > > it still fails.
>
> > > On Oct 16, 1:53 pm, Renato-ES-Brazil <caliari.ren...@gmail.com> wrote:
>
> > > > Any tips? What could I do to "form.accepts" to get just the first
> > > > object (SELECT) and not a tuple (SELECT and A)?
>
> > > > Do I have to remove the A object ("add" link) from the <TD> where is
> > > > the SELECT? :-/
>
> > > > Thanks.
>
> > > > Does it happens because "form.accepts" trying get some attributes,
> > > > like "errors", from the "add" links?
>
> > > > On Oct 15, 9:32 pm, Renato-ES-Brazil <caliari.ren...@gmail.com> wrote:
>
> > > > > Hi guys!
>
> > > > > Another problem found:
> > > > > - The "form.accepts" fails when I trying submit the form with the
> > > > > links "add".
>
> > > > > Some lines shown in the log:
> > > > >     if form.accepts(request.vars, session):
> > > > >   File "/home/renato/Desenvolvimento/web2py/gluon/sqlhtml.py", line
> > > > > 777, in accepts
> > > > >     self.trows[fieldname][1][0].errors = self.errors
> > > > > AttributeError: 'tuple' object has no attribute 'errors'
>
> > > > > When web2py get the self.trows[fieldname][1], actually, now, it's
> > > > > taking two objects (the select and the "add" link):
> > > > > <td>(&lt;gluon.html.SELECT object at 0xa0f41ec&gt;, ' ',
> > > > > &lt;gluon.html.A object at 0xa100a6c&gt;)</td>
>
> > > > > Any tip?
>
>
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"web2py-users" group.
To post to this group, send email to web2py@googlegroups.com
To unsubscribe from this group, send email to 
web2py+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/web2py?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to