-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Andreas Jung wrote:
> Hi there,
> 
> I am currently working on vs.dashboardmanager.
> 
> http://svn.plone.org/svn/collective/vs.dashboardmanager/trunk/vs/dashboardmanager/
> 
> The PortletPage content-type defines some extra portlet manager.
> 
> So far, so good...rendering the edit view showing the portlet managers
> works. However the portlet manager only show up with the static portlet
> and classic portlet as available portlets. The edit view of the original
> PortletPage portlet managers however show up with the full
> list of available portlets...but where is the difference? Is there some
> filtering code on the portlet manager level that determines the list of
> addable portlets?
> 

Still working on the issue:

The PortletManager implementation has the following filter in
getAddablePortletTypes:

157            elif [i for i in p[1].for_ if i.providedBy(self)]:
158                     addable.append(p[1])

My portlet manager 'self is:

(Pdb) print self
<plone.portlets.manager.PortletManager object at 0x9019de8>

(Pdb) print self.__dict__
{'__name__': 'vs.dashboardmanager.column2', '_SampleContainer__data':
<BTrees._OOBTree.OOBTree object at 0x93d0850>, '__provides__':
<zope.interface.Provides object at 0x8d0f450>}

defined as

class IPortletPageColumn2(IPortletManager):
...

and registered through

    <portletmanager
        name="vs.dashboardmanager.column2"
        type="vs.dashboardmanager.interfaces.IPortletPageColumn2"
        />

However a standard portlet like the login portlet provides the following
interfaces:

(Pdb) print p[1]
<plone.portlets.registration.PortletType object at 0x903b398>

(Pdb) print p[1].for_
[<InterfaceClass plone.app.portlets.interfaces.IColumn>, <InterfaceClass
plone.app.portlets.interfaces.IDashboard>]

So the check above will never succeed since IColumn is not provided by
the portlet manager (IPortletManager).

So I tried to register my portlet manager for IColumn (which inherits
from IPortletManager) but this will not render a proper edit view for
the portlet manager...

I still can not see the problem - especially not the difference to
collective.portletpage that also registers its own portlet managers and
is able to render an edit view for the portlet managers having all
portlets available?!

Andreas


-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.10 (Darwin)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/

iEYEARECAAYFAkxNqa8ACgkQCJIWIbr9KYxNEgCghLF03iEmQ30f92QkINjutLS6
g8AAniGPC0QgZ/UXUEd1CcxDbSJoRR1R
=U0oM
-----END PGP SIGNATURE-----

<<attachment: lists.vcf>>

_______________________________________________
Product-Developers mailing list
[email protected]
http://lists.plone.org/mailman/listinfo/product-developers

Reply via email to