Commit Graph
10472 Commits
Author SHA1 Message Date
Jacopo Cappellato 6558763ed6 Based on a suggestion by Adrian Crum, data preparation scripts can now be implemented with script methods that accept a Map context argument, for example:
def dataPreparationMethod(Map context) {
...
}



git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1325750 13f79535-47bb-0310-9956-ffa450edef68
2012-04-13 13:10:59 +00:00
Jacques Le Roux c3443466d3 Minor Webtools improvements. I was actually trying to see why client-autocomplete-field was not working on SERVICE_NAME runService form field
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1325701 13f79535-47bb-0310-9956-ffa450edef68
2012-04-13 10:04:50 +00:00
Jacopo Cappellato 6450c4f54d Modified Groovy util methods that prepares the binding to add the ScriptHelper object (to be consistent with the Groovy service engine and event handler and the "Script" JSR223 engine and handler): now Groovy scripts can execute the same exact Grrovy codes that can be executed when they are run thru JSR223.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1325620 13f79535-47bb-0310-9956-ffa450edef68
2012-04-13 05:53:54 +00:00
Jacques Le Roux 1689c99809 Finally revert to previous values, in order to avoid possible confusion with values in properties file
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1325369 13f79535-47bb-0310-9956-ffa450edef68
2012-04-12 16:40:40 +00:00
Jacopo Cappellato 3d9441031b Removed commented out code.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1325254 13f79535-47bb-0310-9956-ffa450edef68
2012-04-12 13:45:39 +00:00
Jacopo Cappellato c04a9b280d Modified Groovy service engine and Groovy event handler to act in the same way of the "Script" (JSR 223) engine and handler: now they can execute the same exact Grrovy services and events.
In order to use these engine and event rather than the one that uses JSR223:
   * for services (service definition): set the engine to "groovy" rather than "script"
   * for events (event element in the controller): set the event type to "groovy" rather than "script"
 The main advantage of using them is that it is possible to attach a debugger to the Groovy methods.


git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1325253 13f79535-47bb-0310-9956-ffa450edef68
2012-04-12 13:42:57 +00:00
Jacques Le Roux 8f45278325 Reverting to 2 changes which slipped in at r1324989 (WIP...)
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1324995 13f79535-47bb-0310-9956-ffa450edef68
2012-04-11 20:48:56 +00:00
Jacques Le Roux c4c9542348 Oops, missed this file in r1324989
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1324990 13f79535-47bb-0310-9956-ffa450edef68
2012-04-11 20:35:52 +00:00
Jacques Le Roux c79283dbfc A patch from Francis ANDRE "unify admin port and key setting: single point of definition in start.properties" https://issues.apache.org/jira/browse/OFBIZ-4793
If someone wants to change the admin password or port, he would have to change currently many files (-- build.xml, various .bat and .sh --). In order to avoid this error-prone pratice, I suggest to centralize the definition of the admin kay and port at 2 single points: the framework/start/src/org/ofbiz/base/start/start.properties and the
framework/start/src/org/ofbiz/base/start/jetty.properties

