Commit Graph
10472 Commits
Author SHA1 Message Date
Adrian Crum 934d162622 Small fixup for EntityEcaCondition.java accessor method.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1447638 13f79535-47bb-0310-9956-ffa450edef68
2013-02-19 09:02:24 +00:00
Sascha Rodekamp 7b0fd3e806 In an exception case the ServiceUtils.setServiceFields method should throw an exception and don't hide it.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1447603 13f79535-47bb-0310-9956-ffa450edef68
2013-02-19 07:18:10 +00:00
Sascha Rodekamp e8ff62f756 Add a small method to the ServiceUtil Class which checks all incoming service attributes and look for fields with the same name in the incoming map and copy those onto the outgoing map. Also includes a userLogin if service requires one.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1447246 13f79535-47bb-0310-9956-ffa450edef68
2013-02-18 13:26:00 +00:00
Adrian Crum 88d0052633 Small fixup for my previous commit.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1447114 13f79535-47bb-0310-9956-ffa450edef68
2013-02-18 01:13:10 +00:00
Adrian Crum 4ec75ee3c7 Small enhancements to Entity ECA classes: improve thread safety, eliminate null checks on fields that are never null, add some accessor methods, small code cleanups.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1447112 13f79535-47bb-0310-9956-ffa450edef68
2013-02-18 01:03:58 +00:00
Adrian Crum b0014ab3f6 Small enhancements to EntityEcaRule.java: parse <eca> element only once, improve thread safety, add some accessor methods.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1447108 13f79535-47bb-0310-9956-ffa450edef68
2013-02-18 00:10:25 +00:00
Adrian Crum 6dec952bc7 EntityEcaSetField.java bug fixes: test for null on field that was never null, not thread-safe.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1447107 13f79535-47bb-0310-9956-ffa450edef68
2013-02-18 00:01:52 +00:00
Adrian Crum 3caa1e66d3 Small improvements to ApacheFopWorker: check for file/folder existence before applying settings.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1446940 13f79535-47bb-0310-9956-ffa450edef68
2013-02-16 20:43:38 +00:00
Adrian Crum 9b6b06c44a Reverting revision 1345849 because it is not thread-safe and it doesn't work.
It appears this was an attempt to create per-tenant FOP factories, but instead each tenant overwrites the previous FOP factory settings.

A proper implementation would require a FOP factory cache keyed by delegator name.


git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1446913 13f79535-47bb-0310-9956-ffa450edef68
2013-02-16 16:31:31 +00:00
Adrian Crum a0402a0d38 Small improvement to Web Tools services screen: Add service definition location.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1446885 13f79535-47bb-0310-9956-ffa450edef68
2013-02-16 12:37:20 +00:00
Jacques Le Roux 975a7dc9ce A patch from Shi Jinghai for "Chinese localizations (zh) for trunk (Part II)" https://issues.apache.org/jira/browse/OFBIZ-5137
Translated missing zh labels for several components.





git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1446852 13f79535-47bb-0310-9956-ffa450edef68
2013-02-16 08:49:01 +00:00
Jacques Le Roux 76da9bea54 A patch from Shi Jinghai for "Chinese localizations (zh) for trunk" https://issues.apache.org/jira/browse/OFBIZ-5134
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1446849 13f79535-47bb-0310-9956-ffa450edef68
2013-02-16 08:08:38 +00:00
Jacques Le Roux 364b3cd1e6 A patch from Nicolas Malin for "fieldGroup will ignored if all contains fields are ignored" https://issues.apache.org/jira/browse/OFBIZ-5136
When you have a fieldGroup that contains fields with use-when attribute, if all fields aren't use, the fieldGroup is empty.
Improvment: to not display the field group



git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1446847 13f79535-47bb-0310-9956-ffa450edef68
2013-02-16 07:49:28 +00:00
Jacques Le Roux e18c34f93d A patch from Shi Jinghai for "Chinese localizations (zh) for trunk" https://issues.apache.org/jira/browse/OFBIZ-5134
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1446482 13f79535-47bb-0310-9956-ffa450edef68
2013-02-15 09:11:54 +00:00
Jacques Le Roux 8afa159480 A patch from Chatree Srichart for "Ignore "tenant" data files if the multitenant property is "N"" https://issues.apache.org/jira/browse/OFBIZ-4934
The system does not need to load tenant data files if the multitenant property in general.properties is "N". I created a patch to ignore the tenant data files when run ./ant load-demo command.


