|
Author: jleroux
Date: Sat Mar 26 09:16:10 2011 New Revision: 1085670 URL: http://svn.apache.org/viewvc?rev=1085670&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/branches/release10.04/applications/marketing/widget/ContactListScreens.xml ofbiz/branches/release10.04/applications/order/widget/ordermgr/LookupScreens.xml 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/applications/marketing/widget/ContactListScreens.xml URL: http://svn.apache.org/viewvc/ofbiz/branches/release10.04/applications/marketing/widget/ContactListScreens.xml?rev=1085670&r1=1085669&r2=1085670&view=diff ============================================================================== --- ofbiz/branches/release10.04/applications/marketing/widget/ContactListScreens.xml (original) +++ ofbiz/branches/release10.04/applications/marketing/widget/ContactListScreens.xml Sat Mar 26 09:16:10 2011 @@ -373,7 +373,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/branches/release10.04/applications/order/widget/ordermgr/LookupScreens.xml URL: http://svn.apache.org/viewvc/ofbiz/branches/release10.04/applications/order/widget/ordermgr/LookupScreens.xml?rev=1085670&r1=1085669&r2=1085670&view=diff ============================================================================== --- ofbiz/branches/release10.04/applications/order/widget/ordermgr/LookupScreens.xml (original) +++ ofbiz/branches/release10.04/applications/order/widget/ordermgr/LookupScreens.xml Sat Mar 26 09:16:10 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/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=1085670&r1=1085669&r2=1085670&view=diff ============================================================================== --- ofbiz/branches/release10.04/framework/images/webapp/images/fieldlookup.js (original) +++ ofbiz/branches/release10.04/framework/images/webapp/images/fieldlookup.js Sat Mar 26 09:16:10 2011 @@ -122,7 +122,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]; } } } @@ -206,12 +206,12 @@ var FieldLookupPopup = Class.create({ var argString = ""; if (args.length > 6) { for (var i = 6; i < args.length; i++) { - if ((viewName.indexOf("?") == -1) && (i - 5) == 1) { + if ((viewName.indexOf("?") == -1) && (i - 6) == 0) { sep = "?"; } else { sep = "&"; } - argString += sep + "parm" + (i - 5) + "=" + args[i]; + argString += sep + "parm" + (i - 6) + "=" + 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=1085670&r1=1085669&r2=1085670&view=diff ============================================================================== --- ofbiz/branches/release10.04/framework/widget/dtd/widget-form.xsd (original) +++ ofbiz/branches/release10.04/framework/widget/dtd/widget-form.xsd Sat Mar 26 09:16:10 2011 @@ -907,7 +907,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:simpleType> |
| Free forum by Nabble | Edit this page |
