You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ofbiz.apache.org by jl...@apache.org on 2011/03/23 14:12:37 UTC

svn commit: r1084572 - in /ofbiz/branches/release10.04/framework: images/webapp/images/fieldlookup.js widget/dtd/widget-form.xsd

Author: jleroux
Date: Wed Mar 23 13:12:37 2011
New Revision: 1084572

URL: http://svn.apache.org/viewvc?rev=1084572&view=rev
Log:
A patch from Deepak Dixit "Lookup target-parameter in form widget is not working." https://issues.apache.org/jira/browse/OFBIZ-4225 - OFBIZ-4225

There is a target-parameter for lookup, Currently it's not working.
We can test it over at https://localhost:8443/ordermgr/control/request page. 


I have added a small change in the XSD to tell it should begin at one(1)

Modified:
    ofbiz/branches/release10.04/framework/images/webapp/images/fieldlookup.js
    ofbiz/branches/release10.04/framework/widget/dtd/widget-form.xsd

Modified: ofbiz/branches/release10.04/framework/images/webapp/images/fieldlookup.js
URL: http://svn.apache.org/viewvc/ofbiz/branches/release10.04/framework/images/webapp/images/fieldlookup.js?rev=1084572&r1=1084571&r2=1084572&view=diff
==============================================================================
--- ofbiz/branches/release10.04/framework/images/webapp/images/fieldlookup.js (original)
+++ ofbiz/branches/release10.04/framework/images/webapp/images/fieldlookup.js Wed Mar 23 13:12:37 2011
@@ -204,14 +204,14 @@ var FieldLookupPopup = Class.create({
     initialize: function (target, viewName, lookupWidth, lookupHeight, position, fadeBackground, args) {
         if (args != null) {
             var argString = "";
-            if (args.length > 7) {
-                for (var i = 7; i < args.length; i++) {
-                    if ((viewName.indexOf("?") == -1) && (i - 6) == 1) {
+            if (args.length > 6) {
+                for (var i = 6; i < args.length; i++) {
+                    if ((viewName.indexOf("?") == -1) && (i - 5) == 1) {
                         sep = "?";
                     } else {
                         sep = "&";
                     }
-                    argString += sep + "parm" + (i - 6) + "=" + args[i];
+                    argString += sep + "parm" + (i - 5) + "=" + args[i];
                 }
             viewName += argString;
             }

Modified: ofbiz/branches/release10.04/framework/widget/dtd/widget-form.xsd
URL: http://svn.apache.org/viewvc/ofbiz/branches/release10.04/framework/widget/dtd/widget-form.xsd?rev=1084572&r1=1084571&r2=1084572&view=diff
==============================================================================
--- ofbiz/branches/release10.04/framework/widget/dtd/widget-form.xsd (original)
+++ ofbiz/branches/release10.04/framework/widget/dtd/widget-form.xsd Wed Mar 23 13:12:37 2011
@@ -451,8 +451,8 @@ under the License.
         </xs:attribute>
         <xs:attribute name="use-when" type="xs:string">
             <xs:annotation><xs:documentation>
-                Used to specify a condition that must be true to use this field; the condition should be written using the 
-                Java syntax and can operate on values in the form context; conditional fields are evaluated in reverse 
+                Used to specify a condition that must be true to use this field; the condition should be written using the
+                Java syntax and can operate on values in the form context; conditional fields are evaluated in reverse
                 order so the last field defined that evaluates to true is the one that is rendered.
             </xs:documentation></xs:annotation>
         </xs:attribute>
@@ -904,10 +904,10 @@ under the License.
         <xs:attribute type="xs:positiveInteger" name="maxlength"/>
         <xs:attribute type="xs:string" name="default-value"/>
         <xs:attribute type="xs:string" name="description-field-name">
-            <xs:annotation><xs:documentation>The name of a field whose value is also filled when coming back from lookup selection.</xs:documentation></xs:annotation>            
+            <xs:annotation><xs:documentation>The name of a field whose value is also filled when coming back from lookup selection.</xs:documentation></xs:annotation>
         </xs:attribute>
         <xs:attribute type="xs:string" name="target-parameter">
-            <xs:annotation><xs:documentation>The name of a field whose value is passed in as a parameter to the lookup target form. Can be a comma separated list. You need to affect it the value using parameters.parmI (where I is the position number in the list)in the related lookup screen. See LookupPreferredContactMech as example</xs:documentation></xs:annotation>
+            <xs:annotation><xs:documentation>The name of a field whose value is passed in as a parameter to the lookup target form. Can be a comma separated list. You need to affect it the value using parameters.parmI (where I is the position number in the list, begins at 1) in the related lookup screen. See LookupPreferredContactMech as example</xs:documentation></xs:annotation>
         </xs:attribute>
         <xs:attribute name="client-autocomplete-field" default="true">
             <xs:simpleType>