Commit Graph
6661 Commits
Author SHA1 Message Date
Jacques Le Roux 87d84ea506 Adrian suggested to removes all class="tabletext": <<That style was removed from the stylesheet in 2007. All references to it should be removed.>>
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1340386 13f79535-47bb-0310-9956-ffa450edef68
2012-05-19 09:35:12 +00:00
Jacques Le Roux 9ee7384202 Adrian suggested to removes all widget-style="tabletext": <<That style was removed from the stylesheet in 2007. All references to it should be removed.>>
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1340385 13f79535-47bb-0310-9956-ffa450edef68
2012-05-19 09:32:48 +00:00
Jacques Le Roux 028b8497d8 Replaces title="${uiLabelMap.CommonEmptyHeader}" by title=" " where it's known to not be a problem. Here with links styled by widget-style="smallSubmit"
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1340374 13f79535-47bb-0310-9956-ffa450edef68
2012-05-19 08:48:24 +00:00
Jacques Le Roux 3369dca046 Replaces title="${uiLabelMap.CommonEmptyHeader}" by title=" " where it's known to not be a problem. Here with links styled by widget-style="buttontext"
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1340373 13f79535-47bb-0310-9956-ffa450edef68
2012-05-19 08:45:18 +00:00
Jacques Le Roux 702698c247 Defintively closes "The Label Manager is wrongly overriding CommonEmptyHeader" https://issues.apache.org/jira/browse/OFBIZ-4652
CommonEmptyHeader is now useless, so this is no longer a concern

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1340372 13f79535-47bb-0310-9956-ffa450edef68
2012-05-19 08:42:13 +00:00
Jacques Le Roux 1255c1e116 A patch from Harsha Chadhar for "Can not add "Question Options" within the Survey section of the Content application." https://issues.apache.org/jira/browse/OFBIZ-2959
Reported by Brant Levinson 19/Sep/09 : When editing a question in Content --> Survey which has a "Selected Option" Question Type, the page does not allow for the creation of a Question Option. 

Sumit Pandint tested:
It can be reproduced in following steps -
1) Go to : https://demo-trunk.ofbiz.apache.org:8443/content/control/EditSurveyQuestions?surveyId=1000
OR
https://demo-trunk.ofbiz.apache.org:8443/content/control/EditSurveyQuestions?surveyId=1000&surveyQuestionId=10000&surveyQuestionCategoryId=1000#edit
2) Create New Question with "Survey Question Type Id" = "Selected Option"
3) ERROR
4) Question starts appearing in list.
5) Page rendering exception is coming in create question option section.
6) Apply patch and observe screen : OK

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1340357 13f79535-47bb-0310-9956-ffa450edef68
2012-05-19 06:53:58 +00:00
Jacopo Cappellato c60e7870fd Added new method "putIfAbsentAndGet" to UtilCache: it is similar to putIfAbsent but it always return the value even if the value was missing and added to the cache by method.
This can be useful to improve code like:

cache.putIfAbsent("key", "value");
value = cache.get("key"); // if a concurrent thread has cleared the cache the value could be null

into this:

value = cache.putIfAbsentAndGet("key", "value");



