Commit Graph
7895 Commits
Author SHA1 Message Date
Adrian Crum f803833df9 ModelFormField.java refactor:
1. Extract FieldInfo class to a separate file.
2. Make FieldInfo thread-safe.
3. Modify FieldInfo subclasses so they include a thread-safe copy method.

This commit fixes a major flaw in the original design. When a widget form is extended, the original design would copy the child FieldInfo state to the parent FieldInfo - so the parent FieldInfo referenced the child form instead of the parent form. With this commit, parent FieldInfo instances  are copied as new instances to the child form - so the parent FieldInfo instances remain unchanged.

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1639927 13f79535-47bb-0310-9956-ffa450edef68
2014-11-15 21:33:51 +00:00
Ashish Vijaywargiya 66e20b8d44 Applied patch from jira issue - OFBIZ-5551 - Cannot delete the record When Server Timezone and Application timeZone are different.
Thanks  SenthilMurugan for reporting the issue and thanks Deepak for providing the patch. 

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1639892 13f79535-47bb-0310-9956-ffa450edef68
2014-11-15 14:22:21 +00:00
Adrian Crum 1a21c100ff Add throws clause to ModelWidgetVisitor.java.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1639886 13f79535-47bb-0310-9956-ffa450edef68
2014-11-15 14:06:32 +00:00
Jacques Le Roux 4330fcd646 Following changes for "PortalPage entity definition wrong. ownerUserLoginId field must be id-vlong-ne" https://issues.apache.org/jira/browse/OFBIZ-5110
Fixes other cases as well

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1639863 13f79535-47bb-0310-9956-ffa450edef68
2014-11-15 12:14:37 +00:00
Ashish Vijaywargiya 87aa7ba1c9 Applied patch from jira issue - OFBIZ-5110 - PortalPage entity definition wrong. ownerUserLoginId field must be id-vlong-ne.
Thanks Roberto for reporting the issue and Thanks Arun for providing the patch. 

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1639837 13f79535-47bb-0310-9956-ffa450edef68
2014-11-15 05:36:10 +00:00
Adrian Crum fd4ea93d14 Fix NPE caused by recent widget refactoring - https://issues.apache.org/jira/browse/OFBIZ-5875.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1639551 13f79535-47bb-0310-9956-ffa450edef68
2014-11-13 23:30:26 +00:00
Jacopo Cappellato 35a4d4f4a8 Improved unit test that was failing when executed in certain platforms.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1639373 13f79535-47bb-0310-9956-ffa450edef68
2014-11-13 15:39:54 +00:00
Jacopo Cappellato 06abae3dfa Enhanced the OFBiz DSL with an alternative way of invoking a service; converted one service call in OrderView.groovy to demonstrate its usage.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1638801 13f79535-47bb-0310-9956-ffa450edef68
2014-11-12 14:45:56 +00:00
Jacopo Cappellato e24c111f05 Added to the OFBiz DSL the ability to invoke the new EntityQuery builder.
Modified two calls in OrderView.groovy to demonstrate the new feature.



git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1638054 13f79535-47bb-0310-9956-ffa450edef68
2014-11-11 09:33:15 +00:00
Adrian Crum 5510c3ea5b Upgraded httpclient libraries. HttpClient defaults to TLS instead of SSLv3.
http://www.apache.org/dist/httpcomponents/httpclient/RELEASE_NOTES-4.3.x.txt

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1637883 13f79535-47bb-0310-9956-ffa450edef68
2014-11-10 15:15:59 +00:00
Nicolas Malin 5bbff9f365 Manage multi pk with sub-sequence on entity-auto (OFBIZ-5800),
Add the possibility to the entity-auto engine on the create action to manage entities with more than 2 primary keys which one is under sub sequence or fromDate, like PerfReview (employeePartyId, employeeRoleTypeId, perfReviewId) or PartyQual (partyId, partyQualTypeId, fromDate).

Improve return message for the create action if the entity value exist and the delete action if the entity value not exist instead of the database message error.


