I experienced 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 is 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 user rights 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 description:
<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>
jleroux: I'm not quite sure there are no side-effects, but I was not able to find one. So I will wait some time before backporting...
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1559814 13f79535-47bb-0310-9956-ffa450edef68
jquery-1.8.2 to jquery-1.10.2 which implies using jquery-migrate-1.2.1 for plugins compatiblities
jquery-ui-timepicker-addon-1.0.5 to jquery-ui-timepicker-addon-1.4.3 (using min now, better i18n)
jquery-ui-1.9.0 to jquery-ui-1.10.3
removes jquery.ui.datepicker.js now integrated in jquery.ui
jquery.hotkeys-0.7.9 to jquery.hotkeys-0.8
jquery.maskedinput-1.2.2 to jquery.maskedinput-1.3.1
jquery.validate 1.10.0 to 1.11.1
I never realised how much efforts have been put in this plugin!
I fixed an issue in JsLanguageFilesMapping generation
I removed the messages_ptbr.js and messages_ptpt.js files and the related conundrum in JsLanguageFileMappingCreator.java
untested, found not use cases OOTB
jquery.jcarousel ?(2006) to 0.3.0 (2013)
untested, found not use cases OOTB
jquery.flot 0.7 to 0.8.2 (lot of changes, still works)
removes useless flotpie.ftl
removes empty flotr folder
jquery.mobile-1.1.0-rc.1 to jquery.mobile-1.4.0
untested, found not use cases OOTB
jquery.cookie to jquery.cookie-1.4.0
Removes all useless/redundant js files (not only jQuery unused old versions)
notably removes all under images/jquery/ui/development-bundle/ui
removes now useless GooglemapMarkers.js and GooglemapSimple.js
Flat Grey application.js
moves jQuery(document).ready(function() at bottom (spotted in Chrome console)
css
I did not find much issues, I spotted the title bar of the lookups, but got it fixed after some efforts.
Issues:
Imagemanagement: I got issues while testing, actually I'm not quite qure how it works, even in stable demo. It should be validated again. I commit nevertheless my changes:
moves js part from product to images component
removes useless calls to js files (mostly in imagemanagement, but not only)
renames jquery.min.js to sizzle.min.js.
Inside sizzle.min.js, updates the Dojo part to v1.10.17-pre and removes the jQuery part
changes to use ofbizContentUrl macro for generating js calls
jquery.rotate.js NOT! It's jQueryRotateCompressed.js http://markmail.org/message/dit3dlh3ph4jnenp
Got ERROR 22001: A truncation error was encountered trying to shrink VARCHAR 'D:\projectsASF\ofbizClean\framework\images\webapp\images\pro&' to length 100. I opened OFBIZ-5501 for that
I tried to update jstree to jstree 3 but gave up. I let the jquery.jstree-3.0.0-beta3 files in place in case someone would give it a chance...
Not related but while a it:
removes <!--flot example requests--> from birt controller (moved recently to example component)
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1559769 13f79535-47bb-0310-9956-ffa450edef68
Since it uses "GET" method to submit the pagination request, it's restricted by the URL max length limitation.
The patch attached changes the submit way from GET to "POST" if total length of URL > 2k.
jleroux: I also sort of (found after it was due to it) reverted r1204170, I don't see the reason for this now, and it was uselessly duplicating the current entry in the page size dropdown
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1559338 13f79535-47bb-0310-9956-ffa450edef68
This is rather a defensive patch which secure json response on services calls.
It might need some changes in custom code if (not recommended) an Ajax GET response is used... The util.js scrpt is introduced for that, though normally should not be needed...
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1557462 13f79535-47bb-0310-9956-ffa450edef68
It actually does more than that. It follows Adrian's proposition of improving the GeoPoint data model.
I did not applies all of Adrian's proposition (see our conversation in the Jira issue). Feel free to apply it completely if you are inclined so.
I will also add an entry in wiki page "Revisions Requiring Data Migration (upgrade ofbiz)" at https://cwiki.apache.org/confluence/pages/viewpage.action?pageId=7045166
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1557447 13f79535-47bb-0310-9956-ffa450edef68
And definitively fixes issues with i18n of geolocation
It introduces a "locale" attribute to the "set" operation in widget (I only tested screen, form is quite similar, should be ok) and minilang.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1554681 13f79535-47bb-0310-9956-ffa450edef68
What I did:
Upgraded from Google Maps API 2 to 3, which also means removing the keys in general.properties. They are no longer needed in API-3 (at least for our demo and local test uses), one worry less!
Refactored Google Maps code in geolocation.ftl: put more things in common, simplified code (the API-3 is better from this POV).
For OpenLayers, due to most browsers now rejecting mixed content (HTTP vs HTTPS), I had to follow their advice and put OpenLayers-2.13.1.js + images and theme(finally not used) in the framework. Not a big deal in term of size but again one more lib to worry about. Anyway geolocation is not vital for OFBiz. I have also added a zoom and navigation widget in maps. Note that IE warns about mixed content, but you can bypass it.
While working on editGeoLocation (in Party) I noticed it does not update the elevation. I found it was possible http://www.daftlogic.com/sandbox-google-maps-find-altitude.htm but I did not implement it, lack of time...
Also I got once a NPE in CallSimpleMapProcessor (when using editGeoLocation) but was unable to reproduce (w/o changes before and after)
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1554536 13f79535-47bb-0310-9956-ffa450edef68
So I revert them for now, they are not needed yet for the INFRA-3590 progresses anyway, only the portoffset parameter is needed.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1553975 13f79535-47bb-0310-9956-ffa450edef68
This was waiting for a moment in my working copy after I found that there was an issue with testSOAPSimpleService when portoffset was used with run-tests target.
I have still no resolved this issue, but since I got a better way to run simultaneous Buildbot instances this is no longer an issue for run-tests target.
So I commit these small pending changes in order to allow to run Sonar on OFBiz https://issues.apache.org/jira/browse/INFRA-3590.
The cobertura target does not work yet but what's committed here is needed anyway to progress with INFRA-3590.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1553962 13f79535-47bb-0310-9956-ffa450edef68
IMPORTANT: This commit might break some applications. If you get ClassCastExceptions, then you need to change the field type in your entity from blob to either byte-array or object. The change will have no effect on your database - because they are all persisted as BLOB SQL types.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1553890 13f79535-47bb-0310-9956-ffa450edef68
The method "renderLink" of new class MacroMenuRenderer calls the WidgetWorker.determineAutoLinkType. When menuItem.getDisabled() is true, the link target will be set to null and NPE occurs.
jleroux: This was related with r1517353 and r1537833. The Leon's patch fixes r1517353 and this commits also reverts r1537833
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1553887 13f79535-47bb-0310-9956-ffa450edef68
No matter how I set "sequence-bank-size" for an entity (in my example, its "EntityAuditLog"), the bank size is always default value "10".
It seems that this feature was lost by a serials update of revision 922724 to 922733 submitted by doogie.
jleroux: This thread http://markmail.org/message/ifosqek74gqtv7fz trace the root cause
Leon's fix is safe from a concurrency perspective. I just added a check on SequenceBank.maxBankSize and put some doc in the XSD
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1551744 13f79535-47bb-0310-9956-ffa450edef68
Removes all empty ones
Removes some redundant/duplicates ones (please committers don't commit those again, I know it's not easy to catch, hopefully now we should have less of them)
Automatically replaces some tabs
Few French labels improvements
Removes 2 orphan entries ("ja" & "cs")
Fixes the schema header of WebtoolsUiLabels.xml
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1551594 13f79535-47bb-0310-9956-ffa450edef68
There are 2 issues with the existing code.
1 - floor is applied to viewSize only not the computed value
2 - if the listSize divides with viewSize evenly, you'll get one extra
eg
24/2=12 - no of pages = 13
24/5=4.8 - no of pages = 5
Change to correctly calculate the number of pages using ceiling rather than floor
To repoduce this I went into find party screen, search for all and manually set the view size (I had to click next and change the VIEW_SIZE parameter in the url).
In my description I mention 24/2=12 and 24/5=4.8,
24 is number of parties I had
2/5 is the view size
It does not matter what the item size is (as long as its more than 0), you just have to make sure listSize divides by viewSize evenly. In my case 24/2 divided evenly and which should have have given 12 pages but gave 13.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1550201 13f79535-47bb-0310-9956-ffa450edef68
Not a big deal(because it should be very rarely changed during a session + with cache cleared) but I did not want to have final here. I tried this "save action" in Eclipse (on private variable) but finally decided to remove it.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1549026 13f79535-47bb-0310-9956-ffa450edef68
Which will mostly be used to simultaneously run official demos without having to create patches, I forgot the portOffset for websites and url.properties ports values.
This fixes this point. I also did in it RequestHandler class though the getDefaultServerRootUrl() method is now deprecated.
To be consistent with r1547186 I will backport in R13.07
People should be aware that this will change the ports values of websites and url.properties ports values which in some cases could be an unwanted side effect.
Anyway the portOffset feature is not destined to be used in production environments where websites and url.properties ports values are often changed purposely
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1549015 13f79535-47bb-0310-9956-ffa450edef68
This has been discussed before, but I will mention it again for instruction: GenericEntity instances that are kept in the entity cache are shared among multiple threads. Therefore, they must be immutable. If you get a GenericEntity instance from the cache and you want to modify it, you must clone it first.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1547790 13f79535-47bb-0310-9956-ffa450edef68
Also moved web application authorization code from the Flat Grey visual theme to LoginWorker.java. This change needs to be copied to other visual themes as well.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1546891 13f79535-47bb-0310-9956-ffa450edef68