git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1444370 13f79535-47bb-0310-9956-ffa450edef68
2013-02-09 14:39:29 +00:00
Ashish Vijaywargiya 54935d7db8 No functional changes, Formatted the file as per best practice that we follow in FTL files. Thanks Deepak!
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1442197 13f79535-47bb-0310-9956-ffa450edef68
2013-02-04 17:40:56 +00:00
Jacques Le Roux 82b9ee64f3 A patch from Taher Alkhateeb for "Corrections and improvements to dependent drop-downs" https://issues.apache.org/jira/browse/OFBIZ-5126
* The getDependentDropdownValues function in miscAjaxFunctions.js is modified with a new argument to allow for empty selections. Therefore, copying the behavior of form widget drop-down's "allow-empty"
* There is only one file affected by item number 2 above, therefore, I fixed it to include the argument in getDependentDropdownValues

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1438501 13f79535-47bb-0310-9956-ffa450edef68
2013-01-25 13:27:54 +00:00
Jacques Le Roux 8699dd1f03 A patch from Taher Alkhateeb for "Corrections and improvements to dependent drop-downs" https://issues.apache.org/jira/browse/OFBIZ-5126
The setDependentDropdownValuesJs.ftl is using an incorrect argument which usually happens to work because it is a duplicate of another.

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1438498 13f79535-47bb-0310-9956-ffa450edef68
2013-01-25 13:22:58 +00:00
Jacques Le Roux 54dfb7ea95 A patch from Martin Kreidenweis "Delegator creation fails with new ExecutionPool on trunk" https://issues.apache.org/jira/browse/OFBIZ-4335
The problem is that the wrong class loader is used for the "ofbiz-config-*" threads (NativeLibClassLoader instead of CachedClassLoader). This happens when the threads are created by the static code in ExecutionPool.java when it is executed before the ClassLoaderContainer.init() initializes the CachedClassLoader.

This also causes other problems like: The local resolution of XML Schema files won't work any more because it's also using the wrong classloader, which can't find the XSD files:

[java] 2011-07-21 12:21:45,333 (ofbiz-config-0) [                 UtilXml:1022:WARN ] [UtilXml.LocalResolver.resolveEntity] could not find LOCAL DTD/Schema with publicId [null] and the file/resource is [service-eca.xsd]

You can trigger this behavior in current ofbiz trunk by setting an expire time for the properties cache in cache.properties

properties.UtilPropertiesResourceCache.expireTime=10000

The Debug.log() statements in the ContainerLoader then load the logging configuration properties file and cache it. If an expire time is set, the ExecutionPool is used and creates the "ofbiz-config-*" threads too early.

By not pre-starting the "ofbiz-config-*" threads in the static code (patch above), the threads are then created later on, when the "main" thread classloader has become the CachedClassLoader and everythings starts working again. 

jleroux: 
* I don't see any issues, but performance, to not start the whole core threads. This is BTW the default behaviour. So I'd recommend to use it for GLOBAL_EXECUTOR.
* I also removed the useless deprecated methods

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1435701 13f79535-47bb-0310-9956-ffa450edef68
2013-01-19 21:05:23 +00:00
Jacques Le Roux 99199dd213 https.www.ofbiz.it does not exist anymore
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1435529 13f79535-47bb-0310-9956-ffa450edef68
2013-01-19 12:31:35 +00:00
Jacques Le Roux cd2c556b8b A patch from Sumit Pandit for "HTML Validation error - Duplicate DIV id is created in <screenlet title=...></screenlet> tag." https://issues.apache.org/jira/browse/OFBIZ-5121
When ID has not been provided in <screenlet title=.../> tag, The generated DIV has an ID="_col". Including multiple screenlet in a page get result in multiple DIVs with duplicate ID ("_col"). 

For reference find duplicate div id("_col") in following page -  
https://demo-trunk.ofbiz.apache.org/catalog/control/EditProdCatalogCategories?prodCatalogId=DemoCatalog 