git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1637596 13f79535-47bb-0310-9956-ffa450edef68
2014-11-08 21:00:55 +00:00
Adrian Crum 871ec276fb Fixed UtilProperties.java bug caused by removal of Javolution - https://issues.apache.org/jira/browse/OFBIZ-5857.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1637064 13f79535-47bb-0310-9956-ffa450edef68
2014-11-06 10:08:40 +00:00
Adrian Crum 5f5f4fe087 Comment out recently added entity test because it is still having problems. I will look into this more later.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1637063 13f79535-47bb-0310-9956-ffa450edef68
2014-11-06 10:07:32 +00:00
Adrian Crum da478e9144 Fix JS bug caused by recent screen widget refactoring - https://issues.apache.org/jira/browse/OFBIZ-5856.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1637050 13f79535-47bb-0310-9956-ffa450edef68
2014-11-06 08:24:53 +00:00
Scott Gray 63f5adf671 Fix bug in EntityQuery where the moment specified in filterByDate(moment) was not being honoured. Adds a new method filterByDate(Timestamp, String...) to allow a moment to be specified when explicitly specifying filterByFieldNames. Thanks to Pritam Kute for the report
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1636970 13f79535-47bb-0310-9956-ffa450edef68
2014-11-05 21:43:39 +00:00
Adrian Crum 3e987a2402 Try to fix intermittent entity test failures.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1636896 13f79535-47bb-0310-9956-ffa450edef68
2014-11-05 15:30:47 +00:00
Jacques Le Roux 3e0382835b Fixes the Poodle vulnerability following indications from "The Poodle fixer" at https://issues.apache.org/jira/browse/OFBIZ-5848
We will certainly have to evolve this in the future because this correction forces the protocol to TLSv1.2

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1636864 13f79535-47bb-0310-9956-ffa450edef68
2014-11-05 13:06:19 +00:00
Adrian Crum f25e674873 Extract rendering code from ModelForm.java to rendering classes.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1636437 13f79535-47bb-0310-9956-ffa450edef68
2014-11-03 20:46:34 +00:00
Adrian Crum 46fb78ef34 Remove unused methods from ModelForm.java.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1636383 13f79535-47bb-0310-9956-ffa450edef68
2014-11-03 16:29:40 +00:00
Adrian Crum 087c291998 Cleaned up ModelScreen.java transaction handling - https://issues.apache.org/jira/browse/OFBIZ-4278.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1636374 13f79535-47bb-0310-9956-ffa450edef68
2014-11-03 15:32:11 +00:00
Jacopo Cappellato 66daa32f1a Cleaned up and inproved the code that integrates Groovy in the OFBiz framework:
* Groovy services and Groovy events now use the same util methods from GroovyUtil to parse/execute the scripts
* the script base class is now specified in the base/config/groovy.parameter file rather than in the serviceengine.xml
* the same util methods (DSL) are now available to all Groovy scripts (executed as services, events or widget actions)
* removed a series of unused methods in the GroovyUtil class



git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1636346 13f79535-47bb-0310-9956-ffa450edef68
2014-11-03 13:15:29 +00:00
Adrian Crum 8e57e863f0 Major overhaul of ModelForm.java:
1. Class and its nested classes were not thread-safe.
2. Bugs caused by C&P errors.
3. The "extends" feature had problems:
  3.1 Only a few class members were inherited from the parent form.
  3.2 Child forms modified the state of the parent form.
4. Bad null/empty checking.
5. Inefficient code.

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1636339 13f79535-47bb-0310-9956-ffa450edef68
2014-11-03 12:42:03 +00:00
Adrian Crum 833f3b4dad Bug fix and code cleanup in form widget:
1. Cache keys must include delegator name. Multiple forms based on the same entity name might be completely different due to the delegator being used.

