Commit Graph
148 Commits
Author SHA1 Message Date
Adrian Crum 6e85ea167b Added "NewList" and "NewMap" options to the <set> element type attribute. Now screen widgets and mini-language support the creation of empty Lists and Maps.
Usage:

<set field="theList" type="NewList"/>
<set field="theMap" type="NewMap"/>



git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@765284 13f79535-47bb-0310-9956-ffa450edef68
2009-04-15 17:44:47 +00:00
Jacques Le Roux b271a279a0 Fix bug introduced with
if( => if (
while( => while (


git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@763199 13f79535-47bb-0310-9956-ffa450edef68
2009-04-08 12:01:06 +00:00
Jacques Le Roux b9c3ddef08 2d part and end of an effort to remove trailing spaces
[ \t]+$ => "" (empty)
Should be easier to review when committing changes with trailing spaces removed automatically by anyedit or such tool (please refer to http://docs.ofbiz.org/x/mg)

Of course this effort to remove trailing spaces has no functional implications.

Actually, I was doing a 1st commit and as it's long to upload, I got conflicts with r763135
In the meantime I did some refactoring also in *.java and *.groovy files :
){ => ) {
if( => if (
while( => while (
}else => } else
else{ => else {
switch( => switch (
try{ => try {
}catch => } catch
catch( => catch (
}finally{ => } finally {

So these changes are also in this commit, should not be a problem anyway.


git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@763175 13f79535-47bb-0310-9956-ffa450edef68
2009-04-08 10:54:51 +00:00
Adam Heath 57f96dac3b Fix lines that *only* have whitespace.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@759238 13f79535-47bb-0310-9956-ffa450edef68
2009-03-27 16:57:48 +00:00
Adam Heath f8f895bc32 Fix purely empty whitespace lines, and remove trailing whitespace.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@757074 13f79535-47bb-0310-9956-ffa450edef68
2009-03-21 23:24:13 +00:00
David E. Jones c55d1d2fc2 Changed to support loading with component://, based on patch from Ashish in OFBIZ-2244
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@755618 13f79535-47bb-0310-9956-ffa450edef68
2009-03-18 15:36:54 +00:00
Jacques Le Roux 13a934f823 In spirit of Adam's r749341 and following http://java.sun.com/docs/codeconv/html/CodeConventions.doc7.html#489
The idea is also that a lot of code is duplicated and then changed (copy/paste). Hence having a rightly formatted code help to keep it rightly formatted
1st (simple) step : ){ => ) { (I checked all occurrences but of course other pairs of eyeballs are welcome)


git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@750993 13f79535-47bb-0310-9956-ffa450edef68
2009-03-06 17:31:13 +00:00
Jacques Le Roux 6892c51d50 This file has not been updated during the Simple Method Cleanup Effort. See https://issues.apache.org/jira/browse/OFBIZ-2213
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@748971 13f79535-47bb-0310-9956-ffa450edef68
2009-03-01 07:58:04 +00:00
Jacques Le Roux 8a8b5eaada This fix a problem reported on user ML and close (https://issues.apache.org/jira/browse/OFBIZ-2171) "success messages are not displaying properly." - OFBIZ-2171
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@742668 13f79535-47bb-0310-9956-ffa450edef68
2009-02-09 18:32:58 +00:00
Jacques Le Roux 7a259f221f Fixes done automatically by the Label Manager. I changed the wrong ones by hand, see https://issues.apache.org/jira/browse/OFBIZ-2070 - OFBIZ-2070
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@737585 13f79535-47bb-0310-9956-ffa450edef68
2009-01-25 21:41:15 +00:00
David E. Jones ebc039406c Chanded a few more attribute names for consistency, based on feedback from Marco
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@737194 13f79535-47bb-0310-9956-ffa450edef68
2009-01-23 21:30:17 +00:00
Jacques Le Roux 572b7683e0 All tabs to 4 spaces in *.groovy, *.java, *.xml : less problems in future with that aspect...
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@737003 13f79535-47bb-0310-9956-ffa450edef68
2009-01-23 11:08:47 +00:00
Jacques Le Roux b680c6cd4a Some French labels fixes
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@735829 13f79535-47bb-0310-9956-ffa450edef68
2009-01-19 21:25:25 +00:00
Jacques Le Roux 322169e32f French translation
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@735438 13f79535-47bb-0310-9956-ffa450edef68
2009-01-18 11:26:32 +00:00
Jacques Le Roux 9c5e043c53 Cleanup_labels35.patch from Marco Risaliti 'Clean up labels" (https://issues.apache.org/jira/browse/OFBIZ-1780) - OFBIZ-1780
This close this issue.
There are some labels related to geoLocation in this commit, I will commit the geoLocation work as is since I will not have much time this next weeks to work on it. Anyway it's already sufficient as a basis for other parts. 



git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@735402 13f79535-47bb-0310-9956-ffa450edef68
2009-01-18 09:06:03 +00:00
David E. Jones cb3a676f2b Fixed issue with filter-list-by-and operation which wasnt looking for the map attribute, renamed from map-name
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@731880 13f79535-47bb-0310-9956-ffa450edef68
2009-01-06 08:52:26 +00:00
David E. Jones 874f02e9da Manual merge of typecheckcleanup200810 branch as of rev 731346 in that branch, resolved all conflicts; with this BigDecimal is not the native type for many entity fields and is used for many calculations; some work is still needed in certain areas of the project but this covers the most critical ones; thanks especially to Scott for his work on this
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@731851 13f79535-47bb-0310-9956-ffa450edef68
2009-01-06 07:13:36 +00:00
Jacques Le Roux 94225b1a34 Fix issues with now-timestamp-to-env and sequence-id-to-env : their factories names where missing in org.ofbiz.minilang.method.MethodOperation$Factory file
also
<sequenced-id-to-env(.*)env-name => <sequenced-id$1field
<now-timestamp-to-env(.*)env-name => <now-timestamp$1field
both on *SimpleMethods*.xml, *events*.xml, *formula*.xml, *services*.xml, *tests*.xml (previously I only used *events*.xml, *services*.xml, but I guess it's not a big deal for now)




git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@730433 13f79535-47bb-0310-9956-ffa450edef68
2008-12-31 17:47:37 +00:00
Jacques Le Roux 6c10cc1a9c Fix some typos
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@730260 13f79535-47bb-0310-9956-ffa450edef68
2008-12-30 22:09:06 +00:00
Adrian Crum 3d8de29f8a Final work on Unified Expression Language integration. L-values can contain nested expressions.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@729759 13f79535-47bb-0310-9956-ffa450edef68
2008-12-28 18:15:20 +00:00
David E. Jones 0d32641db0 Fixed issue where the attribute value was used for two things, so where it means an entity generic value it is now value-field and an actual String or other type of value is just plain value
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@729707 13f79535-47bb-0310-9956-ffa450edef68
2008-12-28 08:40:44 +00:00
David E. Jones 65b455ac9b The last batch of the major changes to make naming in simple-method attributes more consistent and simplify due to simpler tools; again see the Simple Method Cleanup Effort docs page for details on changes; some additional cleanups may be done based on feedback but this should be most of it
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@729704 13f79535-47bb-0310-9956-ffa450edef68
2008-12-28 08:17:47 +00:00
David E. Jones fe8ed88393 More simple-method cleanups
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@728620 13f79535-47bb-0310-9956-ffa450edef68
2008-12-22 06:26:35 +00:00
David E. Jones 71f1d26a4b More cleanup of simple method attributes to make them more consistent, still quite a bit left to go, working through the file and down to order-map-list, more to come soon to get this finished up so we can move on, note that these changes are and will be documented in the Simple Method Cleanup Effort page in the OFBTECH space on docs.ofbiz.org
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@728520 13f79535-47bb-0310-9956-ffa450edef68
2008-12-21 21:51:23 +00:00
Jacques Le Roux d5f99b443a A modified patch from Erik Wegner "Patch for all language files (*Labels.xml) to correct language order, find duplicates or invalid entries" (https://issues.apache.org/jira/browse/OFBIZ-2073) - OFBIZ-2073
I removed some hunks, see https://issues.apache.org/jira/browse/OFBIZ-2073?focusedCommentId=12656651#action_12656651



git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@726808 13f79535-47bb-0310-9956-ffa450edef68
2008-12-15 21:28:06 +00:00
Adrian Crum 7f50663b15 Implemented FlexibleMapAccessor.getInstance() in mini language.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@726254 13f79535-47bb-0310-9956-ffa450edef68
2008-12-13 18:46:35 +00:00
Jacques Le Roux 438aaaf492 A patch from Chris Howe "Add createOrStore option to create-value in minilang" (https://issues.apache.org/jira/browse/OFBIZ-893) - OFBIZ-893
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@712480 13f79535-47bb-0310-9956-ffa450edef68
2008-11-09 10:49:03 +00:00
Adrian Crum 2f85064cb5 Log simple method improvement - show source of log message.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@709886 13f79535-47bb-0310-9956-ffa450edef68
2008-11-02 14:51:45 +00:00
Jacques Le Roux a66e19d3b4 Typo
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@708473 13f79535-47bb-0310-9956-ffa450edef68
2008-10-28 08:02:54 +00:00
Hans Bakker a16c35484c OFBIZ-1934: Ignore property for condition-expr tag, excellent contribution by Bruno Busco
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@689713 13f79535-47bb-0310-9956-ffa450edef68
2008-08-28 04:17:48 +00:00
Adrian Crum ead3169d5c FlexibleStringExpander refactor.
1. Improved parsing logic - the entire expression is pre-parsed now.
2. Factory method stores parsed expressions in the cache.
3. Single null/empty expression instance - saves on memory.
4. Class names and variable names shortened to reduce object size.
5. Small performance improvements.

The expression cache is set up with no limit. We'll have to see if that needs to be changed. Larger installations might need to limit the expression cache size.


git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@687422 13f79535-47bb-0310-9956-ffa450edef68
2008-08-20 18:50:04 +00:00
Jacques Le Roux e7905f2c8c Fix the anti-pattern
if (* != null && *.size() > 0) { 
where * is a variable name (String or Collection). Rewritten to
    if (UtilValidate.isNotEmpty(*)) {

Done with Eclipse regex replace feature with
search = if \((\w+) *!= *null *&& *(\w+)\.size\(\) *> *0\) *\{
replace = if (UtilValidate.isNotEmpty($1)) {

And of course some hand-work for imports and cleaning. I compiled and tested with ant run-tests

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@686591 13f79535-47bb-0310-9956-ffa450edef68
2008-08-17 07:47:18 +00:00
Adam Heath a9084a6f0d Add license header.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@686256 13f79535-47bb-0310-9956-ffa450edef68
2008-08-15 15:41:20 +00:00
Adam Heath fe7cddc3a2 More use of ServiceRegistry.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@686251 13f79535-47bb-0310-9956-ffa450edef68
2008-08-15 15:29:29 +00:00
Adam Heath e410552cc9 No longer *copy* the extra support files into the classes dir;
instead, just add them straight to the final jar.

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@685934 13f79535-47bb-0310-9956-ffa450edef68
2008-08-14 15:08:14 +00:00
Adam Heath 1dfdb73a7a Add the standard license header.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@685782 13f79535-47bb-0310-9956-ffa450edef68
2008-08-14 06:15:53 +00:00
Adam Heath 8caa026db8 Use a factory pattern to load available MethodOperation
implementations.

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@685778 13f79535-47bb-0310-9956-ffa450edef68
2008-08-14 05:55:17 +00:00
Adam Heath fdd61ca101 Start using annotations; this will make more sense in the next few
days.

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@685447 13f79535-47bb-0310-9956-ffa450edef68
2008-08-13 05:23:26 +00:00
Adam Heath 2617681b51 Remove svn:executable on a bunch of stuff.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@684389 13f79535-47bb-0310-9956-ffa450edef68
2008-08-10 00:53:43 +00:00
Adrian Crum aff5df07e3 Minilang set-calendar improvement - supply default local and time zone when they aren't available.
There was a problem with the set-calendar operation when it was called from the job scheduler - a NPE was thrown. This commit fixes that.


git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@683414 13f79535-47bb-0310-9956-ffa450edef68
2008-08-06 21:13:09 +00:00
Adam Heath bb6796365f Fix generication of Iterate.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@682395 13f79535-47bb-0310-9956-ffa450edef68
2008-08-04 14:16:15 +00:00
Adam Heath cc3c62ffce Generification, enhanced-for, FastMap/FastList changes.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@682246 13f79535-47bb-0310-9956-ffa450edef68
2008-08-04 03:00:54 +00:00
Adam Heath b6a1ae5e5e Another minor optimization; no longer need to specify classpathref in
all the build.xml files.

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@681935 13f79535-47bb-0310-9956-ffa450edef68
2008-08-02 03:41:46 +00:00
Adrian Crum fda2280d4f Small change to the simple-methods.xsd file: changed the set-calendar adjuster attributes to string types. We commonly use expressions for things like this, so these string data types will help avoid XML parser errors.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@681240 13f79535-47bb-0310-9956-ffa450edef68
2008-07-30 23:09:56 +00:00
David E. Jones 2ccff0b5d8 An option I've resisted for a while due to limited flexibility when used, but we have a lot of these common cases so this may be worth it; can now define CrUD services and not have to implement them for common cases; the create, update, and delete ExampleItem services now use this entity-auto implementation instead of explicit simple-methods; those are tested and are working, and other variations on create should too but I haven't tested them yet; this also includes various refactorings to expose nderlying tools in simple method code and make it reusable
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@679058 13f79535-47bb-0310-9956-ffa450edef68
2008-07-23 10:24:58 +00:00
Scott Gray 91bb08eff0 minilang's first-from-list operation now sets the field to null if the list is null or empty, previously the field was left unchanged
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@678116 13f79535-47bb-0310-9956-ffa450edef68
2008-07-19 08:10:46 +00:00
Jacques Le Roux 89cbe8b368 A patch from Markus Studer ""german translations for framework - base, minilang, service, webapp" (https://issues.apache.org/jira/browse/OFBIZ-1878) - OFBIZ-1878
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@676947 13f79535-47bb-0310-9956-ffa450edef68
2008-07-15 16:02:31 +00:00
Adrian Crum f2651c9d47 Bug fix for set-calendar simple method operation.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@673129 13f79535-47bb-0310-9956-ffa450edef68
2008-07-01 16:27:15 +00:00
Adam Heath 1dc13f6105 Number.valueOf changes.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@672898 13f79535-47bb-0310-9956-ffa450edef68
2008-06-30 20:20:37 +00:00
Adam Heath 18391f98a9 The build.xml files are now much smaller and simpler; they reuse a
few global definitions.  1585 lines removed.

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@672657 13f79535-47bb-0310-9956-ffa450edef68
2008-06-29 18:39:36 +00:00