jleroux: in config.java I also changed 
String adminPortStr = getProp(props, "ofbiz.admin.port", "0");
adminKey = getProp(props, "ofbiz.admin.key", "NA");
to
String adminPortStr = getProp(props, "ofbiz.admin.port", "10523");
adminKey = getProp(props, "ofbiz.admin.key", "so3du5kasd5dn");

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1324989 13f79535-47bb-0310-9956-ffa450edef68
2012-04-11 20:32:35 +00:00
Jacopo Cappellato 9f817fcd64 Upgrade DBCP from snapshot version of 1.3 to the new release 1.4
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1324685 13f79535-47bb-0310-9956-ffa450edef68
2012-04-11 10:24:18 +00:00
Jacopo Cappellato 11f9742f58 Changes required after the test port changes introduced in rev. 1311214: now the tests should all pass.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1324614 13f79535-47bb-0310-9956-ffa450edef68
2012-04-11 07:58:15 +00:00
Jacopo Cappellato 4835731c9c Upgrade to the latest version of JUnit (4.10).
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1311221 13f79535-47bb-0310-9956-ffa450edef68
2012-04-09 13:37:18 +00:00
Jacques Le Roux ec788aa471 Adds 1 to all ports in order to be able to run concurrently an OFBiz instance and a test instance on the same machine.
This closes "set different ports for testing in a CI environment (e.g. Jenkins)" https://issues.apache.org/jira/browse/OFBIZ-4794

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1311214 13f79535-47bb-0310-9956-ffa450edef68
2012-04-09 13:08:37 +00:00
Jacques Le Roux 93ae3a7fe1 The conditionals are unnecessary - FSE will return the original string if the string is null or empty, said Adrian
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1311195 13f79535-47bb-0310-9956-ffa450edef68
2012-04-09 10:44:05 +00:00
Jacques Le Roux 2d30831040 A patch from Nicolas Malin "Use flexibleStringRenderer for alt-target element on form" https://issues.apache.org/jira/browse/OFBIZ-4588
At this time the alt-target element value is only parse on bsh interpreter. To resynchronise with the rest of framework, convert with a flexibleStringRenderer.

jleroux: re-adding after reverting r1311082

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1311109 13f79535-47bb-0310-9956-ffa450edef68
2012-04-08 21:38:17 +00:00
Jacques Le Roux 68bfe71e2f Oops, I committed the wrong file at r1311082, reverting
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1311107 13f79535-47bb-0310-9956-ffa450edef68
2012-04-08 21:35:34 +00:00
Jacques Le Roux 6eae4edab0 A patch from Nicolas Malin "Use flexibleStringRenderer for alt-target element on form" https://issues.apache.org/jira/browse/OFBIZ-4588
At this time the alt-target element value is only parse on bsh interpreter. To resynchronise with the rest of framework, convert with a flexibleStringRenderer.

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1311082 13f79535-47bb-0310-9956-ffa450edef68
2012-04-08 20:21:34 +00:00
Adrian Crum e93e73afaa ScriptUtil bug fix: the SCRIPT_NAMES field was initialized only when debug level was INFO. Removed enclosing debug level check so SCRIPT_NAMES will always be initialized.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1311011 13f79535-47bb-0310-9956-ffa450edef68
2012-04-08 14:21:01 +00:00
Jacques Le Roux bf5a242cf0 Creates an ant task which uses YUICompressor (yuicompressor-2.4.6.jar) to dynamically minify our own (or custom for users) js and css files (most of the biggest external ones are already compressed)
More work is needed, this is just the the minimum with an example.

Related to https://issues.apache.org/jira/browse/OFBIZ-4792


git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1310983 13f79535-47bb-0310-9956-ffa450edef68
2012-04-08 12:12:07 +00:00
Jacques Le Roux 838c5c52c4 No functional change, just shift a line in proper place
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1310978 13f79535-47bb-0310-9956-ffa450edef68
2012-04-08 11:25:35 +00:00
Jacques Le Roux 8b2bfe325f Groups Tomcat http/s connectors compression properties and adds text/javascript,text/css as new compressableMimeTypes
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1310975 13f79535-47bb-0310-9956-ffa450edef68
2012-04-08 10:51:02 +00:00
Jacques Le Roux 27822125e1 setCountryStatesEventJs.ftl was a specialisation of setDependentDropdownValuesJs.ftl introduced 2 years ago with it. It has never been used and finally whan I thnk about it I don't see any needs to keep (slim down spirit)
So this to remove it and clean duplicated references/comments about setDependentDropdownValuesJs.ftl

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1310954 13f79535-47bb-0310-9956-ffa450edef68
2012-04-08 05:19:48 +00:00
Jacques Le Roux 5709385ad6 Followed Scott"s suggestion and added a generic EMAIL_PASSWORD EmailTemplateSetting (used to send a new password at user request)
I finally kept also the previous way because it allow an easier 18n of at the email subject.

