Commit 367d106f authored by Romain Courteaud's avatar Romain Courteaud

Added Base_searchHandler.

git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@9914 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent 55855a3b
<?xml version="1.0"?>
<ZopeData>
<record id="1" aka="AAAAAAAAAAE=">
<pickle>
<tuple>
<tuple>
<string>Products.PythonScripts.PythonScript</string>
<string>PythonScript</string>
</tuple>
<none/>
</tuple>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>Python_magic</string> </key>
<value>
<none/>
</value>
</item>
<item>
<key> <string>Script_magic</string> </key>
<value> <int>3</int> </value>
</item>
<item>
<key> <string>__ac_local_roles__</string> </key>
<value>
<none/>
</value>
</item>
<item>
<key> <string>_bind_names</string> </key>
<value>
<object>
<klass>
<global name="NameAssignments" module="Shared.DC.Scripts.Bindings"/>
</klass>
<tuple/>
<state>
<dictionary>
<item>
<key> <string>_asgns</string> </key>
<value>
<dictionary>
<item>
<key> <string>name_container</string> </key>
<value> <string>container</string> </value>
</item>
<item>
<key> <string>name_context</string> </key>
<value> <string>context</string> </value>
</item>
<item>
<key> <string>name_m_self</string> </key>
<value> <string>script</string> </value>
</item>
<item>
<key> <string>name_subpath</string> </key>
<value> <string>traverse_subpath</string> </value>
</item>
</dictionary>
</value>
</item>
</dictionary>
</state>
</object>
</value>
</item>
<item>
<key> <string>_body</string> </key>
<value> <string>from Products.Formulator.Errors import ValidationError, FormValidationError\n
from ZTUtils import make_query\n
\n
request=context.REQUEST\n
\n
if isinstance(list_form_id,tuple):\n
list_form_id = list_form_id[0]\n
# The type list is not working with isinstance, I have do do this bad hack\n
if hasattr(list_form_id,\'sort\'):\n
list_form_id = list_form_id[0]\n
\n
module_name = context.getId()\n
\n
try:\n
# Validate the form\n
form = getattr(context,dialog_id)\n
form.validate_all_to_request(request)\n
kw = {}\n
for f in form.get_fields():\n
k = f.id\n
# XXX Remove your_ parameters...\n
k = k[5:]\n
v = getattr(request,k,None)\n
if v is not None and k != \'list_form_id\' :\n
kw[k] = v\n
if list_method_id is not None and list_method_id != \'\' :\n
kw[\'list_method_id\'] = list_method_id\n
url_params_string = make_query(kw)\n
# raise str(kw), url_params_string\n
\n
except FormValidationError, validation_errors:\n
# Pack errors into the request\n
field_errors = form.ErrorFields(validation_errors)\n
request.set(\'field_errors\', field_errors)\n
return form(request)\n
\n
\n
if url_params_string != \'\':\n
redirect_url = \'%s/%s?%s\' % ( context.absolute_url()\n
, list_form_id\n
, url_params_string\n
)\n
else:\n
redirect_url = \'%s/%s\' % ( context.absolute_url()\n
, list_form_id\n
)\n
\n
\n
return request.RESPONSE.redirect( redirect_url )\n
</string> </value>
</item>
<item>
<key> <string>_code</string> </key>
<value>
<none/>
</value>
</item>
<item>
<key> <string>_filepath</string> </key>
<value>
<none/>
</value>
</item>
<item>
<key> <string>_owner</string> </key>
<value>
<none/>
</value>
</item>
<item>
<key> <string>_params</string> </key>
<value> <string>form_id,dialog_id,list_form_id,list_method_id=\'\'</string> </value>
</item>
<item>
<key> <string>errors</string> </key>
<value>
<tuple/>
</value>
</item>
<item>
<key> <string>func_code</string> </key>
<value>
<object>
<klass>
<global name="FuncCode" module="Shared.DC.Scripts.Signature"/>
</klass>
<tuple/>
<state>
<dictionary>
<item>
<key> <string>co_argcount</string> </key>
<value> <int>4</int> </value>
</item>
<item>
<key> <string>co_varnames</string> </key>
<value>
<tuple>
<string>form_id</string>
<string>dialog_id</string>
<string>list_form_id</string>
<string>list_method_id</string>
<string>Products.Formulator.Errors</string>
<string>ValidationError</string>
<string>FormValidationError</string>
<string>ZTUtils</string>
<string>make_query</string>
<string>_getattr_</string>
<string>context</string>
<string>request</string>
<string>isinstance</string>
<string>tuple</string>
<string>_getitem_</string>
<string>hasattr</string>
<string>module_name</string>
<string>getattr</string>
<string>form</string>
<string>kw</string>
<string>_getiter_</string>
<string>f</string>
<string>k</string>
<string>None</string>
<string>v</string>
<string>_write_</string>
<string>url_params_string</string>
<string>validation_errors</string>
<string>field_errors</string>
<string>redirect_url</string>
</tuple>
</value>
</item>
</dictionary>
</state>
</object>
</value>
</item>
<item>
<key> <string>func_defaults</string> </key>
<value>
<tuple>
<string></string>
</tuple>
</value>
</item>
<item>
<key> <string>id</string> </key>
<value> <string>Base_searchHandler</string> </value>
</item>
<item>
<key> <string>warnings</string> </key>
<value>
<tuple/>
</value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
70 73
\ No newline at end of file \ No newline at end of file
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