Back to index

plone3  3.1.7
Public Member Functions | Public Attributes | Static Private Attributes
kss.core.commands.CommandView Class Reference

List of all members.

Public Member Functions

def __init__
def render

Public Attributes

 context
 request

Static Private Attributes

tuple _render = ViewPageTemplateFile('browser/kukitresponse.pt', content_type='text/xml;charset=utf-8')

Detailed Description

View of a command.

The render method does actual marshalling
of the commands to be sent to the client.

Definition at line 174 of file commands.py.


Constructor & Destructor Documentation

def kss.core.commands.CommandView.__init__ (   self,
  context,
  request 
)

Definition at line 182 of file commands.py.

00182 
00183     def __init__(self, context, request):
00184         self.context = context
00185         self.request = request
00186         # XXX From Zope2.9 we need this.
00187         # Note: We don't use proper views for Five. As our context object
00188         # is not even a proper Zope content. There would be a way to:
00189         #
00190         # - use ZopeTwoPageTemplateFile
00191         # - and, make the object to be proper zope content.
00192         #
00193         # This would be two much ado for nothing, so we just use barefoot
00194         # rendering but as a consequence no path expression, only python:
00195         # is available from the page template.
00196         if not hasattr(self.request, 'debug'):
00197             self.request.debug = None
00198 
00199         # Force parameters content to be unicode
00200         for command in context:
00201             for param in command.getParams():
00202                 param.force_content_unicode()
    

Here is the caller graph for this function:


Member Function Documentation

Definition at line 208 of file commands.py.

00208 
00209     def render(self):
00210         result = self._render()
00211         # Always output text/xml to make sure browsers but the data in the
00212         # responseXML instead of responseText attribute of the
00213         # XMLHttpRequestobject.
00214         self.request.response.setHeader('Content-type', 'text/xml;charset=utf-8')
00215         return result

Member Data Documentation

tuple kss.core.commands.CommandView._render = ViewPageTemplateFile('browser/kukitresponse.pt', content_type='text/xml;charset=utf-8') [static, private]

Definition at line 206 of file commands.py.

Definition at line 183 of file commands.py.

Definition at line 184 of file commands.py.


The documentation for this class was generated from the following file: