Logo Search packages:      
Sourcecode: zope-cmfdynamicviewfti version File versions  Download package

def CMFDynamicViewFTI::fti::DynamicViewTypeInformation::queryMethodID (   self,
  alias,
  default = None,
  context = None 
)

Query method ID by alias.

Use "(dynamic view)" as the alias target to look up as per defaultView()
Use "(selected layout)" as the alias target to look up as per
    getViewMethod()

Definition at line 198 of file fti.py.

00198                                                               :
        """ Query method ID by alias.

        Use "(dynamic view)" as the alias target to look up as per defaultView()
        Use "(selected layout)" as the alias target to look up as per
            getViewMethod()
        """
        methodTarget = FactoryTypeInformation.queryMethodID(self, alias,
                                                         default=default,
                                                         context=context)
        if not isinstance(methodTarget, basestring):
            # nothing to do, method_id is probably None
            return methodTarget

        if context is None or default == '':
            # the edit zpts like typesAliases don't apply a context and set the
            # default to ''. We do not want to resolve (dynamic view) for these
            # methods.
            return methodTarget

        # Our two special targets:

        if methodTarget.lower() == "(dynamic view)":
            methodTarget = self.defaultView(context)

        if methodTarget.lower() == "(selected layout)":
            methodTarget = self.getViewMethod(context)

        return methodTarget

InitializeClass(DynamicViewTypeInformation)

def manage_addFactoryDynamivViewTIForm(self, REQUEST):


Generated by  Doxygen 1.6.0   Back to index