I just had a look to the book... There is no extended explanations about the
crud.search peculiar nature, since there is only a single example that
actually use the correct controller syntax you point me out :

def manage():
    table=db[request <http://web2py.com/book/default/docstring/request>.args(0)]
    form = crud.update(table,request
<http://web2py.com/book/default/docstring/request>.args(1))
    table.id.represent = lambda id: \
       A <http://web2py.com/book/default/docstring/A>('edit:',id,_href=URL
<http://web2py.com/book/default/docstring/URL>(args=(request
<http://web2py.com/book/default/docstring/request>.args(0),id)))
    search, rows = crud.search(table)
    return dict(form=form,search=search,rows=rows)


http://web2py.com/book/default/chapter/07?search=crud.search

Maybe, it could be a good idea to add a kind of advise somewhere where the
crud API is detailed to drag attention about crud.search particularity.

Thanks you

:-)

Richard

On Tue, Aug 9, 2011 at 2:47 PM, Richard Vézina
<ml.richard.vez...@gmail.com>wrote:

> It true... It needs a result container...
>
> My bad...
>
> Sorry.
>
> Richard
>
>
> On Tue, Aug 9, 2011 at 2:42 PM, Massimo Di Pierro <
> massimo.dipie...@gmail.com> wrote:
>
>> haha. that's the problem.
>>
>> crud.search does not return one object but two
>>
>>  form, rows = crud.search(db.dict_database)
>>  return dict(form=DIV(form,rows))
>>
>> and this will do what you want.
>>
>> On Aug 9, 1:40 pm, Richard Vézina <ml.richard.vez...@gmail.com> wrote:
>> > def search():
>> >     form = crud.search(db.dict_database)
>> >     return dict(form=form)
>> >
>> > On Tue, Aug 9, 2011 at 2:36 PM, Massimo Di Pierro <
>> >
>> >
>> >
>> >
>> >
>> >
>> >
>> > massimo.dipie...@gmail.com> wrote:
>> > > what does your controller look like?
>> >
>> > > On Aug 9, 1:31 pm, Richard Vézina <ml.richard.vez...@gmail.com>
>> wrote:
>> > > > Here what I got in the HTML nav. displayed when I copy/paste/rename
>> > > > generic.html for search.html for a given controller function...
>> >
>> > > > Search(<gluon.html.FORM object at 0x414eed0>, <gluon.dal.Rows object
>> at
>> > > > 0x4c49050>)
>> > > > designrequestsessionresponsedb stats
>> >
>> > > > With the old generic.html I had the HTML rendered correctly with all
>> the
>> > > > input and check boxes and the dropbox for equals etc.
>> >
>> > > > Hope it helps
>> >
>> > > > Richard
>> >
>> > > > On Tue, Aug 9, 2011 at 2:27 PM, Massimo Di Pierro <
>> >
>> > > > massimo.dipie...@gmail.com> wrote:
>> > > > > can you show a code example and what is wrong with it?
>> >
>> > > > > On Aug 9, 1:21 pm, Richard <ml.richard.vez...@gmail.com> wrote:
>> > > > > > Hello,
>> >
>> > > > > > Like in the title... I don't know if the issue have been
>> reported
>> > > > > > already.
>> >
>> > > > > > Richard
>>
>
>

Reply via email to