# -*- coding: utf-8 -*-

import dabo
if __name__ == "__main__":
	dabo.ui.loadUI("wx")
from PagEditBase import PagEditBase


class PagEdit%(tableName)s(PagEditBase):

	def createItems(self):
		"""Called by the datanav framework, when it is time to create the controls."""

		biz = self.Form.getBizobj("%(datasource)s")
		if not biz:
			# needed for tsting
			class Biz(object):
				def getColCaption(self, caption):
					return caption
				def getColToolTip(self, tip):
					return tip
				def getColHelpText(self, txt):
					return txt
			biz = Biz()

%(createItems)s
		super(PagEdit%(tableName)s, self).createItems()


if __name__ == "__main__":
	from Frm%(tableName)s import Frm%(tableName)s
	app = dabo.dApp(MainFormClass=None)
	app.setup()
	class TestForm(Frm%(tableName)s):
		def afterInit(self): pass
	frm = TestForm(Caption="Test Of PagEdit%(tableName)s", Testing=True)
	test = PagEdit%(tableName)s(frm)
	test.createItems()
	frm.Sizer.append1x(test)
	frm.show()
	app.start()