2. Do not hold references to ModelReader and DispatchContext after construction.

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1636158 13f79535-47bb-0310-9956-ffa450edef68
2014-11-02 17:48:20 +00:00
Adrian Crum 25a4a9997f Small fixup for my last commit.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1636139 13f79535-47bb-0310-9956-ffa450edef68
2014-11-02 14:22:29 +00:00
Adrian Crum 9275221812 Delegate most tree widget actions to ModelWidgetAction. Tree nodes will support an <actions> element like other widgets, but that is still a WIP.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1636137 13f79535-47bb-0310-9956-ffa450edef68
2014-11-02 14:03:02 +00:00
Adrian Crum 2ac5f3cb46 Delegate most menu widget actions to ModelWidgetAction.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1636102 13f79535-47bb-0310-9956-ffa450edef68
2014-11-02 12:03:09 +00:00
Adrian Crum 21e094915a Delegate most form widget actions to ModelWidgetAction.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1636096 13f79535-47bb-0310-9956-ffa450edef68
2014-11-02 09:08:21 +00:00
Adrian Crum 4a62dd6107 Move form widget artifact info code to a separate class. This eliminates a lot of duplicate code and it should speed up artifact info gathering. Also converted form widget to reuse some of the screen widget action models.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1636077 13f79535-47bb-0310-9956-ffa450edef68
2014-11-02 01:21:39 +00:00
Adrian Crum d389cdc2a9 Revert rev 1636071. I broke something.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1636073 13f79535-47bb-0310-9956-ffa450edef68
2014-11-02 00:06:34 +00:00
Adrian Crum 89ad95e8d7 Move form widget artifact info code to a separate class. This eliminates a lot of duplicate code and it should speed up artifact info gathering. Also converted form widget to reuse screen widget action models.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1636071 13f79535-47bb-0310-9956-ffa450edef68
2014-11-01 23:47:47 +00:00
Adrian Crum 46f16abccd Add a form field visitor.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1636070 13f79535-47bb-0310-9956-ffa450edef68
2014-11-01 23:43:06 +00:00
Adrian Crum f69d5fbe73 Move screen widget artifact info code to a separate class. This eliminates a lot of duplicate code and it should speed up artifact info gathering.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1636031 13f79535-47bb-0310-9956-ffa450edef68
2014-11-01 20:15:27 +00:00
Adrian Crum d96c82438c Add a screen widget action visitor.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1636030 13f79535-47bb-0310-9956-ffa450edef68
2014-11-01 20:13:41 +00:00
Adrian Crum de2bae353a Add a screen widget model visitor. This will enable us to externalize a lot of unrelated code that has been included in the models, as well as provide a cleaner API for the renderers.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1635990 13f79535-47bb-0310-9956-ffa450edef68
2014-11-01 16:57:07 +00:00
Adrian Crum 0b0aedacc6 Continue working on making widget models thread safe.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1635984 13f79535-47bb-0310-9956-ffa450edef68
2014-11-01 16:11:46 +00:00
Adrian Crum 9b9ef5eea4 Remove unused rawString method from screen widgets. I will be committing a widget visitor soon, so if anyone really wants to generate screen widget XML they can create a visitor implementation for it.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1635964 13f79535-47bb-0310-9956-ffa450edef68
2014-11-01 15:13:12 +00:00
Adrian Crum 21c0969f4f Continue working on making widget models thread safe.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1635961 13f79535-47bb-0310-9956-ffa450edef68
2014-11-01 14:56:07 +00:00
Adrian Crum a35f9e3b4e Continue working on making widget models thread safe.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1635957 13f79535-47bb-0310-9956-ffa450edef68
2014-11-01 14:28:41 +00:00
Adrian Crum 6976bd1fa6 Begin working on making widget models thread safe.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1635917 13f79535-47bb-0310-9956-ffa450edef68
2014-11-01 10:49:29 +00:00
Adrian Crum e7794e5824 Finish removing Javolution from the base component.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1635910 13f79535-47bb-0310-9956-ffa450edef68
2014-11-01 09:55:57 +00:00
Adrian Crum 8827dfa87a Remove Javolution from the webapp component.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1635909 13f79535-47bb-0310-9956-ffa450edef68
2014-11-01 09:32:53 +00:00
Adrian Crum df526ee5cf Remove Javolution from the testtools component.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1635907 13f79535-47bb-0310-9956-ffa450edef68
2014-11-01 09:31:51 +00:00
Adrian Crum c039bb0330 Remove Javolution from the entityext component.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1635906 13f79535-47bb-0310-9956-ffa450edef68
2014-11-01 09:31:06 +00:00
Jacopo Cappellato 3552f65800 Merged json-integration-refactoring into trunk:
* moved the json-lib jar (json-lib-2.2.3-jdk15.jar) from the framework/webapp to the framework/base component
* removed the SQL select Parser.jj (parser definition) and its unit tests: it was not used (and never used) by any OFBiz code
* removed the JSON.jj (parser definition) and its unit tests: it was not used (and never used) by any OFBiz code apart from the JSON Converters (now migrated to json-lib, see next items in this list) some utility methods in UtilIO.java (that have been removed too because they have never been used in OFBiz) 
* removed the JavaCC jar and related ant scripts because no more needed after the removal of Parser.jj and JSON.jj
* converted the JSONConverter code that was based on JSON.jj to Jackson
* added a new class org.ofbiz.base.lang.JSON that have been contributed by Adrian Crum that is a facade for simplifying the client code and for hiding the specific JSON library being used
* removed an unused method: ImageManagementServices.toJsonObject(...)
* added TestBooleanConverters to the list of tests
* new unit tests for the new JSON converters
* refactored Ajax code in applications to use the common request json response rather than a custom method
* OFBIZ-5790 Implemented ability to call a service event by passing its input parameters in the request body as JSON data. These classes provide a simple mechanism, based on the request's content type, that can be extended to support other formats (e.g. XML).