git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1435528 13f79535-47bb-0310-9956-ffa450edef68
2013-01-19 12:27:25 +00:00
Jacques Le Roux bb024a2951 Better simpler comment
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1432858 13f79535-47bb-0310-9956-ffa450edef68
2013-01-14 09:59:05 +00:00
Jacques Le Roux 4f7d1dc425 No functional change, forgot this one
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1432856 13f79535-47bb-0310-9956-ffa450edef68
2013-01-14 09:52:43 +00:00
Jacopo Cappellato 3f710e8113 CVE-2013-0177: The Image.alt is now escaped to prevent the risk of an XSS attack.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1432833 13f79535-47bb-0310-9956-ffa450edef68
2013-01-14 08:33:04 +00:00
Jacques Le Roux 6206381afb Those 2 are meaningless here
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1432593 13f79535-47bb-0310-9956-ffa450edef68
2013-01-13 11:34:30 +00:00
Jacques Le Roux e40ecf7476 Made something stupid with date.timezone.js path before committing
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1432591 13f79535-47bb-0310-9956-ffa450edef68
2013-01-13 11:24:04 +00:00
Jacques Le Roux a3ebcd8855 I discovered while using trunk demo that getServerTimestampAsLong is not enough. Because Javascript always creates the dates without taking into account the TimeZone. I mean there are OOTB no ways to do otherwise and date.format.js does not help. This makes sense from a HTTP client perspective, but nowadays it's really aging with Ajax, etc.
Fortunately there is a miraculous script which helps much: date.timezone.js. I have introduced it with a getServerTimeZone service. I tested locally by setting another timezone on another machine and it worked. I will now test it on trunk, I don't expect any issues

I also cleaned the NOTICE for famfamfam




git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1432577 13f79535-47bb-0310-9956-ffa450edef68
2013-01-13 10:22:09 +00:00
Jacques Le Roux f1fd26862c https://issues.apache.org/jira/browse/OFBIZ-5109
"Allow a whole controller or/and request/s to override a default 302 in case of redirect"

Since I did not get any feedbacks but Paul's, I decided to use 302 as default instead of 303.
The reason is like that nobody will be surprised. The same (bad for SEO) default than Java will be used.

Please test and review, and let's discuss it more if wanted...


git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1432567 13f79535-47bb-0310-9956-ffa450edef68
2013-01-13 08:46:35 +00:00
Jacopo Cappellato 33ee8492a4 The content of the Screenlet title is now escaped to prevent the risk of an XSS attack.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1432392 13f79535-47bb-0310-9956-ffa450edef68
2013-01-12 07:49:20 +00:00
Jacques Le Roux 8e737e4107 At Jacopo's request assign PoolableConnectionFactory super class rather
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1431249 13f79535-47bb-0310-9956-ffa450edef68
2013-01-10 10:02:58 +00:00
Jacques Le Roux 787ac84f63 In "Memory leak due to transaction management using DBCP and MySQL" https://issues.apache.org/jira/browse/OFBIZ-5122 Jose Manuel Vivó Arnal reported that I missed to apply the patch from OFBIZ-2599, just handled the DBPC part, and Philippe Mouawad did not notice.
OK, so it was just a matter of replacing 
PoolableConnectionFactory factory = new PoolableConnectionFactory(xacf, pool, null, null, true, true);
by
PoolableManagedConnectionFactory factory = new PoolableManagedConnectionFactory(xacf, pool, null, null, true, true);

The rest are only imports cleaning.