Still the same concern: OOTB, if the user has not set a SMPT server in general.properties for the defaultFromEmailAddress the message "A new password has been created and sent to you. Please check your Email." when actually nothing happens. But that's anyway user's responsibility

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1310716 13f79535-47bb-0310-9956-ffa450edef68
2012-04-07 09:17:41 +00:00
Adrian Crum 3348ba5734 Bug fix in ScriptUtil.java - create a local copy of the calling context so script local variables are not copied to it.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1310307 13f79535-47bb-0310-9956-ffa450edef68
2012-04-06 12:51:14 +00:00
Jacques Le Roux 599d6d9511 A patch from Deepak Dixit for "Auto-completer request should be async." https://issues.apache.org/jira/browse/OFBIZ-4780
Fixes a minor issue regarding the pending request count for ajax auto-completer: pending count is used to add and remove the ui-autocomplete-loading class. If we are aborting the request then this count is not updated properly and ui-autocomplete-loading class does not remove from the lookup element hence ajax loader image display continuously if response came.

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1310266 13f79535-47bb-0310-9956-ffa450edef68
2012-04-06 09:48:29 +00:00
Adrian Crum 533bd091b7 CVE-2012-1622: Disable support for nested scripts in FlexibleStringExpander.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1309879 13f79535-47bb-0310-9956-ffa450edef68
2012-04-05 14:20:56 +00:00
Hans Bakker 8ce6e56675 comment from jacopo, to revert changes from the freemarker down grade
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1309778 13f79535-47bb-0310-9956-ffa450edef68
2012-04-05 11:30:30 +00:00
Ashish Vijaywargiya 692d148175 Adding support of securityGroupId on portal admin screen. securityGroupId field support is available in PortalPage entity. Thanks Ankush.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1309519 13f79535-47bb-0310-9956-ffa450edef68
2012-04-04 18:27:32 +00:00
Adrian Crum 99504db991 Added some static methods to FlexibleStringExpander that enable querying an expression about its component parts.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1309360 13f79535-47bb-0310-9956-ffa450edef68
2012-04-04 12:49:12 +00:00
Adrian Crum e94ccd9369 Added a SCRIPT_NAMES field to ScriptUtil.java.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1309359 13f79535-47bb-0310-9956-ffa450edef68
2012-04-04 12:47:30 +00:00
Erwan de Ferrieres e42a5f1c85 Reverting 1308301 as the commit could seems as a hack: ./ant can't find the class issue created for this: OFBIZ-4783
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1309337 13f79535-47bb-0310-9956-ffa450edef68
2012-04-04 11:38:40 +00:00
Jacques Le Roux 4df267b015 Remove Copyright mention when useless and change to 2012 when needed or automatize if possible
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1309009 13f79535-47bb-0310-9956-ffa450edef68
2012-04-03 16:06:29 +00:00
Sascha Rodekamp ceb27828a7 Changed the FileReader to a BufferedReader during script loading. The file reader throws an exception when the file path contains spaces (which are encoded). The result was that scripts aren't loaded and pages only showed an error message. Working with an InputStream solves this issue.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1308896 13f79535-47bb-0310-9956-ffa450edef68
2012-04-03 13:36:03 +00:00
Jacopo Cappellato 7e8d52d3bf Fixed path to svninfo.ftl file that was not working after the switch to freemarker 2.3.19
Thanks to Scott for the solution.



git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1308817 13f79535-47bb-0310-9956-ffa450edef68
2012-04-03 11:09:54 +00:00
Jacques Le Roux 6f6f4d8ec9 Reverts r1308078 http://svn.apache.org/viewvc?view=revision&revision=1308078 due to some pressure on this commit http://markmail.org/message/zqguh6ttd2a5jqcb
And even if I'm quite sure it's not harmful, I don't see either a great need for it