This commit resolves OFBIZ-4572, OFBIZ-3365, OFBIZ-5751, OFBIZ-5790



git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1635901 13f79535-47bb-0310-9956-ffa450edef68
2014-11-01 09:06:42 +00:00
Ashish Vijaywargiya e6600ee704 Applied patch from jira issue - OFBIZ-5842.
============================================
As we have Entity Query Builder implemented in trunk (OFBIZ-4053) and now we should add Junit tests for its methods.

As per initial analyses, we can write Junit tests for following methods of Entity Query Builder:

1. queryList()
2. queryFirst()
3. queryCount()
4. queryOne()
5. distinct()
6. filterByDate()
7. orderBy()
8. select()
9. cursorForwardOnly()
10. cursorScrollSensitive()
11. cursorScrollInSensitive()
12. fetchSize()
13. maxRows()
14. cache()
15. queryIterator()
=============================================
Thanks Arun for the contribution. 
Thanks Scott, Jacopo and Adrian for your help in reviewing the patch content. 

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1635894 13f79535-47bb-0310-9956-ffa450edef68
2014-11-01 05:59:31 +00:00
Adrian Crum b887db4aef Remove Javolution from the widgets component.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1635878 13f79535-47bb-0310-9956-ffa450edef68
2014-10-31 23:13:03 +00:00
Adrian Crum d6f7e2aa5a Fixup for my previous commit.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1635877 13f79535-47bb-0310-9956-ffa450edef68
2014-10-31 23:08:29 +00:00
Adrian Crum 159734866e Remove Javolution from the service component.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1635860 13f79535-47bb-0310-9956-ffa450edef68
2014-10-31 20:45:45 +00:00
Adrian Crum 79dc510f05 Remove Javolution from most of the base component. I didn't do the converters to avoid merge conflicts with the JSON branch.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1635846 13f79535-47bb-0310-9956-ffa450edef68
2014-10-31 19:29:46 +00:00
Adrian Crum 38a96bab6c Remove Javolution from the common component.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1635816 13f79535-47bb-0310-9956-ffa450edef68
2014-10-31 17:13:45 +00:00