Commit Graph
17493 Commits
Author SHA1 Message Date
Scott Gray e36ecb4c39 Make references to Delegator and LocalDispatcher transient and provide methods to retrieve the objects when missing in ProductCofigWrapper and ProductConfigItemContentWrapper. Prevents non-serializable exceptions from being thrown when attempting to serialize a ShoppingCart object. Thanks to Arun Patidar for the patch.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1140358 13f79535-47bb-0310-9956-ffa450edef68
2011-06-27 22:58:16 +00:00
Sascha Rodekamp bb87a9eb87 State dropdown only finds states and does not include county information (https://issues.apache.org/jira/browse/OFBIZ-4270) - I added a separte Entity which defines all countries which should show their states in the drop down list. It also checks states recursivly, to list all states (i.e.) for GB.
Orig Msg: If you are on this page https://demo-trunk.ofbiz.apache.org:8443/ecommerce/control/newcustomer select USA from the country drop down and it will display all the USA states, similarly it works just fine for Spain but if you try once again with either United Kingdom or France it will show "No States/Provinces exist".

Both UK and France have Counties saved in the datamodel but the form does not lookup in the correct location as they are not defined as State.


git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1140103 13f79535-47bb-0310-9956-ffa450edef68
2011-06-27 11:01:06 +00:00
Adam Heath 7e99311694 FEATURE: Add field-set feature to entity engine. You can now
put different fields into different field sets, and when you select any
field in a particular set, all fields in that set will be fetched.  This
also cascades upwards thru views, including alias-all and alias.

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1139922 13f79535-47bb-0310-9956-ffa450edef68
2011-06-26 19:19:06 +00:00
Adam Heath ce76187cb0 FEATURE: <view-conditon> on <view-link> is now supported.
This allows for LEFT JOINs that have additional filtering applied to
them.  FIXME: not implemented on theta- database types.

This feature depends on the following svn commits: 1139856, 1139869,
1139870, 1139879, 1139919.

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1139921 13f79535-47bb-0310-9956-ffa450edef68
2011-06-26 19:19:00 +00:00
Adam Heath 9213dd110e FIX/OPTIMIZE: Do column-name munging once, and save the
output, instead of doing it each time the sql string is generated.  This
solidifies the definition of getColValue() and getColName().  colName is
the identifier used to refer to the column, it's generally what comes
after the AS keyword.  colValue is used to the left of AS, and in
CONDITION/ORDER BY/GROUP BY clauses.

This change should allow EntityFieldValue to be rewritten, so it doesn't
have the hack of having to deal with the entityAliasStack.  In theory,
it can just call getColName/getColValue(I'm not certain which is the
correct one for this case).

Also, EntityFieldValue should not have that hack at all, it should have
been put into a completely separate class.

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1139919 13f79535-47bb-0310-9956-ffa450edef68
2011-06-26 19:15:40 +00:00
Adam Heath c391207fac OPTIMIZE: Switch the database feature detection code to use a loop and a registry
of detectable features.  As a side effect, the output strings are now
aligned.

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1139918 13f79535-47bb-0310-9956-ffa450edef68
2011-06-26 19:15:34 +00:00
Adam Heath 217b45ece6 FEATURE: Add support for webapp in ofbiz-component.xml that
has a null location.  Such a webapp will show up in the backend menus,
but no catalina/jetty webapp will be automatically created.

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1139917 13f79535-47bb-0310-9956-ffa450edef68
2011-06-26 19:15:28 +00:00
Adam Heath 4db7c4ab2d FEATURE: Add relation ShipmentMethodType to entity ProductStoreShipmentMeth.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1139916 13f79535-47bb-0310-9956-ffa450edef68
2011-06-26 19:15:22 +00:00
Adam Heath 0e1c411eaf FIX: Fix multiple mounting of webapps for different vhosts; the unique key
used for duplication detection needs to contain more than just the mount
point.

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1139891 13f79535-47bb-0310-9956-ffa450edef68
2011-06-26 18:11:50 +00:00
Adam Heath bedb2f9d5e FIX: service:createAlsoBoughtProductAssocs was run in a
transaction, but on large systems, when fetching all orders and all
bought products, then running createAlsoBoughtProductAssocsForOrder in a
loop, the outer transaction would time out.  Turn off transactions on
the outer layer, and do it all internally.

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1139890 13f79535-47bb-0310-9956-ffa450edef68
2011-06-26 18:11:44 +00:00
Adam Heath f7ddd562d4 OPTIMIZE: in createAlsoBoughtProductAssocs, move the
condition creation logic outside of the try/catch.

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1139889 13f79535-47bb-0310-9956-ffa450edef68
2011-06-26 18:11:38 +00:00
Adam Heath 32f514d948 FIX: Protect against a null return from getFieldDefs().
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1139888 13f79535-47bb-0310-9956-ffa450edef68
2011-06-26 18:11:32 +00:00
Adam Heath 0e1df8efa8 FIX: Protect against a null return from getRelations().
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1139887 13f79535-47bb-0310-9956-ffa450edef68
2011-06-26 18:11:24 +00:00
Adam Heath 162d94866d FIX: Properly detect if a UNIONED query is being requested.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1139886 13f79535-47bb-0310-9956-ffa450edef68
2011-06-26 18:11:18 +00:00
Adam Heath ecb6e45a0f FIX: Protect against a null return from getFieldAlls().
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1139885 13f79535-47bb-0310-9956-ffa450edef68
2011-06-26 18:11:12 +00:00
Adam Heath 23296d0784 FIX: Add the sql excludes to the dynamic view.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1139884 13f79535-47bb-0310-9956-ffa450edef68
2011-06-26 18:11:06 +00:00
Adam Heath d3469e847e OPTIMIZE: Replace all request/response with httpRequest/httpResponse.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1139883 13f79535-47bb-0310-9956-ffa450edef68
2011-06-26 18:10:59 +00:00
Adam Heath 72a2daa2e0 OPTIMIZE: Remove use of HttpServletResponseWrapper.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1139882 13f79535-47bb-0310-9956-ffa450edef68
2011-06-26 18:10:53 +00:00
Adam Heath 87c32f3239 INDENT: Remove spaces from lines that are only spaces.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1139881 13f79535-47bb-0310-9956-ffa450edef68
2011-06-26 18:10:47 +00:00
Adam Heath 0d8288eb1a FIX: Fix NPE when converting a view to xml that was originally created as
a dynamic-view.

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1139880 13f79535-47bb-0310-9956-ffa450edef68
2011-06-26 18:10:40 +00:00
Adam Heath 6b73f3e3ac FEATURE: Start passing ModelFieldTypeReader around(nothing
uses it yet, coming soon).  This will allow view entities to do stuff
with field type definitions.

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1139879 13f79535-47bb-0310-9956-ffa450edef68
2011-06-26 18:10:29 +00:00
Adam Heath 421ce3102a OPTIMIZE: Optimize ModelConversion looping logic, so that
it's not walking the map's values; instead, do custom management of a
standard array.

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1139878 13f79535-47bb-0310-9956-ffa450edef68
2011-06-26 18:10:22 +00:00
Adam Heath c1264c29bf OPTIMIZE: expandAllAliasAlls: Fetch the entityAlias into a
local variable.

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1139877 13f79535-47bb-0310-9956-ffa450edef68
2011-06-26 18:10:16 +00:00
Adam Heath d50418875f OPTIMIZE: ViewConditionExpr.createCondition: Use == for EntityOperator
equality, instead of equals(); slight speedup, and the code looks a bit nicer.

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1139876 13f79535-47bb-0310-9956-ffa450edef68
2011-06-26 18:10:10 +00:00
Adam Heath 5a648ab76d OPTIMIZE: Lookup the correct condition operator in the
constructor for view condition classes.

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1139875 13f79535-47bb-0310-9956-ffa450edef68
2011-06-26 18:10:04 +00:00
Adam Heath 7d82390c68 OPTIMIZE: Changed a bunch of errors/warnings/exceptions to be more
consistent, and prefix each message with [entityName] so that fixing the
problem in the model definition becomes easier.

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1139874 13f79535-47bb-0310-9956-ffa450edef68
2011-06-26 18:09:57 +00:00
Adam Heath eb657bf2b5 OPTIMIZE: Make a bunch of support classes in ModelView be final.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1139873 13f79535-47bb-0310-9956-ffa450edef68
2011-06-26 18:09:50 +00:00
Adam Heath 151fd9e428 FEATURE: Allow for setting the ViewEntityCondition on
ModelViewLink programmatically.

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1139872 13f79535-47bb-0310-9956-ffa450edef68
2011-06-26 18:09:44 +00:00
Adam Heath c693076ab6 FIX: Fix NPE in ModelAliasAll.iterator(), when
fieldsToExclude is null.

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1139871 13f79535-47bb-0310-9956-ffa450edef68
2011-06-26 18:09:38 +00:00
Adam Heath a4fbfd05ec FIX: EntityFieldValue has a helper method for fetching the
ModelField; use that instead of fetching the ModelField directly from
the entity.  This is a fix for view-conditions, as the EntityFieldValue
has an internal ModelViewEntity that it uses to fetch the field;
fetching the raw fieldName was not correct in these cases.

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1139870 13f79535-47bb-0310-9956-ffa450edef68
2011-06-26 18:09:32 +00:00
Adam Heath f75220c219 FIX: getModelField: when fetching the ModelField, handle the
case of the field being part of a ModelViewEntity.

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1139869 13f79535-47bb-0310-9956-ffa450edef68
2011-06-26 18:08:53 +00:00
Adam Heath 939c932983 OPTIMIZE: ViewEntityCondition.createCondition: fetch the lhs
field into a local variable.

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1139868 13f79535-47bb-0310-9956-ffa450edef68
2011-06-26 18:08:48 +00:00
Adam Heath 3338c7743d OPTIMIZE: ViewEntityCondition.createCondition: move the
fetching of lhs a little bit earlier.

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1139867 13f79535-47bb-0310-9956-ffa450edef68
2011-06-26 18:08:42 +00:00
Adam Heath 829da95986 FEATURE: Refactored to support -help/-? anywhere; also, cmdline parse errors now
send help to System.err, like a normal unix program.

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1139866 13f79535-47bb-0310-9956-ffa450edef68
2011-06-26 18:08:37 +00:00
Adam Heath a92bcce610 OPTIMIZE: The internal loaderArgs variable is now a list instead of a String
array.

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1139864 13f79535-47bb-0310-9956-ffa450edef68
2011-06-26 18:08:32 +00:00
Adam Heath 83bdc59a57 OPTIMIZE: All the fullinit code is no longer inside an if; instead, if fullinit is
not wanted, do an early return.  This causes the code to remove one
indent level.

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1139863 13f79535-47bb-0310-9956-ffa450edef68
2011-06-26 18:08:26 +00:00
Adam Heath 92bf6d030d OPTIMIZE: The help method now takes a PrintStream parameter, to which the help is
sent.

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1139862 13f79535-47bb-0310-9956-ffa450edef68
2011-06-26 18:08:20 +00:00
Adam Heath 2e30fc08d2 OPTIMIZE: Move help printing to separate method.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1139861 13f79535-47bb-0310-9956-ffa450edef68
2011-06-26 18:08:15 +00:00
Adam Heath 6f3c366f48 FIX: When clearing the cart, also clear the attributes map
and orderAttributes list.

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1139860 13f79535-47bb-0310-9956-ffa450edef68
2011-06-26 18:08:10 +00:00
Adam Heath 5427f8e25a FIX: createOrder(userLogin) wasn't using the cart's
webSiteId.

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1139859 13f79535-47bb-0310-9956-ffa450edef68
2011-06-26 18:08:04 +00:00
Adam Heath cfd16faa4e FIX: Some generics compile fixes.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1139858 13f79535-47bb-0310-9956-ffa450edef68
2011-06-26 18:07:58 +00:00
Adam Heath 4b81dff083 FIX: Fix some null comparisons, instead use ?has_content.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1139857 13f79535-47bb-0310-9956-ffa450edef68
2011-06-26 18:07:50 +00:00
Adam Heath 8fba300516 FIX: When the rhs was an EntityFieldValue, the wrong model field was being
checked(it was checking the left field).

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1139856 13f79535-47bb-0310-9956-ffa450edef68
2011-06-26 18:07:44 +00:00
Adam Heath de833d793f FIX: Fix rendering of forms that have no fields defined.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1139855 13f79535-47bb-0310-9956-ffa450edef68
2011-06-26 18:07:38 +00:00
Adam Heath e5cc6e81f9 FIX: service:createEmailAddress: Don't *require* nonpk ContactMech
fields.

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1139854 13f79535-47bb-0310-9956-ffa450edef68
2011-06-26 18:07:33 +00:00
Adam Heath 62e143afa2 OPTIMIZE: Turn off some additional debug log calls for
catalina-related sources.

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1139853 13f79535-47bb-0310-9956-ffa450edef68
2011-06-26 18:07:29 +00:00
Adam Heath 7047b2b80b FEATURE: Add support to Debug.logFoo() for using %-style format
strings.

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1139852 13f79535-47bb-0310-9956-ffa450edef68
2011-06-26 18:07:24 +00:00
Adam Heath 0653d3a7d1 FEATURE: When doing bulk creation of tables, foreign key indices,
and declared indices, do the work in parallel.  Also, when the database
does not support wildcard looking of primary key info, do the per-table
lookup in parallel.

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1139851 13f79535-47bb-0310-9956-ffa450edef68
2011-06-26 18:07:18 +00:00
Hans Bakker 7e07ec7ad5 improve log messages (add domainname)
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1139703 13f79535-47bb-0310-9956-ffa450edef68
2011-06-26 03:11:17 +00:00
Adam Heath 1af60a7143 FEATURE: Add a thread pool to GenericHelper; this is per datasource.
Nothing makes use of this yet.

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1139700 13f79535-47bb-0310-9956-ffa450edef68
2011-06-26 02:50:49 +00:00