git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1340351 13f79535-47bb-0310-9956-ffa450edef68
2012-05-19 06:36:41 +00:00
Jacopo Cappellato 363ce98d69 Made the static variable Debug.dateFormat a private and final field because it is only used locally and DateFormat is not thread safe.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1340347 13f79535-47bb-0310-9956-ffa450edef68
2012-05-19 06:18:07 +00:00
Adrian Crum 133393f087 Small fixup for my last commit.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1340148 13f79535-47bb-0310-9956-ffa450edef68
2012-05-18 16:04:03 +00:00
Adrian Crum 217445e8af Refactored the artifact info code in Mini-language. Made it less dependent on implementation details and made it more flexible and efficient.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1340143 13f79535-47bb-0310-9956-ffa450edef68
2012-05-18 15:52:11 +00:00
Adrian Crum b7025ca701 Small fixup for my last commit.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1339774 13f79535-47bb-0310-9956-ffa450edef68
2012-05-17 18:25:49 +00:00
Adrian Crum e1e93d0eb2 Overhauled Mini-language <if-instance-of> and <if-not-empty> elements.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1339771 13f79535-47bb-0310-9956-ffa450edef68
2012-05-17 18:23:20 +00:00
Adrian Crum a3ebab15ff Consolidated some redundant Mini-language classes.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1339610 13f79535-47bb-0310-9956-ffa450edef68
2012-05-17 14:14:03 +00:00
Jacopo Cappellato 4aebe81b8f Based on suggestion from Daniel Dekany (committer/maintainer of the Freemarker's project):
"Since BeansWrapper.getDefaultInstance() returns an instance that is
 shared in the scope of the class-loader that defined the FreeMarker
 classes, and since possibly multiple independently developed
 components in your system use FreeMarker and thus getDefaultInstance
 (and you may don't even know about it), and since the returned
 BeanWrapper can be configured (not read-only), you never know how the
 returned BeanWrapper is configured. So you add a 3rd party component,
 and if you are unlucky, suddenly your other component is broken.
 As of creating new BeansWrapper, be sure you create it only once
 during the application life-cycle and then reuse the same instance, or
 else it will have to rebuild the class introspection cache again and
 again."
 
 I have replaced the usage of the static instance of the BeansWrapper with a newly created object. 


git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1339504 13f79535-47bb-0310-9956-ffa450edef68
2012-05-17 07:25:13 +00:00
Adrian Crum 162b7a7651 Overhauled Mini-language <check-permission> element.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1339291 13f79535-47bb-0310-9956-ffa450edef68
2012-05-16 18:05:20 +00:00
Adrian Crum 05132fa087 Added new class to model the Mini-language <fail-message> and <fail-property> elements. Updated the <add-error> element to use the new class.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1339290 13f79535-47bb-0310-9956-ffa450edef68
2012-05-16 18:04:30 +00:00
Adrian Crum 3b98e384e6 A bunch of small fixups in Mini-language.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1339228 13f79535-47bb-0310-9956-ffa450edef68
2012-05-16 15:25:11 +00:00
Adrian Crum 25b6d442c9 Refactored FlexibleMessage.java.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1339227 13f79535-47bb-0310-9956-ffa450edef68
2012-05-16 15:23:31 +00:00
Adrian Crum 34bb920e3b Overhauled Mini-language <call-service-asynch> and <call-map-processor> elements.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1339149 13f79535-47bb-0310-9956-ffa450edef68
2012-05-16 13:09:30 +00:00
Adrian Crum e7304502b6 Fixed validation in Mini-language <call-service> element.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1339147 13f79535-47bb-0310-9956-ffa450edef68
2012-05-16 13:08:13 +00:00
Adrian Crum f5fa8dcb5b Added a comment to UtilXml.java - no functional change.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1339089 13f79535-47bb-0310-9956-ffa450edef68
2012-05-16 09:41:07 +00:00
Jacques Le Roux 2da70363b5 Revert all the changes related to CommonEmptyHeader, apart base-catalog.xml and labels in CommonUiLabels.xml.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1339081 13f79535-47bb-0310-9956-ffa450edef68
2012-05-16 09:27:31 +00:00
Adrian Crum a1f823136f Overhauled Mini-language <call-service> element, final pass.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1339079 13f79535-47bb-0310-9956-ffa450edef68
2012-05-16 09:20:03 +00:00
Jacques Le Roux d8088bdd77 Deprecates w/out keepSpace versions of UtilXml.createOutputTransformer() and UtilXml.writeXmlDocument()
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1338974 13f79535-47bb-0310-9956-ffa450edef68
2012-05-16 02:42:09 +00:00
Jacques Le Roux aede4717e1 Fixes and complete r1338831
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1338845 13f79535-47bb-0310-9956-ffa450edef68
2012-05-15 19:26:39 +00:00
Jacques Le Roux 1c972bf684 Fixes https://issues.apache.org/jira/browse/OFBIZ-4652 "The Label Manager is wrongly overriding CommonEmptyHeader"
* Adds a keepSpace boolean to UtilXml.writeXmlDocument(), this allows to use xsl:preserve-space into UtilXml.createOutputTransformer()
* Uses it into SaveLabelsToXmlFile.saveLabelsToXmlFile()
* Adds some French labels into CommonUiLabels.xml using Labels Manager to test the new functionality 
* Adds the xml:space attribute into the valueType complexType
* Adds the ofbiz-properties.xsd schema into the base-catalog.xml

I got an issue when 1st trying to commit: 
Commit failed (details follow):
While preparing
 'D:\workspace\ofbizClean\framework\common\config\CommonUiLabels.xml' for commit
Inconsistent line ending style

So I forced the EOLs to my locale platform value (Win XP)

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1338831 13f79535-47bb-0310-9956-ffa450edef68
2012-05-15 19:03:26 +00:00
Adrian Crum bf4b22a85d Overhauled Mini-language <call-service> element, second pass.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1338792 13f79535-47bb-0310-9956-ffa450edef68
2012-05-15 16:56:17 +00:00
Adam Heath abdead8200 Remove errant NOTE for 2008 that was part of a cut-n-waste.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1338735 13f79535-47bb-0310-9956-ffa450edef68
2012-05-15 14:45:45 +00:00
Jacopo Cappellato 4b1ed290e1 Completed refactoring/cleanup of captcha implementation that now supports screens with more than one captcha in them.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1338700 13f79535-47bb-0310-9956-ffa450edef68
2012-05-15 13:31:15 +00:00
Adrian Crum 079551365a Overhauled <call-service> element, first pass.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1338697 13f79535-47bb-0310-9956-ffa450edef68
2012-05-15 13:29:03 +00:00
Jacques Le Roux 2f5ddb1b12 A patch from Pierre Smits "Project resource overview doesn't show the resources with a thru-date before the current date." https://issues.apache.org/jira/browse/OFBIZ-4853
When a project manager expires the assignment of a resource by clicking the delete button in the Project Resources overview the resource is deleted from the overview. It should be that the resource is still shown in the overview with the tru-date visible.
Otherwise there will be a discrepancy between the overview of resources of the project and the project dashboard.
The name of the button is also wrong. It should state 'expire' not 'delete'.

jleroux: I have also created a new label FormFieldTitle_expireButton copying labels from CommonExpire. I saw that labels where not sorted at all so I used Labels Manager for that. I put back CommonEmptyHeaderby hand. I will soon fix this issue. So, apart the sort changes, there is also a lot of false changes in CommonUiLabels.xml because Labels Manager now uses the right way for Language Identification: http://www.w3.org/TR/REC-xml/#sec-lang-tag (ie a - separate language from country instead of previously a _)

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1338695 13f79535-47bb-0310-9956-ffa450edef68
2012-05-15 13:27:54 +00:00
Jacques Le Roux ef4767dd12 A patch Ranjit Kumar Singh from "Error in CSV download" https://issues.apache.org/jira/browse/OFBIZ-4873
If sorting is enabled for at least one field in the list type form-widget, we get an error, here is the  details:

Error executing macro: renderFieldTitle
required parameter: id is not specified.
The problematic instruction:
----------
==> macro renderFieldTitle [on line 53, column 1 in component://widget/templates/csvFormMacroLibrary.ftl]
in user-directive renderFieldTitle [on line 116, column 57 in component://widget/templates/csvFormMacroLibrary.ftl]
in user-directive renderSortField [on line 1, column 1 in Fri May 11 12:33:29 IST 2012]
----------

Java backtrace for programmers:
----------
freemarker.template.TemplateException: Error executing macro: renderFieldTitle
required parameter: id is not specified.
at freemarker.core.Macro$Context.sanityCheck(Macro.java:211)

Adding a default empty string to the id parameter fixes the issue

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1338570 13f79535-47bb-0310-9956-ffa450edef68
2012-05-15 07:14:55 +00:00
Adam Heath 6299c90426 Deprecate all Delegator.findByAnd and Delegator.findByAndCache;
introduce a new Delegator.findByAnd variant that takes a boolean cache
parameter.

This change continues the simplication of the delegator api.  There is
no longer a version of a method with a 'Cache' suffix; instead, a single
version now exists that takes a boolean cache parameter.  Also, there
has been a trend to remove several method variants that take different
numbers and types of parameters, instead preferring to fully specify all
parameters; this also continues that trend.

Delegator.findByAnd(String, Map) is replaced with findByAnd(String, Map,
null, false).

Delegator.findByAnd(String, Map, List) is replaced with
findByAnd(String, Map, List, false).

Delegator.findByAnd(String, Object...) is replaced with
findByAnd(String, Map, null, false).  The object array is converted to a
map by using UtilMisc.toMap(Object...).

Delegator.findByAndCache(String, Map) is replaced with findByAnd(String,
Map, null, true).

Delegator.findByAndCache(String, Map, List) is replaced with
findByAnd(String, Map, List, true).

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1338424 13f79535-47bb-0310-9956-ffa450edef68
2012-05-14 21:03:45 +00:00
Adam Heath 9e5f405a4d DEPRECATION: framework: findByAnd variants replaced with findByAnd that takes a boolean useCache parameter.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1338403 13f79535-47bb-0310-9956-ffa450edef68
2012-05-14 20:59:54 +00:00
Adam Heath 321196326a OPTIMIZE: One findByAnd call was calling another findByAnd, instead of
calling findList directly.  This change should speed it up(just
slightly).

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1338402 13f79535-47bb-0310-9956-ffa450edef68
2012-05-14 20:59:26 +00:00
Adam Heath 14db0dbfda DEPRECATION: Add new findByAnd variant, that has a boolean useCache
parameter; this is the same similiar pattern that other methods have.

After all code has been modified to use this new method, the older
methods will be deprecated(and eventually replaced).

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1338400 13f79535-47bb-0310-9956-ffa450edef68
2012-05-14 20:59:20 +00:00
Adrian Crum bac00c1ea3 Fixed a bug in Mini-language <field-to-result> element where nested expressions were not evaluated correctly.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1338394 13f79535-47bb-0310-9956-ffa450edef68
2012-05-14 20:49:01 +00:00
Adrian Crum f09c0db4d1 Change new FlexibleMapAccessor static method to an object method.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1338372 13f79535-47bb-0310-9956-ffa450edef68
2012-05-14 19:57:25 +00:00
Adrian Crum b4c01f24ff Small fixup for my last commit.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1338366 13f79535-47bb-0310-9956-ffa450edef68
2012-05-14 19:45:20 +00:00
Adrian Crum 025a75b632 Added a utility method to FlexibleMapAccessor.java to test for nested expressions.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1338361 13f79535-47bb-0310-9956-ffa450edef68
2012-05-14 19:43:18 +00:00
Adrian Crum e3d62b1f76 Updated Mini-language schema.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1338345 13f79535-47bb-0310-9956-ffa450edef68
2012-05-14 19:04:01 +00:00
Jacopo Cappellato cef1cccf82 OFBIZ-4864
* enabled by default the DebugManagedDataSource wrapper around ManagedDataSource
* enhanced the DebugManagedDataSource wrapper to:
** print log messages only at verbose level (instead of always as it was before)
** if possible print additional information about the connection status
** added new method that returns information about the connection pool settings/status
* added new static method to DBCPConnectionFactory to return information about the pools
* new screen in the webtools where information about each pool/helper is shown
The information provided by the screen can be very useful to analyze the status of the connection pools.

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1338230 13f79535-47bb-0310-9956-ffa450edef68
2012-05-14 14:45:43 +00:00
Jacopo Cappellato 4fe09a970a Fix for wrong operation name returned by the FieldToResult.toString(...) method.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1338224 13f79535-47bb-0310-9956-ffa450edef68
2012-05-14 14:36:54 +00:00
Adrian Crum 19fea3bcfc Modified the Mini-language comparison elements:
1. Moved comparison logic from ObjectType.java to the minilanguage component and improved it to be more modular.
2. Moved object type conversion from ObjectType.java to the minilanguage component and simplified it.
3. Modified comparison elements to use new comparison logic and object type conversion.


git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1338212 13f79535-47bb-0310-9956-ffa450edef68
2012-05-14 14:11:33 +00:00
Jacques Le Roux ef02599c23 Removes the ij.script and derbytools-10.8.2.2.jar.
Reasons for this:
 * no active committer was maintaining it
 * it's maintained by the Derby project, see http://db.apache.org/derby/docs/dev/tools/ for details


git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1338173 13f79535-47bb-0310-9956-ffa450edef68
2012-05-14 12:03:58 +00:00
Jacques Le Roux 364c0fe88a Complete r1338065, the same message existed in fieldlookup.js
Also no needs to i18n such error messages, I removed the //TODO

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1338101 13f79535-47bb-0310-9956-ffa450edef68
2012-05-14 09:15:10 +00:00
Jacques Le Roux 29c03cda16 A patch from Amardeep Singh Jhajj "Ajax autocomplete error while adding 1st item in order manager order creation" https://issues.apache.org/jira/browse/OFBIZ-4867
I found the small bug that when ajax request is aborted in autocompleter, the alert box is opened with message 
- An error occurred while communicating with the server:
    reason=abort
    exception=abort.
Hence, I have added a check to handle ajax abort exception in such case.

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1338065 13f79535-47bb-0310-9956-ffa450edef68
2012-05-14 08:51:08 +00:00
Jacopo Cappellato 53d6c971e9 Improved implementation of concurrent access to the cache of parsed Groovy scripts to avoid the risk of a NPE in the unlucky event that, between the execution of the cache.putIfAbsent and cache.get methods, the cache entry was removed (e.g. cache cleared/expired).
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1337789 13f79535-47bb-0310-9956-ffa450edef68
2012-05-13 07:16:18 +00:00
Adam Heath 2b3fdc9379 Deprecate Delegator.findByPrimaryKey and Delegator.findByPrimaryKeyCache.
Ofbiz is moving towards simpler delegator apis; this means all
'fooCache' variants are removed(and their matching 'foo' method), and a
new version of 'foo' added that takes a boolean cache parameter.

Delegator.findByPrimaryKey(String, Map) is replaced with
findOne(String, Map, false).

Delegator.findByPrimaryKeyCache(String, Map) is replaced with
findOne(String, Map, true).

Delegator.findByPrimaryKey(String, Object...) is replaced with
findOne(String, false, Object...).

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1337688 13f79535-47bb-0310-9956-ffa450edef68
2012-05-12 21:22:26 +00:00
Adam Heath 64a9662c25 DEPRECATION: framework: findByPrimaryKey variants replaced with findOne
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1337662 13f79535-47bb-0310-9956-ffa450edef68
2012-05-12 21:17:55 +00:00