当前位置: 首页>>代码示例>>Python>>正文


Python Factory.addProduct方法代码示例

本文整理汇总了Python中Factory.Factory.addProduct方法的典型用法代码示例。如果您正苦于以下问题:Python Factory.addProduct方法的具体用法?Python Factory.addProduct怎么用?Python Factory.addProduct使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在Factory.Factory的用法示例。


在下文中一共展示了Factory.addProduct方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。

示例1: len

# 需要导入模块: from Factory import Factory [as 别名]
# 或者: from Factory.Factory import addProduct [as 别名]
            self.startButton.addJavascriptEvent('onclick', self.jsSetNavigationIndex(0))
        else:
            self.backButton.hide()
            self.startButton.hide()

        pageList = self._pages_.pageList()
        if len(pageList) > 1:
            for page in self._pages_.pageList():
                link = self.pageLinks.addChildElement(Buttons.Link())
                link.setText(unicode(page / self._pages_.itemsPerPage + 1))
                link.addClass('SpacedWord')
                if page != self._index_.value():
                    link.setDestination('#Link')
                    link.addJavascriptEvent('onclick', self.jsSetNavigationIndex(page))

Factory.addProduct(ItemPager)


class JumpToLetter(Layout.Vertical):
    """
        Provides a simple set of links that allow a user to jump to a particular letter
    """
    letters = map(chr, xrange(ord('A'), ord('Z') + 1))
    signals = Layout.Vertical.signals + ['jsLetterClicked']

    def __init__(self, id, name=None, parent=None):
        Layout.Vertical.__init__(self, id, name, parent)
        self.addClass("WJumpToLetter")
        self.style['float'] = "left"

        self.__letterMap__ = {}
开发者ID:spendyala,项目名称:webelements,代码行数:33,代码来源:Navigation.py

示例2: joinRows

# 需要导入模块: from Factory import Factory [as 别名]
# 或者: from Factory.Factory import addProduct [as 别名]
        """
        for row in rows:
            newRow = self.addRow()
            for col, value in row.iteritems():
                self.setCell(newRow, col, value)

    def joinRows(self, columnName, rows):
        """
            Will join a column across the given rows
        """
        row = rows.pop(0)
        row.actualCell(columnName).attributes['rowspan'] = len(rows) + 1
        for row in rows:
            row.actualCell(columnName).replaceWith(Display.Empty())

Factory.addProduct(Table)

Column = Table.Column
Row = Table.Row
Header = Table.Header


class StoredValue(Layout.Box):
    """
        Defines a label:value pair that will be passed into the request
    """
    __slots__ = ('label', 'value', 'valueDisplay')
    def __init__(self, id=None, name=None, parent=None, **kwargs):
        Layout.Box.__init__(self, name=name + "Container", parent=parent)

        self.addClass("WStoredValue")
开发者ID:ankurchopra87,项目名称:webelements,代码行数:33,代码来源:DataViews.py


注:本文中的Factory.Factory.addProduct方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。