[ https://issues.apache.org/jira/browse/OFBIZ-5371?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Michael Ende updated OFBIZ-5371: -------------------------------- Description: I experianced some problems when a form submitted parameters with prefix directly to a SimpleMethod (through the controller request). In this case the prefix is not stripped from the parameter name. The patch updates the method ModelService.java:makePrefixMap(). The idea of the prefixMap is: If you have some fields like packageweight_1(value=55), packageweight_2(value=65) ... in a form and in a service you need a map called packageweight with the following key values packageweight{1=55;2=56;...} The Problem ist that the function makePrefixMap doesn't replace the Prefix. For Example: On the "Complete" button of the Facility->Shipment screen we call an event and not the completePack service directly. The event checks some userrights and after that he call the completePack service. If we call the service from an event there throws an NumberFormatException because the packeweight-PrefixMap contains the prefixes. This is my event discription: <simple-method method-name="completePackCheckPermission" short-description="Check if this user has permission to create a picklist role" login-required="true"> <check-permission permission="LOGISTICS_CREATE"> <alt-permission permission="LOGISTICS_ADMIN"/> <fail-property resource="EcommerceLogisticsErrorUiLabels" property="NoPermissionForUsage" /> </check-permission> <check-errors /> <session-to-field field="packingSession"/> <set field="parameters.packingSession" from-field="packingSession"/> <set-service-fields service-name="completePack" to-map="serviceParameters" map="parameters" /> <call-service service-name="completePack" in-map-name="serviceParameters" /> <return /> </simple-method> was: I experianced some problems when a form submitted parameters with prefix directly to a SimpleMethod (through the controller request). In this case the prefix is not stripped from the parameter name. The patch updates the method ModelService.java:makePrefixMap(). > SimpleMethod parameters doesnt work with prefix > ----------------------------------------------- > > Key: OFBIZ-5371 > URL: https://issues.apache.org/jira/browse/OFBIZ-5371 > Project: OFBiz > Issue Type: Bug > Components: ALL COMPONENTS > Affects Versions: SVN trunk > Reporter: Michael Ende > > I experianced some problems when a form submitted parameters with prefix > directly to a SimpleMethod (through the controller request). In this case the > prefix is not stripped from the parameter name. The patch updates the method > ModelService.java:makePrefixMap(). > The idea of the prefixMap is: > If you have some fields like packageweight_1(value=55), > packageweight_2(value=65) ... in a form and in a service you need a map > called packageweight with the following key values > packageweight{1=55;2=56;...} > The Problem ist that the function makePrefixMap doesn't replace the Prefix. > For Example: > On the "Complete" button of the Facility->Shipment screen we call an event > and not the completePack service directly. > The event checks some userrights and after that he call the completePack > service. If we call the service from an event there throws an > NumberFormatException because the packeweight-PrefixMap contains the prefixes. > This is my event discription: > <simple-method method-name="completePackCheckPermission" > short-description="Check if this user has permission to create a > picklist role" > login-required="true"> > <check-permission permission="LOGISTICS_CREATE"> > <alt-permission permission="LOGISTICS_ADMIN"/> > <fail-property resource="EcommerceLogisticsErrorUiLabels" > property="NoPermissionForUsage" /> > </check-permission> > <check-errors /> > <session-to-field field="packingSession"/> > <set field="parameters.packingSession" from-field="packingSession"/> > <set-service-fields service-name="completePack" > to-map="serviceParameters" > map="parameters" /> > <call-service service-name="completePack" > in-map-name="serviceParameters" /> > <return /> > </simple-method> -- This message was sent by Atlassian JIRA (v6.1#6144)