svn commit: r1084574 - in /ofbiz/trunk/framework: images/webapp/images/fieldlookup.js widget/dtd/widget-form.xsd

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

svn commit: r1084574 - in /ofbiz/trunk/framework: images/webapp/images/fieldlookup.js widget/dtd/widget-form.xsd

jleroux@apache.org
Author: jleroux
Date: Wed Mar 23 13:14:34 2011
New Revision: 1084574

URL: http://svn.apache.org/viewvc?rev=1084574&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/trunk/framework/images/webapp/images/fieldlookup.js
    ofbiz/trunk/framework/widget/dtd/widget-form.xsd

Modified: ofbiz/trunk/framework/images/webapp/images/fieldlookup.js
URL: http://svn.apache.org/viewvc/ofbiz/trunk/framework/images/webapp/images/fieldlookup.js?rev=1084574&r1=1084573&r2=1084574&view=diff
==============================================================================
--- ofbiz/trunk/framework/images/webapp/images/fieldlookup.js (original)
+++ ofbiz/trunk/framework/images/webapp/images/fieldlookup.js Wed Mar 23 13:14:34 2011
@@ -255,7 +255,7 @@ function ConstructLookup(requestUrl, inp
             var requestUrlAndArgs = requestUrl;
             if (typeof args == "object" && jQuery.isArray(args)) {
                 for (var i = 0; i < args.length; i++) {
-                        requestUrlAndArgs += "&parm" + i + "=" + jQuery(args[i]).val();
+                        requestUrlAndArgs += "&parm" + (i+1) + "=" + jQuery(args[i]).val();
                 }
             }
             jQuery("#" + lookupId).load(requestUrlAndArgs, function(data){

Modified: ofbiz/trunk/framework/widget/dtd/widget-form.xsd
URL: http://svn.apache.org/viewvc/ofbiz/trunk/framework/widget/dtd/widget-form.xsd?rev=1084574&r1=1084573&r2=1084574&view=diff
==============================================================================
--- ofbiz/trunk/framework/widget/dtd/widget-form.xsd (original)
+++ ofbiz/trunk/framework/widget/dtd/widget-form.xsd Wed Mar 23 13:14:34 2011
@@ -716,7 +716,7 @@ under the License.
         <xs:attribute type="xs:string" name="image-location">
             <xs:annotation><xs:documentation>Specifies the image to display.</xs:documentation></xs:annotation>
         </xs:attribute>
-        <xs:attribute type="xs:string" name="default-value">        
+        <xs:attribute type="xs:string" name="default-value">
             <xs:annotation><xs:documentation>Specifies a string to be displayed if the field is empty.</xs:documentation></xs:annotation>
         </xs:attribute>
     </xs:attributeGroup>
@@ -954,10 +954,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:annotation><xs:documentation>Tells the browser whether or not to try and autocomplete with values previously entered. Default to true.</xs:documentation></xs:annotation>