* 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: setPriceRulesCondEventJs.ftl Therefore, I fixed it to include the argument in getDependentDropdownValues
jleroux: complete r1438501 where I missed setPriceRulesCondEventJs.ftl, as suggested Taher, for consistency sake, I used '' instead of false
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1438876 13f79535-47bb-0310-9956-ffa450edef68
* 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
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
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@1438478 13f79535-47bb-0310-9956-ffa450edef68
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
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
"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
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
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
* 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
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
> I tried to test the theme multiflex (for ecommerce) and detect a small
> problem as the following: (USING http://demo-trunk.ofbiz.apache.org)
>
> 1.connect to catalog manager
> 2.go to "store" tab and select the store with id 9000
> 3.change its viual theme to MULTIFLEX
>
> 4.open the ecommerce site (it's ok with new theme)
> 5.select a catagory from the categories menu on the left side.
> 6.select another language
>
> And the problem come up:
> The theme now is EC_DEFAULT instead of MULTIFLEX
It was related to a not finished change introduced with http://svn.apache.org/viewvc?view=revision&revision=1128983
I mean the addCheckValue request and sequel...
It was just missing the productStore, I added it in the category.groovy script
I briefly tried to do it in a simpler way using a redirected parameter on setSessionLocale request, but got issue, gave up and simply reused the same way but moved the simple method from AffiliateSimpleEvents.xml to CustomerEvents.xml
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1426787 13f79535-47bb-0310-9956-ffa450edef68
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
>It looks like a wrong credit card number leads to the following error message in UI (tested with one-page checkout):
> # ---
> ... (INSERT on table 'ORDER_CONTACT_MECH' caused a violation of foreign key constraint 'ORDER_CMECH_CM' for key (10005). ...
>
> I would rather expect an error message like "invalid credit cartd number" instead.
jleroux: the bug was actually double
1st: a last issue related to https://issues.apache.org/jira/browse/OFBIZ-5102 after https://issues.apache.org/jira/browse/OFBIZ-3883
2nd: the cardNumber was missing a creditcard class (jquery.validate.js messages)
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1425452 13f79535-47bb-0310-9956-ffa450edef68
Error message in the error.log is as follows:
XmlFileLoader: File file:/usr/local/ofbiz-tr-mt12.5/applications/order/script/org/ofbiz/order/order/OrderServices.xml process error. Line: 530. Error message: cvc-pattern-valid: Value 'orderSequence-enforced' is not facet-valid with respect to pattern '[a-zA-Z_]{1}[a-zA-Z0-9_$.]+' for type 'javaClassName'.
Changes all occurrencies of 'orderSequence-enforced' to 'orderSequence_enforced' as only underscore dashed are allowed by the cvc pattern.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1425155 13f79535-47bb-0310-9956-ffa450edef68
The CustomerEvent scripts do not yet account for the fact that the method takes two parameters after a code change on ShoppingCart:
- int shipGroupIndex and
- String shipmentMethodTypeId
instead of the latter String only in earlier versions.
Minilang Script calls to setShipmentMethodTypeId with a single String Parameter need to be changed.
They now must call setAllShipmentMethodTypeId. This method has been introduced with rev. 1407116.
jleroux: so this was not covered by unit tests, too bad but I don't think I will get enough time to write them :/
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1422814 13f79535-47bb-0310-9956-ffa450edef68
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
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