Back to index

plone3  3.1.7
Public Member Functions | Public Attributes
plone.app.kss.portlets.PortletReloader Class Reference

List of all members.

Public Member Functions

def __init__
def reloadPortletsByInterface
def getPortletsByInterface
def reloadPortletByInfo
def getAllPortletInfos

Public Attributes

 view
 context
 request

Detailed Description

Definition at line 50 of file portlets.py.


Constructor & Destructor Documentation

Definition at line 51 of file portlets.py.

00051 
00052     def __init__(self, view):
00053         self.view = view
00054         self.context = view.context
00055         self.request = view.request

Here is the caller graph for this function:


Member Function Documentation

Definition at line 76 of file portlets.py.

00076 
00077     def getAllPortletInfos(self):
00078         portletInfos = []
00079         for manager in getAllUtilitiesRegisteredFor(IPortletManager):
00080             managerRenderer = manager(self.context, self.request, self.view)
00081             if managerRenderer.visible:
00082                 portletInfos += managerRenderer.portletsToShow()
00083         return portletInfos

Here is the caller graph for this function:

Definition at line 60 of file portlets.py.

00060 
00061     def getPortletsByInterface(self, interface):
00062         return [info for info in self.getAllPortletInfos() 
00063                 if interface.providedBy(info['assignment'])]
    

Here is the call graph for this function:

Here is the caller graph for this function:

Definition at line 64 of file portlets.py.

00064 
00065     def reloadPortletByInfo(self, info):
00066         renderer = info['renderer']
00067         renderer.update()
00068         if IDeferredPortletRenderer.providedBy(renderer):
00069             # if this is a deferred load, prepare now the data
00070             renderer.deferred_update()
00071         result = renderer.render()
00072         portlethash = info['hash']
00073         wrapper_id = 'portletwrapper-%s' % portlethash
00074         ksscore = self.view.getCommandSet('core')
00075         ksscore.replaceInnerHTML(ksscore.getHtmlIdSelector(wrapper_id), result, withKssSetup='False')

Here is the caller graph for this function:

Definition at line 56 of file portlets.py.

00056 
00057     def reloadPortletsByInterface(self, interface):
00058         for info in self.getPortletsByInterface(interface):
00059             self.reloadPortletByInfo(info)

Here is the call graph for this function:


Member Data Documentation

Definition at line 53 of file portlets.py.

Definition at line 54 of file portlets.py.

Definition at line 52 of file portlets.py.


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