git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1308792 13f79535-47bb-0310-9956-ffa450edef68
2012-04-03 09:48:28 +00:00
Jacques Le Roux 6f0bac1487 A patch from Deepak Dixit for "Auto-completer request should be async." https://issues.apache.org/jira/browse/OFBIZ-4780
Currently auto-completer uses sync call to prepare auto-completer source (result list).
Due to this user can't perform any other operation on lookup field and user should have to wait until response came.
In general, synchronous requests should never be used because they tend to block the execution of anything else on the page (or even the entire browser UI), which isn't good.
Also ajax-loader image not display on google chrome browser due to sync request.

Need to use async request for auto-completer.


git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1308751 13f79535-47bb-0310-9956-ffa450edef68
2012-04-03 08:41:06 +00:00
Jacopo Cappellato ec02e2ac4f this is a workaround to fix errors when loading included templates with a relative path after the migration to Freemarker 2.3.19; I am still investigating the root cause.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1308734 13f79535-47bb-0310-9956-ffa450edef68
2012-04-03 07:46:12 +00:00
Jacopo Cappellato 058f404d74 OFBIZ-4771
Renamed some ant tasks for consistency, improved descriptions, removed 2 redundant tasks

Summary of changes:

improved descriptions (unified style)
renamed: run --> start
renamed: run-batch --> start-batch
renamed: run-debug --> start-debug
renamed: run-pos --> start-pos
renamed: run-install --> load-demo
renamed: run-install-multitenant --> load-demo-multitenant
renamed: run-install-* targets -> load* (for example: run-install-seed --> load-seed etc...)
enhanced load-file (was run-install-file) to accept an optional 'delegator' argument and removed run-install-file-in-delegator and run-tenant-install-file
renamed: run-create-tenant --> create-tenant
renamed: run-single-test --> run-test
renamed: run-single-test-suite --> run-test-suite
the main old tasks (mentioned in documentation etc.) have been kept and now inform the user of the new syntax
updated README and main screen of Webtools with the new task name



git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1308370 13f79535-47bb-0310-9956-ffa450edef68
2012-04-02 14:53:11 +00:00
Jacopo Cappellato 66e063b126 Removed the last webslinger jar that I missed in my previous commits.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1308359 13f79535-47bb-0310-9956-ffa450edef68
2012-04-02 14:09:22 +00:00
Jacopo Cappellato 6567fca33d Upgrade to latest stable release of Freemarker: 2.3.19
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1308358 13f79535-47bb-0310-9956-ffa450edef68
2012-04-02 14:08:17 +00:00
Jacopo Cappellato 7bc6142674 Set log levels for Freemarker (to disable all log messages under warning) to resolve performance issue in newer releases of freemarker.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1308355 13f79535-47bb-0310-9956-ffa450edef68
2012-04-02 13:58:14 +00:00
Erwan de Ferrieres c5c75df222 Seems using ./ant for running install and tests is not detecting the class for cobertura. Testing if the jar is present is making it right. Resolves OFBIZ-4757
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1308301 13f79535-47bb-0310-9956-ffa450edef68
2012-04-02 11:16:10 +00:00
Jacques Le Roux 8baaab2b1a A patch from Francis ANDRE "Add missing ConverterLoader to framework/entity/src/META-INF/services/org.ofbiz.base.conversion.ConverterLoader for running FOBiz in debug under Eclipse https://issues.apache.org/jira/browse/OFBIZ-4777
In order to run OFBiz in debug mode under Eclipse with hot class reloading, one needs to add the following Converters to the services framework/entity/src/META-INF/services/org.ofbiz.base.conversion.ConverterLoader because they are added at build time by the build.xml of the framework. Thus, they are missing when running OFBiz as an full Eclipse debug launcher.

