Commit 3c939d24 authored by Yusei Tahara's avatar Yusei Tahara

2007-08-03 yusei

Remove obsolute code from Base_doSelect.

git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@15469 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent 2f816b0f
...@@ -69,50 +69,20 @@ ...@@ -69,50 +69,20 @@
<item> <item>
<key> <string>_body</string> </key> <key> <string>_body</string> </key>
<value> <string>from ZTUtils import make_query\n <value> <string>from ZTUtils import make_query\n
from ZODB.POSException import ConflictError\n
\n \n
request = context.REQUEST\n request = context.REQUEST\n
\n \n
#return request\n #return request\n
\n \n
if list_method_id:\n kw = { \'selection_index\': selection_index,\n
kw = { \'selection_index\': selection_index,\n
\'selection_name\': selection_name,\n
\'list_method_id\': list_method_id,\n
}\n
else:\n
kw = { \'selection_index\': selection_index,\n
\'selection_name\': selection_name,\n \'selection_name\': selection_name,\n
}\n }\n
\n \n
if list_method_id:\n # Default behaviour is not as great but returns something\n
try:\n kw.update(request.form)\n
# Define form basic fields\n if kw.has_key(\'listbox_uid\'): del kw[\'listbox_uid\']\n
form = getattr(context,form_id)\n if kw.has_key(\'list_start\'): del kw[\'list_start\']\n
listbox_field = None\n request.RESPONSE.redirect(\'%s/%s?%s\' % (context.absolute_url(), form_id, make_query(kw)))\n
# Search listbox\n
for f in form.get_fields():\n
if f.meta_type == "ListBox":\n
listbox_field = f\n
break\n
# Lookup listbox Base_viewSearchResultList cols\n
for col_id, col_title in listbox_field.get_value(\'search_columns\'):\n
# Left is col_id\n
v = request.form.get(col_id, \'\')\n
kw[col_id] = v\n
# Redirect\n
request.RESPONSE.redirect(\'%s/%s?%s\' % (context.absolute_url(), form_id, make_query(kw)))\n
except ConflictError:\n
raise\n
except:\n
# Default behaviour is not as great but returns something\n
return getattr(context,form_id)(request)\n
else:\n
# Default behaviour is not as great but returns something\n
kw.update(request.form)\n
if kw.has_key(\'listbox_uid\'): del kw[\'listbox_uid\']\n
if kw.has_key(\'list_start\'): del kw[\'list_start\']\n
request.RESPONSE.redirect(\'%s/%s?%s\' % (context.absolute_url(), form_id, make_query(kw)))\n
</string> </value> </string> </value>
</item> </item>
<item> <item>
...@@ -129,7 +99,7 @@ else:\n ...@@ -129,7 +99,7 @@ else:\n
</item> </item>
<item> <item>
<key> <string>_params</string> </key> <key> <string>_params</string> </key>
<value> <string>form_id=\'\', selection_index=\'\', selection_name=\'\', list_method_id=None</string> </value> <value> <string>form_id=\'\', selection_index=\'\', selection_name=\'\'</string> </value>
</item> </item>
<item> <item>
<key> <string>errors</string> </key> <key> <string>errors</string> </key>
...@@ -149,7 +119,7 @@ else:\n ...@@ -149,7 +119,7 @@ else:\n
<dictionary> <dictionary>
<item> <item>
<key> <string>co_argcount</string> </key> <key> <string>co_argcount</string> </key>
<value> <int>4</int> </value> <value> <int>3</int> </value>
</item> </item>
<item> <item>
<key> <string>co_varnames</string> </key> <key> <string>co_varnames</string> </key>
...@@ -158,24 +128,12 @@ else:\n ...@@ -158,24 +128,12 @@ else:\n
<string>form_id</string> <string>form_id</string>
<string>selection_index</string> <string>selection_index</string>
<string>selection_name</string> <string>selection_name</string>
<string>list_method_id</string>
<string>ZTUtils</string> <string>ZTUtils</string>
<string>make_query</string> <string>make_query</string>
<string>ZODB.POSException</string>
<string>ConflictError</string>
<string>_getattr_</string> <string>_getattr_</string>
<string>context</string> <string>context</string>
<string>request</string> <string>request</string>
<string>kw</string> <string>kw</string>
<string>getattr</string>
<string>form</string>
<string>None</string>
<string>listbox_field</string>
<string>_getiter_</string>
<string>f</string>
<string>col_id</string>
<string>col_title</string>
<string>v</string>
<string>_write_</string> <string>_write_</string>
</tuple> </tuple>
</value> </value>
...@@ -192,7 +150,6 @@ else:\n ...@@ -192,7 +150,6 @@ else:\n
<string></string> <string></string>
<string></string> <string></string>
<string></string> <string></string>
<none/>
</tuple> </tuple>
</value> </value>
</item> </item>
......
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