I have the following function:

def byplace():
    response.functionname=T('Club locator op plaats')
    form=form_factory(SQLField('plaats',label='Type een
plaatsnaam',requires=IS_NOT_EMPTY(),\
    widget=lambda self, value:TAG[''](INPUT
(_id='clublocator',_name='plaats',_class='ac_input',_type='text'))))
    if form.accepts(request.vars,session):
        response.flash='Geen match op plaats'
        clubs=db((db.bedrijf.id==db.adres.bedrijf)&\
(db.bedrijf.id==db.bedrijfinschrijving.bedrijf)&\
        (db.adres.plaats==request.vars.plaats)&
(db.adres.adressoort=='vestigingsadres')&
        (db.bedrijfinschrijving.inschrijving=='fitnessclub'))\
        .select(db.bedrijf.id,bedrijf.bedrijfsnaam,db.bedrijf.status,\
        db.adres.straat,orderby=db.bedrijf.status|
db.bedrijf.bedrijfsnaam)
    elif form.errors:
      response.flash='form has errors'
    else:
      response.flash='please fill the form'
      clubs=[]
    return dict(form=form,clubs=clubs)


which is exposed in the following view:

{{extend 'fitwiselayout.html'}}

<div id="columns">
  <div id="primarycolumn">
    <div id="dt_example">
      {{if not clubs:}}
        <div class="flash">
          {{=response.flash}}
        </div> <!-- flash -->
      {{else:}}
        <table id="example" class="display">
          <thead>
            <tr>
              <th>bedrijfsnaam</th>
              <th>straatnaam</th>
            </tr>
          </thead>
          <tbody>
            {{for club in clubs:}}
              <tr>
                <td>
                  {{=A
(club.bedrijf.bedrijfsnaam,_href="javascript:clubdetails('%s')"
                  %URL(r=request,f='clubdetails',args=
[club.bedrijf.id]),_target="_blank")}}
                </td>
                <td>
                  {{=club.adres.straatnaam}}
                </td>
              </tr>
            {{pass}}
          </tbody>
        </table>
    </div> <!-- dt_example -->
  </div> <!-- primarycolumn -->
  <div id='secondarycolumn'>
    <div id='secondarycontent'>
      <div id='filterby' class='module'>
        <h3>Zoeken op plaats</h3>
        {{=form}}
      </div> <!-- filterby module -->
      <div class='module'>
      </div> <!-- module -->
    </div> <!-- secondarycontent -->
  </div> <!-- secondarycolumn -->
</div> <!--columns -->



The problem is that when {{if not clubs:}} is true the flash is
displayed and the rest of the page, the secondary column containing
the form and the footer in the fitwiselayout, isn't.

I haven't got a clue how to solve this problem...


Kind regards,

Annet
--~--~---------~--~----~------------~-------~--~----~
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 
web2py+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/web2py?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to