Commit Graph
7056 Commits
Author SHA1 Message Date
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
Jacques Le Roux fbfd7246de Adrian remarked there was no need to use class fields
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1421738 13f79535-47bb-0310-9956-ffa450edef68
2012-12-14 08:53:09 +00:00
Jacques Le Roux b7192d8409 At Adrian and Adam's request, allow to use cache here, use default constructor
Also refactored things a bit: 
* uses getPropertyAsBoolean
* set default property values

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1421651 13f79535-47bb-0310-9956-ffa450edef68
2012-12-14 03:27:40 +00:00
Jacques Le Roux 03a62ac947 A slightly modified patch from Sumit Pandit for "Additional Validation for Password : Make password pattern driven" https://issues.apache.org/jira/browse/OFBIZ-4958
Provides an additional validation for password  with following capability to the system:

Admin can enable/disable pattern based password capability of system. Configuration will reside in security.property file.
 To enable : security.login.password.pattern.enable=true
 To disable: security.login.password.pattern.enable=false

Admin is flexible to provide his pattern string by making pattern more/less restrictive as per system requirement. Configuration will reside in security.property file.
 Example: security.login.password.pattern=^.*(?=. {5,})(?=.[a-zA-Z])(?=.[!@#$%^&*]).*$

Admin can provide custom error message string which will display to end user if wrong password is entered. Configuration will reside in security.properity file.

jleroux: I quickly handled the error message localisation for the OOTB case. It's more complicated when the pattern gets complex...


git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1418996 13f79535-47bb-0310-9956-ffa450edef68
2012-12-09 14:59:52 +00:00
Scott Gray 04df9cb162 Add a bunch of missing Override annotations
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1418651 13f79535-47bb-0310-9956-ffa450edef68
2012-12-08 12:06:40 +00:00
Scott Gray 0af4184d61 Remove a bunch of unnecessary casts
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1418650 13f79535-47bb-0310-9956-ffa450edef68
2012-12-08 12:06:01 +00:00
Scott Gray f180a447c7 Remove redundant implements declarations where the interface is already implemented by the base class
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1418649 13f79535-47bb-0310-9956-ffa450edef68
2012-12-08 12:04:37 +00:00
Scott Gray 5df3e3f70b Remove a bunch of unused imports, no functional changes
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1418646 13f79535-47bb-0310-9956-ffa450edef68
2012-12-08 12:03:52 +00:00
Scott Gray b9aba41be6 Add missing deprecated annotations
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1418645 13f79535-47bb-0310-9956-ffa450edef68
2012-12-08 12:02:14 +00:00
Adam Heath bca838aa2a OPTIMIZE: Now that absolute() does the correct thing for 0, fix
getPartialList() to use absolute(start - 1), instead of working around
the bug itself.

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1417213 13f79535-47bb-0310-9956-ffa450edef68
2012-12-04 21:54:49 +00:00
Adam Heath 9c7c925a4c OPTIMIZE: Remove the use of numRetrieved as a check to see how much has
been fetched.  Either list.size() could be used, or, even better, just
decrement the number wanted, and continue until everything is fetched.

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1417212 13f79535-47bb-0310-9956-ffa450edef68
2012-12-04 21:54:42 +00:00
Adam Heath 7228abe497 TYPO: s/numRetreived/numRetrieved/
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1417211 13f79535-47bb-0310-9956-ffa450edef68
2012-12-04 21:54:35 +00:00
Adam Heath fc81ed5fb1 FIX: Some jdbc drivers don't like absolute(0), even though this is
allowed.  As such, call beforeFirst() instead.  Technically, these
broken jdbc drivers should have the same kind of work-around.

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1417210 13f79535-47bb-0310-9956-ffa450edef68
2012-12-04 21:54:28 +00:00
Jacopo Cappellato a17e2d812b Fixed code that was broken a lot of time ago by commit 883226; this prevented the (seldom used) screen.use-cache attribute to work properly. Thanks to K Sharad Bhushan for the patch (OFBIZ-5080).
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1416497 13f79535-47bb-0310-9956-ffa450edef68
2012-12-03 13:05:39 +00:00
Jacopo Cappellato f6244c689f Trivial fixes for some typos in Java comments.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1416451 13f79535-47bb-0310-9956-ffa450edef68
2012-12-03 11:15:44 +00:00
Jacques Le Roux e6ede1ca2e Reverts r1310983 (related to https://issues.apache.org/jira/browse/OFBIZ-4792 )for 2 reasons:
* I missed to put in LICENSE and NOTICE
* It's an issue for Birt, see OFBIZ-5070


git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1416358 13f79535-47bb-0310-9956-ffa450edef68
2012-12-03 07:02:38 +00:00
Sascha Rodekamp ce90d2929e Replace all getIdName() calls in the MacroFormRenderer class with the central method getCurrentContainerId from the ModelFormField class. This method uses now the FlexibleStringExpander that makes the form widgets able to interpret ${} variables in the id fields
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1413492 13f79535-47bb-0310-9956-ffa450edef68
2012-11-26 07:34:56 +00:00