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

Type Fragment

       object --+    
                |    
ConfigurableMixin --+
                    |
       object --+   |
                |   |
      DataFactory --+
                    |
       object --+   |
                |   |
     MacroFactory --+
                    |
       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 an object for an interface on new PageContexts which are constructed around this Page.
  rememberStuff(self, ctx)
  rend(self, context, data)
    Inherited from DataFactory
  child(self, context, n)
    Inherited from RenderFactory
  render_data(self, context, data_)
  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 MacroFactory
  macro(self, ctx, name)
Return a macro with the given name.
    Inherited from ConfigurableMixin
  getBinding(self, ctx, name)
Massage bind_* methods and attributes into an IBinding.
  getBindingNames(self, ctx)
Expose bind_* methods and attributes on this class.
  getDefault(self, forBinding)
Get a default value for a given binding.
  postForm(self, ctx, bindingName, args)
Accept a form post to the given bindingName.
    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
Implements __implemented__ = <implementedBy nevow.rend.Fragment>
_implementsTuple __implements__ = (<MetaInterface nevow.inevow.IRenderer>...
ClassProvides __provides__ = <zope.interface.declarations.ClassProvide...
NoneType docFactory = None                                                                  
NoneType original = None                                                                  
    Inherited from DataFactory
ClassProvides __providedBy__ = <zope.interface.declarations.ClassProvi...

Method Details

remember(self, obj, inter=None)

Remember an object for an interface on new PageContexts which are constructed around this Page. Whenever this Page is involved in object traversal in the future, all objects will be visible to .locate() calls at the level of a PageContext wrapped around this Page and all contexts below it.

This does not affect existing Context instances.

Class Variable Details

__implemented__

Type:
Implements
Value:
<implementedBy nevow.rend.Fragment>                                    

__implements__

Type:
_implementsTuple
Value:
(<MetaInterface nevow.inevow.IRenderer>, <MetaInterface nevow.inevow.I\
Gettable>, <MetaInterface nevow.inevow.IContainer>, <MetaInterface nev\
ow.inevow.IRendererFactory>, <MetaInterface nevow.inevow.IMacroFactory\
>, <_MetaConfigurable formless.iformless.IConfigurable>)               

__provides__

Type:
ClassProvides
Value:
<zope.interface.declarations.ClassProvides object at 0x40939d8c>       

docFactory

Type:
NoneType
Value:
None                                                                  

original

Type:
NoneType
Value:
None                                                                  

Generated by Epydoc 2.1 on Wed May 3 13:51:13 2006 http://epydoc.sf.net