Ticket #66 (closed bug: fixed)

Opened 7 years ago

Last modified 7 years ago

The serializer can't serialize an empty DOM

Reported by: apoirier Owned by: apoirier
Priority: major Component: presentation tier
Version: 0.3.0 Keywords:
Cc:

Description

Exception :

NoApplicableMethods: (([], 'text/html', '<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">', False), {})

with this code:

from nagare import presentation, ajax

class C:
    pass

@presentation.render_for(C, model='async')
def render(self, h, *args):
    return h.root   # Returning an empty DOM

@presentation.render_for(C)
def render(self, h, comp, *args):
    h << h.div(id='async_div')
    h << h.a('Click me').action(ajax.Update(
                              render=lambda h: comp.render(h, model='async'),
                              component_to_update='async_div')
                             )
    return h.root

Change History

comment:1 Changed 7 years ago by apoirier

  • Status changed from new to closed
  • Resolution set to fixed
Note: See TracTickets for help on using tickets.