Author: jleroux
Date: Sat Mar 26 09:17:17 2011 New Revision: 1085671 URL: http://svn.apache.org/viewvc?rev=1085671&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 An improved patch for target-parameter functionality, now paramI indexing start with I=0 instead of 1. JLR: I have updated the XSD to tell it must begin at 0 Modified: ofbiz/trunk/applications/marketing/widget/ContactListScreens.xml ofbiz/trunk/applications/order/widget/ordermgr/LookupScreens.xml ofbiz/trunk/framework/images/webapp/images/fieldlookup.js ofbiz/trunk/framework/widget/dtd/widget-form.xsd Modified: ofbiz/trunk/applications/marketing/widget/ContactListScreens.xml URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/marketing/widget/ContactListScreens.xml?rev=1085671&r1=1085670&r2=1085671&view=diff ============================================================================== --- ofbiz/trunk/applications/marketing/widget/ContactListScreens.xml (original) +++ ofbiz/trunk/applications/marketing/widget/ContactListScreens.xml Sat Mar 26 09:17:17 2011 @@ -401,7 +401,7 @@ under the License. <set field="labelTitleProperty" value="PageTitlePreferredContactMech"/> <set field="title" value="${uiLabelMap.PageTitlePreferredContactMech}"/> <set field="donePage" from-field="parameters.DONE_PAGE" default-value="/marketing/control/ListContactLists"/> - <set field="partyId" from-field="parameters.parm1"/> + <set field="partyId" from-field="parameters.parm0"/> <set field="entityName" value="PartyAndContactMech"/> <set field="searchFields" value="[contactMechId, partyId, infoString, paToName, paAddress1]"/> </actions> Modified: ofbiz/trunk/applications/order/widget/ordermgr/LookupScreens.xml URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/order/widget/ordermgr/LookupScreens.xml?rev=1085671&r1=1085670&r2=1085671&view=diff ============================================================================== --- ofbiz/trunk/applications/order/widget/ordermgr/LookupScreens.xml (original) +++ ofbiz/trunk/applications/order/widget/ordermgr/LookupScreens.xml Sat Mar 26 09:17:17 2011 @@ -137,7 +137,7 @@ under the License. <actions> <property-map resource="OrderUiLabels" map-name="uiLabelMap" global="true"/> <set field="title" value="${uiLabelMap.PageTitleLookupCustomerRequestItem}"/> - <set field="custRequestId" from-field="parameters.custRequestId" default-value="${parameters.parm1}"/> + <set field="custRequestId" from-field="parameters.custRequestId" default-value="${parameters.parm0}"/> <set field="queryString" from-field="result.queryString"/> <set field="viewIndex" from-field="parameters.VIEW_INDEX" type="Integer"/> <set field="viewSize" from-field="parameters.VIEW_SIZE" type="Integer" default-value="20"/> @@ -190,7 +190,7 @@ under the License. <actions> <property-map resource="OrderUiLabels" map-name="uiLabelMap" global="true"/> <set field="title" value="${uiLabelMap.PageTitleLookupQuoteItem}"/> - <set field="quoteId" from-field="parameters.quoteId" default-value="${parameters.parm1}"/> + <set field="quoteId" from-field="parameters.quoteId" default-value="${parameters.parm0}"/> <set field="queryString" from-field="result.queryString"/> <set field="viewIndex" from-field="parameters.VIEW_INDEX" type="Integer"/> <set field="viewSize" from-field="parameters.VIEW_SIZE" type="Integer" default-value="20"/> Modified: ofbiz/trunk/framework/images/webapp/images/fieldlookup.js URL: http://svn.apache.org/viewvc/ofbiz/trunk/framework/images/webapp/images/fieldlookup.js?rev=1085671&r1=1085670&r2=1085671&view=diff ============================================================================== --- ofbiz/trunk/framework/images/webapp/images/fieldlookup.js (original) +++ ofbiz/trunk/framework/images/webapp/images/fieldlookup.js Sat Mar 26 09:17:17 2011 @@ -121,7 +121,7 @@ function lookup_popup2(view_name) { if (this.args != null) { if (this.args.length > 2) { for (var i = 2; i < this.args.length; i++) { - argString += "&parm" + (i - 2) + "=" + this.args[i]; + argString += "&parm" + (i - 3) + "=" + this.args[i]; } } } @@ -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+1) + "=" + jQuery(args[i]).val(); + requestUrlAndArgs += "&parm" + i + "=" + 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=1085671&r1=1085670&r2=1085671&view=diff ============================================================================== --- ofbiz/trunk/framework/widget/dtd/widget-form.xsd (original) +++ ofbiz/trunk/framework/widget/dtd/widget-form.xsd Sat Mar 26 09:17:17 2011 @@ -957,7 +957,7 @@ under the License. <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, begins at 1) 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, I must begin at 0) 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> |
Free forum by Nabble | Edit this page |