Too bad we did not notice that for 3.5 years. It seems it does not affect servers with plenty of memory, or updated often enough. But I recommend to upgrade of course...

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1431191 13f79535-47bb-0310-9956-ffa450edef68
2013-01-10 05:32:48 +00:00
Jacques Le Roux 7796afcc18 At Adrian's request: clarify getServerTimestamp service with now a new getServerTimestampAsLong specific to the webtools jobs list
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1427819 13f79535-47bb-0310-9956-ffa450edef68
2013-01-02 15:05:17 +00:00
Jacques Le Roux 7fbfa59de1 Server hour on webtools jobs list: no functional changes, just a trivial refactoring of ServerHour24HourFormatJs.ftl
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1427247 13f79535-47bb-0310-9956-ffa450edef68
2012-12-31 21:59:04 +00:00
Jacques Le Roux 4bc9aff69c Complete the server hour on webtools jobs list, with the help of Adrian and Atul
Remarks: 
* Finally date.format-1.2.3-min.js is quite useful
* I renamed the getServerHour service to getServerTimestamp. It now returns a Long, easier to parse to a date in javascript
* I renamed WindowClockJs.ftl to ServerHour24HourFormatJs.ftl

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1427233 13f79535-47bb-0310-9956-ffa450edef68
2012-12-31 19:50:54 +00:00
Jacques Le Roux 98f9905f0b Complete the work on server hour for the webtools job list.
* Now uses real server hour
* Renames getDependentDropdownValues.js into miscAjaxFunctions.js, that it is really
* Introduces a minimized version of date.format: date.format-1.2.3-min.js


git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1426904 13f79535-47bb-0310-9956-ffa450edef68
2012-12-30 07:33:26 +00:00
Jacques Le Roux e1841ff96b I wanted to have the server hour on the webtools job list, not a bid deal, hé?
As ever, turns it's always more complicated than thought. 
For instance jQuery, even with $.datepicker.formatDate, is not able to format a date + time correctly :/
So I added a new js script: date.format-1.2.3.js. It's only 4kb, I tried to compress it online, did not work, gave up.

This is pretty basic, enough for the needs and can be easily extended when more is needed

5 mins later:

Yikes, this was pretty stupid. I completly forgot about what I thought 2 weeks ago: it's from the server I need the date-time, so I need a json service.
Then, today, I completly forgot about it, and thought again: OK, it will consume less ressources w/out a service, if  I only use javascript. A senior moment  I guess :/

I will rewrite that later, to have the real server hour...
However, the mechanism I quickly built can still be pretty useful in some cases...


git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1426848 13f79535-47bb-0310-9956-ffa450edef68
2012-12-29 22:08:19 +00:00
Jacques Le Roux 9422708785 A patch from Olivier Heintz for "My Portal Preferences error" https://issues.apache.org/jira/browse/OFBIZ-5073
Select My Portal > Preferences, displays bellow error.
org.ofbiz.widget.screen.ScreenRenderException: Error rendering screen [component://common/widget/CommonScreens.xml#GlobalDecorator]: java.lang.NullPointerException (null)




git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1426734 13f79535-47bb-0310-9956-ffa450edef68
2012-12-29 10:02:15 +00:00
Jacques Le Roux f62933059d No functional changes
I tried to use the non useLog4J branch and localised it to show more like how useLog4J renders. But I found some issues with (time was not in sync useLog4J when I used both) and finally did not use it. So it's only the l10n part
I also added a convenient get()

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1426606 13f79535-47bb-0310-9956-ffa450edef68
2012-12-28 18:47:02 +00:00
Jacques Le Roux b14d7c1ab9 Those are not needed and even counter productive now, see discussion on dev ML http://markmail.org/message/mqe6c6qm2rofa4gg
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1426605 13f79535-47bb-0310-9956-ffa450edef68
2012-12-28 18:32:23 +00:00
Jacques Le Roux efbe0f3fa6 Du bon usage du français
http://www.etudes-litteraires.com/forum/topic9238-je-suis-francais-un-francais-majuscule-ou-minuscule.html
http://fr.wikipedia.org/wiki/Usage_des_majuscules_en_fran%C3%A7ais


git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1426604 13f79535-47bb-0310-9956-ffa450edef68
2012-12-28 18:26:50 +00:00
Jacques Le Roux d1e94dde53 A patch from Deepak Dixit "Editing of product suppliers is not working for the Germany locale" https://issues.apache.org/jira/browse/OFBIZ-4769
Thanks to Christian, Paul, Deepak, Adrian and I :)


git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1426231 13f79535-47bb-0310-9956-ffa450edef68
2012-12-27 15:51:10 +00:00
Hans Bakker 68d5842339 Nice contribution from Nicolas, now be able to modify and delete database records using the framework import function: https://issues.apache.org/jira/browse/OFBIZ-4949
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1425813 13f79535-47bb-0310-9956-ffa450edef68
2012-12-26 04:19:34 +00:00
Jacques Le Roux 5ab0bb220f Reverts r1425716, 3 tests don't pass.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1425731 13f79535-47bb-0310-9956-ffa450edef68
2012-12-25 09:06:51 +00:00
Jacques Le Roux 7069d5e374 Fix "Editing of product suppliers is not working for the Germany locale" https://issues.apache.org/jira/browse/OFBIZ-4769
Thanks to Christian, Paul, Deepak and Adrian


