Back to index

plone3  3.1.7
parameterfunction_view.py
Go to the documentation of this file.
00001 
00002 from kss.core import KSSView, kssaction
00003 
00004 class ParameterFunctionView(KSSView):
00005 
00006     @kssaction
00007     def submitFullForm(self, form):
00008         assert hasattr(form, 'keys'), 'Form data is expected to be a dict-like object.'
00009         # marshall back the repr of this dict.
00010         ksscore = self.getCommandSet('core')
00011         ksscore.replaceInnerHTML('#target', repr(form))
00012 
00013     @kssaction
00014     def submitMultiSelect(self, items):
00015         ksscore = self.getCommandSet('core')
00016         ksscore.replaceInnerHTML('#target', repr(items))
00017 
00018     @kssaction
00019     def submitFullFormIntoRequest(self):
00020         # marshall back the repr of this dict.
00021         ksscore = self.getCommandSet('core')
00022         ksscore.replaceInnerHTML('#target', repr(list(sorted(
00023                         self.request.form.items()))))