45 def lazyview(self, vid, rql=None, eid=None, rset=None, tabid=None, |
45 def lazyview(self, vid, rql=None, eid=None, rset=None, tabid=None, |
46 reloadable=False, show_spinbox=True, w=None): |
46 reloadable=False, show_spinbox=True, w=None): |
47 """a lazy version of wview""" |
47 """a lazy version of wview""" |
48 w = w or self.w |
48 w = w or self.w |
49 self._cw.add_js('cubicweb.ajax.js') |
49 self._cw.add_js('cubicweb.ajax.js') |
|
50 # the form is copied into urlparams to please the inner views |
|
51 # that might want to take params from it |
|
52 # beware of already present rql or eid elements |
|
53 # to be safe of collision a proper argument passing protocol |
|
54 # (with namespaces) should be used instead of the current |
|
55 # ad-hockery |
50 urlparams = self._cw.form.copy() |
56 urlparams = self._cw.form.copy() |
|
57 urlparams.pop('rql', None) |
|
58 urlparams.pop('eid', None) |
51 urlparams.update({'vid' : vid, 'fname' : 'view'}) |
59 urlparams.update({'vid' : vid, 'fname' : 'view'}) |
52 if rql: |
60 if rql: |
53 urlparams['rql'] = rql |
61 urlparams['rql'] = rql |
54 elif eid: |
62 elif eid: |
55 urlparams['eid'] = eid |
63 urlparams['eid'] = eid |