Commit 8e37853d authored by Rafael Monnerat's avatar Rafael Monnerat

Server Buffer is not required on this new Implementation

parent 703f396b
......@@ -169,7 +169,7 @@ class BusinessConfiguration(Item):
## exec next transition for this business configuration
self._executeTransition()
transition = self.getNextTransition()
return None, None, None, None, None
return None, None, None, None
if form_id is None:
## go on until you find a form
self._executeTransition()
......@@ -187,7 +187,7 @@ class BusinessConfiguration(Item):
if self._isAlreadyConfSaveInWorkflowHistory(transition):
previous = translate("Previous")
return previous, form_html, form_title, \
translate(transition.getTitle()), self.getServerBuffer()
translate(transition.getTitle())
security.declarePrivate('_renderFormInContext')
def _renderFormInContext(self, form_id, context, validation_errors):
......@@ -328,23 +328,6 @@ class BusinessConfiguration(Item):
self._multi_entry_transitions = PersistentMapping()
self._multi_entry_transitions[transition_url] = max_entry_number
security.declareProtected(Permissions.ModifyPortalContent, 'setServerBuffer')
def setServerBuffer(self, **kw):
""" Set what we should return to client. """
if getattr(aq_base(self), '_server_buffer', None) is None:
self._server_buffer = {}
for item, value in kw.items():
self._server_buffer[item] = value
self._p_changed = 1
security.declareProtected(Permissions.View, 'getServerBuffer')
def getServerBuffer(self):
""" Get return buffer which will be sent to client and
afterwards deleted. """
server_buffer = getattr(aq_base(self), '_server_buffer', {})
self._server_buffer = {}
return server_buffer
security.declareProtected(Permissions.ModifyPortalContent, 'setGlobalConfigurationAttr')
def setGlobalConfigurationAttr(self, **kw):
""" Set global business configuration attribute. """
......@@ -360,7 +343,6 @@ class BusinessConfiguration(Item):
global_configuration_attributes = getattr(self, '_global_configuration_attributes', {})
return global_configuration_attributes.get(key, default)
############# Instance and Business Configuration ########################
security.declareProtected(Permissions.ModifyPortalContent, 'buildConfiguration')
def buildConfiguration(self, execute_after_setup_script=1):
......
......@@ -335,8 +335,8 @@ class ConfiguratorTool(BaseTool):
### client can not continue at the momen
return self._terminateConfigurationProcess(response,
reason='no_available_transitions')
response["previous"], html, form_title, response["next"], \
response['server_buffer'] = business_configuration._displayNextForm()
response["previous"], html, form_title, response["next"] \
= business_configuration._displayNextForm()
else:
## validation passed
need_validation = 0
......@@ -347,9 +347,9 @@ class ConfiguratorTool(BaseTool):
'no_available_transitions')
## validation failure
rendered = True
response["previous"], html, form_title, response["next"], \
response['server_buffer'] = business_configuration.\
_displayNextForm(validation_errors=validation_errors)
response["previous"], html, form_title, response["next"] =\
business_configuration._displayNextForm(
validation_errors=validation_errors)
if html is None:
## we have no more forms proceed to build
......@@ -409,7 +409,7 @@ class ConfiguratorTool(BaseTool):
return self.ConfiguratorTool_dialogForm(form_html = form_html,
next = "Next")
response['previous'], form_html, form_title, response['next'], server_buffer = \
response['previous'], form_html, form_title, response['next'] = \
business_configuration._displayPreviousForm()
next_state = self.restrictedTraverse(
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment