Opened 11 years ago

Last modified 10 years ago

#344 enhancement closed fixed (fixed)

wchild_, getDynamicChild, etc should allow returning a Deferred

Reported by: jknight Owned by:
Priority: normal Milestone:
Component: web Keywords:
Cc: radix, itamarst, dp, moshez, jknight Branch:
Author: Launchpad Bug:

Description


Change History (7)

comment:1 Changed 11 years ago by jknight

At least woven's wchild_ and getDynamicChild should allow returning a Deferred, which will get 
autowrapped in a DeferredResource.

Additionally, as many of the other get*Child* methods as make sense/are possible should similarly
work. (aka: if it's possible to put the autowrapping outside of woven-specific code that'd be extra-
nifty-bonus-points)

[18:56] <stranger> (it would be nice if one could return a deferred that would become a page 
object...)
[18:57] <foom> returning a deferred from a wchild_ doesn't work? if not then return a 
DeferredResource
[18:57] <itamar> foom: don't think it works, no
[18:57] <itamar> though it probably ought to
[18:57] <itamar> add an issue

comment:2 Changed 11 years ago by moshez

They will when getChildWithDefault will allow returning a deferred,
and there's already a feature filed for that.
Why on earth should there be separate code in Woven?

comment:3 Changed 11 years ago by jknight

I think maybe I'm blind, because I don't see the other feature request filed? 

Also, my request was for a behavior, not an implementation. As I tried to say, if it makes the most 
sense to put the code outside woven, great!

comment:4 Changed 11 years ago by itamarst

1. The feature request is for render() AFAICT.

2. wchild_ may be be done in render(), for example, who knows, in which case
it'd need woven specific code. Probably not, but this is Woven, where EVERYTHING
IS POSSIBLE.

comment:5 Changed 11 years ago by itamarst

Now that we have render_GET etc., they should be altered so that returning
Deferred is supported. Someone should investigate whether adding support for
getChild will break backwards compatability - my guess is that with the
appropriate checks in the resource-traversal loop it should be fine. Donovan
should probably be able to help with is.

comment:6 Changed 10 years ago by radix

WONTFIX; this stuff is already working in nevow.

comment:7 Changed 4 years ago by <automation>

  • Owner radix deleted
Note: See TracTickets for help on using tickets.