Package nevow :: Module rend :: Class Fragment
[show private | hide private]
[frames | no frames]

Type Fragment

   object --+    
            |    
  DataFactory --+
                |
   object --+   |
            |   |
RenderFactory --+
                |
               Fragment

Known Subclasses:
Page

A fragment is a renderer that can be embedded in a stan document and hooks its template (from the docFactory) up to its data_ and render_ methods, i.e. it remembers itself as the IRendererFactory and IContainer.

Fragment primarily serves as the base for Page, Nevow's web resource, but it can be used for more complex rendering. For instance, a fragment might be used to encapsulate the rendering of a complex piece of data where the template is read from disk and contains standard renderers (sequence, mapping etc) and/or custom render methods.
Method Summary
  __init__(self, original, docFactory)
  get(self, context)
  remember(self, obj, inter)
Remember the given object for the given interfaces (or all interfaces obj.__implements__) in the top-level context for this page.
  rememberStuff(self, ctx)
  rend(self, context, data)
    Inherited from DataFactory
  child(self, context, n)
    Inherited from RenderFactory
  render_mapping(self, context, data)
  render_sequence(self, context, data)
  render_string(self, context, data)
  render_xml(self, context, data)
  renderer(self, context, name)
Return a renderer with the given name.
    Inherited from object
  __delattr__(...)
x.__delattr__('name') <==> del x.name
  __getattribute__(...)
x.__getattribute__('name') <==> x.name
  __hash__(x)
x.__hash__() <==> hash(x)
  __new__(T, S, ...)
T.__new__(S, ...) -> a new object with type S, a subtype of T
  __reduce__(...)
helper for pickle
  __reduce_ex__(...)
helper for pickle
  __repr__(x)
x.__repr__() <==> repr(x)
  __setattr__(...)
x.__setattr__('name', value) <==> x.name = value
  __str__(x)
x.__str__() <==> str(x)

Class Variable Summary
tuple __implements__ = (<class 'nevow.inevow.IRenderer'>, <cla...
NoneType docFactory = None                                                                  
NoneType original = None                                                                  

Method Details

remember(self, obj, inter=None)

Remember the given object for the given interfaces (or all interfaces obj.__implements__) in the top-level context for this page.

Note that the objects remembered using this API are only remembered for the duration of one render.

XXX THIS IS DEPRECATED. The page context is now passed to various Page apis. Remember things there instead.

Class Variable Details

__implements__

Type:
tuple
Value:
(<class 'nevow.inevow.IRenderer'>,
 <class 'nevow.inevow.IGettable'>,
 (<class 'nevow.inevow.IRendererFactory'>,),
 (<class 'nevow.inevow.IContainer'>,))                                 

docFactory

Type:
NoneType
Value:
None                                                                  

original

Type:
NoneType
Value:
None                                                                  

Generated by Epydoc 2.1 on Fri Mar 11 00:37:45 2005 http://epydoc.sf.net