Back to index

plone3  3.1.7
Public Member Functions | Public Attributes
plone.app.kss.commands.refreshprovider.RefreshProviderCommand Class Reference
Inheritance diagram for plone.app.kss.commands.refreshprovider.RefreshProviderCommand:
Inheritance graph
[legend]
Collaboration diagram for plone.app.kss.commands.refreshprovider.RefreshProviderCommand:
Collaboration graph
[legend]

List of all members.

Public Member Functions

def refreshProvider
def getCommandSet

Public Attributes

 view
 context
 request
 commands

Detailed Description

Refreshes the selected provider (provides IContentProvider) named name and located
at selector in the HTML

Definition at line 8 of file refreshprovider.py.


Member Function Documentation

def kss.core.kssview.CommandSet.getCommandSet (   self,
  name 
) [inherited]

Definition at line 180 of file kssview.py.

00180 
00181     def getCommandSet(self, name):
00182         return self.view.getCommandSet(name)
00183 
# BBB deprecated

Definition at line 14 of file refreshprovider.py.

00014 
00015     def refreshProvider(self, name, selector):
00016         # Cleaned out all the old code pre-provider menus (supposed safe, we are in Plone 3.0)
00017         # Basically the code comes from jfroche's locking branch, where we get the provider
00018         # through adaptation and we render it. Right now a big refresh issue occurs on workflow
00019         # state changes
00020         contentMenuProvider = getMultiAdapter((self.context, self.request, self.view),
00021                                               IContentProvider,
00022                                               name=name)
00023         renderer = contentMenuProvider.__of__(self.context)
00024         renderer.update()
00025         result = renderer.render()
00026         # Command the replacement
00027         ksscore = self.getCommandSet('core')
00028         # Here we are using a replaceInner because we are binding to a selector to do that:
00029         # in case the provider does not want to be shown (and we have an example with the contentmenu
00030         # in edit tab) then the renderer might return a blank string, if we replace that normally then we
00031         # won't have selectors to get back!
00032         ksscore.replaceInnerHTML(ksscore.getCssSelector(selector), result)
00033 

Here is the call graph for this function:


Member Data Documentation

Definition at line 178 of file kssview.py.

Definition at line 176 of file kssview.py.

Definition at line 177 of file kssview.py.

Definition at line 175 of file kssview.py.


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