git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1425716 13f79535-47bb-0310-9956-ffa450edef68
2012-12-25 04:26:42 +00:00
Jacques Le Roux e854399552 This was wrong since r759871 (reversed test)
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1425662 13f79535-47bb-0310-9956-ffa450edef68
2012-12-24 16:09:50 +00:00
Erwan de Ferrieres 82a83fd8f5 missing fk-name for CountryAddressFormat entity, causing error messages when starting OFBiz
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1425146 13f79535-47bb-0310-9956-ffa450edef68
2012-12-21 21:07:01 +00:00
Jacques Le Roux f4240a19ff Commented out testLimitOffsetOptions() because it makes the framework dependent on the content component.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1422796 13f79535-47bb-0310-9956-ffa450edef68
2012-12-17 08:46:53 +00:00
Jacques Le Roux a59da36f7a A patch from Shi Jinghai for "Support MySQL and Postgres's LIMIT and OFFSET options" https://issues.apache.org/jira/browse/OFBIZ-4346
Change the existing code to support the different syntax variations, and add an attribute to the datasource element in the entityengine.xml file so that the proper variation can be chosen for each database.
Inspired by Moqui code. Test successful


git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1422221 13f79535-47bb-0310-9956-ffa450edef68
2012-12-15 11:20:13 +00:00
Jacques Le Roux 7b9ab76baf A patch from Naofumi Fukue for "javascript error in hidden form" https://issues.apache.org/jira/browse/OFBIZ-5098
HtmlMenuRenderer generates like bellow form tags. It generates double target="_BLANK" , then cause javascript error.

<li><form method="post" action="/ar/control/invoice.pdf" target="_BLANK" name="InvoiceSubTabBar_pdf_LF_8"><input name="invoiceId" value="8010" type="hidden"/></form><a target="_BLANK" href="javascript:document.InvoiceSubTabBar_pdf_LF_8.submit()">PDF</a></li>

document.InvoiceSubTabBar_pdf_LF_8 is undefined @ javascript:document.InvoiceSubTabBar_pdf_LF_8.submit()

jleroux: to reproduce 

For example, edit applications/accounting/webapp/accounting/WEB-INF/controller.xml like this.

<request-map uri="invoice.pdf">
<security https="true" auth="true"/>
<event name="test" type="java" path="org.ofbiz.webapp.event.TestEvent" invoke="test"/> <= add this
<response name="success" type="view" value="InvoicePDF"/>
</request-map>

And in invoice screen, click 'PDF' button. Exist or not exist above line, generated html is different.

As is 
~event: PDF rendered
<li><a target="_BLANK" href="/ar/control/invoice.pdf?invoiceId=8010">PDF</a></li>
event:  PDF not rendered
<li><form method="post" action="/ar/control/invoice.pdf" target="_BLANK" name="InvoiceSubTabBar_pdf_LF_8"><input name="invoiceId" value="8010" type="hidden"/></form><a target="_BLANK" href="javascript:document.InvoiceSubTabBar_pdf_LF_8.submit()">PDF</a></li>

patched
~event: PDF rendered
<li><a target="_BLANK" href="/ar/control/invoice.pdf?invoiceId=8010">PDF</a></li>
event: PDF rendered
<li><form method="post" action="/ar/control/invoice.pdf" target="_BLANK" name="InvoiceSubTabBar_pdf_LF_8"><input name="invoiceId" value="8010" type="hidden"/></form><a href="javascript:document.InvoiceSubTabBar_pdf_LF_8.submit()">PDF</a></li>


git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1422207 13f79535-47bb-0310-9956-ffa450edef68
2012-12-15 09:15:37 +00:00
Jacques Le Roux d4b121aece Removes the instance of the static utility class
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1422099 13f79535-47bb-0310-9956-ffa450edef68
2012-12-14 21:26:46 +00:00