[Erp5-report] r15559 - /erp5/trunk/products/ERP5/bootstrap/erp5_core/SkinTemplateItem/porta...

nobody at svn.erp5.org nobody at svn.erp5.org
Wed Aug 8 14:54:19 CEST 2007


Author: yusei
Date: Wed Aug  8 14:54:19 2007
New Revision: 15559

URL: http://svn.erp5.org?rev=15559&view=rev
Log:
Fixed a proxy field problem.

Modified:
    erp5/trunk/products/ERP5/bootstrap/erp5_core/SkinTemplateItem/portal_skins/erp5_core/Base_callDialogMethod.xml

Modified: erp5/trunk/products/ERP5/bootstrap/erp5_core/SkinTemplateItem/portal_skins/erp5_core/Base_callDialogMethod.xml
URL: http://svn.erp5.org/erp5/trunk/products/ERP5/bootstrap/erp5_core/SkinTemplateItem/portal_skins/erp5_core/Base_callDialogMethod.xml?rev=15559&r1=15558&r2=15559&view=diff
==============================================================================
--- erp5/trunk/products/ERP5/bootstrap/erp5_core/SkinTemplateItem/portal_skins/erp5_core/Base_callDialogMethod.xml (original)
+++ erp5/trunk/products/ERP5/bootstrap/erp5_core/SkinTemplateItem/portal_skins/erp5_core/Base_callDialogMethod.xml Wed Aug  8 14:54:19 2007
@@ -74,6 +74,17 @@
 Generic method called when submitting a form in dialog mode.\n
 Responsible for validating form data and redirecting to the form action.\n
 """\n
+\n
+# XXX We should not use meta_type properly,\n
+# XXX We need to discuss this problem.(yusei)\n
+def isListBox(field):\n
+  if field.meta_type==\'ListBox\':\n
+    return True\n
+  elif field.meta_type==\'ProxyField\':\n
+    template_field = field.getRecursiveTemplateField()\n
+    if template_field.meta_type==\'ListBox\':\n
+      return True\n
+  return False\n
 \n
 from Products.Formulator.Errors import FormValidationError\n
 from ZTUtils import make_query\n
@@ -175,7 +186,7 @@
   k = field.id\n
   v = context.REQUEST.get(k, MARKER)\n
   if v is not MARKER:\n
-    if field.meta_type == \'ListBox\':\n
+    if isListBox(field):\n
       listbox_id_list.append(k)\n
     elif can_redirect and (v in (None, [], ()) or hasattr(v, \'read\')) : # If we cannot redirect, useless to test it again\n
       can_redirect = 0\n
@@ -319,6 +330,7 @@
                             <string>dialog_category</string>
                             <string>enable_pickle</string>
                             <string>kw</string>
+                            <string>isListBox</string>
                             <string>Products.Formulator.Errors</string>
                             <string>FormValidationError</string>
                             <string>ZTUtils</string>




More information about the Erp5-report mailing list