org.ofbiz.base.conversion.BooleanConverters
org.ofbiz.base.conversion.CollectionConverters
org.ofbiz.base.conversion.DateTimeConverters
org.ofbiz.base.conversion.JSONConverters
org.ofbiz.base.conversion.MiscConverters
org.ofbiz.base.conversion.NetConverters
org.ofbiz.base.conversion.NumberConverters

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1308085 13f79535-47bb-0310-9956-ffa450edef68
2012-04-01 11:39:34 +00:00
Jacques Le Roux afde12093c A patch from Francis ANDRE "Avoid exiting ofbiz when running in debug mode,i.e with -DDEBUG=true set on theJVM arguments" https://issues.apache.org/jira/browse/OFBIZ-4776
This is a patch for allowing to run OFBiz in debug mode,i.e with -DDEBUG=true on the JVM arguments, and avoid to exit from the process when a Error or a StartupException occurs.

jleroux: replaced tabs by 4 spaces

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1308078 13f79535-47bb-0310-9956-ffa450edef68
2012-04-01 11:27:45 +00:00
Jacques Le Roux 2ab258f919 A patch from BREMA Dev Team "email password broken" https://issues.apache.org/jira/browse/OFBIZ-3790
There is no productStoreId in the session for an user of a backend application, and ProductStoreEmailSetting is not available. This is the reason.
However we can use default template and default sender's address from general.properties in this case.
Also removes some dead code.

jleroux: this uses  "general.properties", "defaultFromEmailAddress". So to work correctly it still needs "defaultFromEmailAddress" (default =ofbiztest@example.com), "mail.smtp.relay.host" (default =localhost) and such to be set correctly... In other words the message "A new password has been created and sent to you. Please check your Email." could even more misleading if people are not aware about setting SMTP


git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1307895 13f79535-47bb-0310-9956-ffa450edef68
2012-03-31 20:35:42 +00:00
Jacques Le Roux bf2feb63bd A patch from Nicolas Malin "add possibility to sort field at the end form on widget form" https://issues.apache.org/jira/browse/OFBIZ-4518
When you use sort-field, you reorder only the form begin or you need list all file if you want reordered the end form.

Example

    <form>
    <field name="a"/>
    <field name="b"/>
    <field name="c"/>
    <field name="d"/>
    </form>

If you want put c at the end :

    <form>
    <field name="a"/>
    <field name="b"/>
    <field name="c"/>
    <field name="d"/>
    <sort-order>
    <sort-field name="a"/>
    <sort-field name="b"/>
    <sort-field name="d"/>
    <sort-field name="c"/>
    </sort-order>
    </form>

with the patch

    <form>
    <field name="a"/>
    <field name="b"/>
    <field name="c"/>
    <field name="d"/>
    <sort-order>
    <last-field name="c"/>
    </sort-order>
    </form>

It's really useful for inherited forms when you adding new fields, you just use last-field for instance for submit button.


git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1307784 13f79535-47bb-0310-9956-ffa450edef68
2012-03-31 12:10:07 +00:00
Adrian Crum e1a03aee17 Small code cleanup in ObjectType.simpleTypeConvert, added support for null target type (returns original object). Updated unit tests.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1307551 13f79535-47bb-0310-9956-ffa450edef68
2012-03-30 17:48:32 +00:00
Hans Bakker 2874803c43 property to either show currency decimals when zero or not
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1307303 13f79535-47bb-0310-9956-ffa450edef68
2012-03-30 08:29:28 +00:00
Jacopo Cappellato 4dfcf989fb Implemented new Freemarker transform to set a context variable.
The transform is now used to pass the "postalAddress" to the context of the postal address formatter screen.
This should fix the issue, reported by Chatree, that prevented to render the localized address when the screen was rendered from the send mail service (no request object was available).


git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1307288 13f79535-47bb-0310-9956-ffa450edef68
2012-03-30 07:28:39 +00:00
Jacopo Cappellato 8c99e6b35e Upgrade to Groovy 1.8.6 (from Groovy 1.7.7).
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1306769 13f79535-47bb-0310-9956-ffa450edef68
2012-03-29 09:43:54 +00:00