class 'ExtraPageBase' (Node)

function ExtraPageBase:__init(extraScreen, name, order)
	Node.__init(self, extraScreen:getMainEntity(), name, order)

	self.screen = extraScreen
	self.bContentCreated = false
end
-------------------------------------------------------------------------------

--[[
 * Метод предназначен для создания содержимого страницы при ее первом открытии.
--]]
function ExtraPageBase:createContent()
	if self.CreateLoaderTable then
        local resourceTable = self:CreateLoaderTable()
        LoadScene(self:getMainEntity(), resourceTable)
    end

    self.bContentCreated = true
end
-------------------------------------------------------------------------------

function ExtraPageBase:isContentCreated()
	return self.bContentCreated
end
-------------------------------------------------------------------------------

--[[
 * Метод вызывает создание содержимого, если оно еще не создано и отображает его. 
--]]
function ExtraPageBase:show()
	local onLoaded = function()
		Node.show(self)
		self:onShown()
	end

	if self:isContentCreated() then
		onLoaded()
	else
		self:createContent()
		local notification = getLoadingQueueIsEmptyNotification()

		if notification then
			notification:add( onLoaded )
		else
			onLoaded()
		end
	end
end
-------------------------------------------------------------------------------

function ExtraPageBase:onShown()
end
-------------------------------------------------------------------------------

function ExtraPageBase:isOpen()
	return self:getMainEntity():isVisible()
end
-------------------------------------------------------------------------------

function ExtraPageBase:prev()
	print('call ExtraScreenPageBase:prev')
end
-------------------------------------------------------------------------------

function ExtraPageBase:next()
	print('call ExtraScreenPageBase:next')
end
-------------------------------------------------------------------------------

function ExtraPageBase:save()
	print('call ExtraScreenPageBase:save')
end
-------------------------------------------------------------------------------

function ExtraPageBase:set()
	print('call ExtraScreenPageBase:set')
end
-------------------------------------------------------------------------------

function ExtraPageBase:play()
	print('call ExtraScreenPageBase:play')
end
-------------------------------------------------------------------------------

function ExtraPageBase:stop()
	print('call ExtraScreenPageBase:stop')
end
-------------------------------------------------------------------------------