equal
deleted
inserted
replaced
237 |
237 |
238 note: it's the responsability of js_* methods to set the correct |
238 note: it's the responsability of js_* methods to set the correct |
239 response content type |
239 response content type |
240 """ |
240 """ |
241 self.req.pageid = self.req.form.get('pageid') |
241 self.req.pageid = self.req.form.get('pageid') |
242 fname = self.req.form['fname'] |
242 try: |
243 try: |
243 fname = self.req.form['fname'] |
244 func = getattr(self, 'js_%s' % fname) |
244 func = getattr(self, 'js_%s' % fname) |
|
245 except KeyError: |
|
246 raise RemoteCallFailed('no method specified') |
245 except AttributeError: |
247 except AttributeError: |
246 raise RemoteCallFailed('no %s method' % fname) |
248 raise RemoteCallFailed('no %s method' % fname) |
247 # no <arg> attribute means the callback takes no argument |
249 # no <arg> attribute means the callback takes no argument |
248 args = self.req.form.get('arg', ()) |
250 args = self.req.form.get('arg', ()) |
249 if not isinstance(args, (list, tuple)): |
251 if not isinstance(args, (list, tuple)): |