Commit Graph
10472 Commits
Author SHA1 Message Date
Jacques Le Roux cd75b72260 A patch from Leon for ""Value" attribute of hidden form field is overridden by same name value in context" https://issues.apache.org/jira/browse/OFBIZ-5904
Uses URLEncoder.encode while rendering a link
Uses StringUtil.htmlEncoder.encode while rendering a form field. 

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1644904 13f79535-47bb-0310-9956-ffa450edef68
2014-12-12 14:46:56 +00:00
Jacopo Cappellato ee209c08f6 Moved to the Attic the framework/sql component.
The framework/sql was an attempt to create a specialized SQL parser for the OFBiz entity engine. The idea was to use a standardized SQL string that the parser would convert to entity conditions and Delegator calls. So, you could use the same SQL string on any database. The component was never finished.


git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1644469 13f79535-47bb-0310-9956-ffa450edef68
2014-12-10 16:24:48 +00:00
Jacopo Cappellato afbf52ff23 Converted from warning to info two startup messages informing about the mechanism used to retrieve pk information from the database.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1644354 13f79535-47bb-0310-9956-ffa450edef68
2014-12-10 09:11:47 +00:00
Jacopo Cappellato 79dd228162 OFBIZ-5146: added support for three new ModelViewEntity functions for the extraction of year, month, day from a date field: extract-year, extract-month, extract-day.
They are mapped to the Standard SQL:2011 EXTRACT function that is already supported by several DBMS including PostgreSQL and MySQL (but not yet Derby).



git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1644348 13f79535-47bb-0310-9956-ffa450edef68
2014-12-10 08:25:45 +00:00
Jacopo Cappellato 011cf444b9 Fixed NPE introduced with rev. 1644015
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1644088 13f79535-47bb-0310-9956-ffa450edef68
2014-12-09 15:28:56 +00:00
Ashish Vijaywargiya 9e044d163a Applied patch from jira issue - OFBIZ-5902 - Fetch configurable settings data driven by replacing UtilProperties.getPropertyValue() method with EntityUtilProperties.getPropertyValue(). Thanks so much Arun for this important contribution.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1644015 13f79535-47bb-0310-9956-ffa450edef68
2014-12-09 10:09:22 +00:00
Adrian Crum fe1a35d9af Screen widgets - some code cleanup plus add some accessor methods.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1643683 13f79535-47bb-0310-9956-ffa450edef68
2014-12-07 15:23:55 +00:00
Adrian Crum 50811e5a51 Screen widgets - clean up some object types around SectionsRenderer class.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1643584 13f79535-47bb-0310-9956-ffa450edef68
2014-12-06 18:50:10 +00:00
Ashish Vijaywargiya 9cc29f49fe Applied patch from jira issue - OFBIZ-5898 - Tenant should run with specified domain name. Front store should support multi tenant feature. Thanks so much Arun for the contribution.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1643510 13f79535-47bb-0310-9956-ffa450edef68
2014-12-06 09:22:23 +00:00
Jacopo Cappellato 6cb3300f90 Added a check to prevent client code holding a reference to a "tenant" delegator to access super/meta tenant tables. Thanks to Arun Patidar for spotting this and for discussing with me the proper solution.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1643499 13f79535-47bb-0310-9956-ffa450edef68
2014-12-06 08:01:06 +00:00
Jacopo Cappellato 1f802e5e77 Added to all the Tomcat connectors the commented out setting for the "address" parameter: this is useful when you run multiple instances of OFBiz in the same server each bound to a different hostname/IP address.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1643315 13f79535-47bb-0310-9956-ffa450edef68
2014-12-05 15:05:20 +00:00
Nicolas Malin a87126d4a7 Complete the entity-auto engine for manage a service can be wait a pk or not. In this last case the field need to present on OUT part. This appears when you have a fromDate and you offer the possibility to user to indicate it, otherwise it's instantiate with now. It's a small improvement to complete the issue OFBIZ-5800, you have an example with entity PartyQual and the screen humanres/control/EditEmployeeQuals?partyId=DemoEmployee
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1643303 13f79535-47bb-0310-9956-ffa450edef68
2014-12-05 14:49:36 +00:00
Jacopo Cappellato 2012d7edd8 Added code to ignore the optional charset as the key to retrieve the requestBodyMapHandler. For example the same handler will be found and used when the Content-Type header is set as:
application/json
application/json;charset=utf-8
application/json;charset=UTF-8



git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1643184 13f79535-47bb-0310-9956-ffa450edef68
2014-12-05 08:18:20 +00:00
Jacopo Cappellato 652ff50044 Two Groovy DSL descriptors for Eclipse and IntelliJ in order to get the autocompletion and similar features while editing Groovy files in OFBiz.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1643183 13f79535-47bb-0310-9956-ffa450edef68
2014-12-05 08:16:22 +00:00
Jacopo Cappellato 0e421f293e OFBIZ-5894 When ContentWorker.renderContentAsText is used to render content that have electronicText with empty textData then it renders a string with the "null" value: this commit fix the issue. Thanks to Deepak Dixit for the bug report and fix.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1643088 13f79535-47bb-0310-9956-ffa450edef68
2014-12-03 10:51:52 +00:00
Jacopo Cappellato 373e0aba28 Moved the "bi" component from the framework to the specialpurpose folder; moved all the dependencies (client code) on the "bi" component from applications components to the "bi" component itself.
Now the "bi" component contains all the dimensions/facts/star schemas and all the logic to populate them and can be easily enabled/disabled.


git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1642027 13f79535-47bb-0310-9956-ffa450edef68
2014-11-27 06:14:06 +00:00
Jacopo Cappellato 0e449a6874 Fixed issue happening during ./ant create-tenant target on some databases (e.g. MySQL) where milliseconds are not stored: the order in which the Component records were selected could be different from the order they were inserted, causing some data loading issues.
Also fixed some commented out code.
Thanks to Rohit Kaushal for the initial version of the patch and to Arun Patidar for the review and support.


git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1641804 13f79535-47bb-0310-9956-ffa450edef68
2014-11-26 13:09:40 +00:00
Jacques Le Roux aee44a7bfc A patch from Deepak Dixit for "EntityListIterator Not Closed for Entity JobSandbox, caught in Finalize" https://issues.apache.org/jira/browse/OFBIZ-5885
EntityListIterator Not Closed for Entity JobSandbox in ServiceUtil.purgeOldJobs method. Need to close the entity list iterator properly.

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1641548 13f79535-47bb-0310-9956-ffa450edef68
2014-11-25 09:14:36 +00:00
Jacques Le Roux 82506bb7cc It's not quite clear to me why Date.CultureInfo.formatPatterns.longTime from date.js returns ms (always .000 it seems). I don't know if this would not happen, but anyway I prefer to assign the value to the calendar out of the block which changes the value.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1641165 13f79535-47bb-0310-9956-ffa450edef68
2014-11-23 08:49:48 +00:00
Jacques Le Roux c680b1c262 A patch from Gareth Carter for "jQuery datetimepicker popup time value is not set correctly from an existing value" https://issues.apache.org/jira/browse/OFBIZ-5883
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1641131 13f79535-47bb-0310-9956-ffa450edef68
2014-11-22 22:48:44 +00:00
Adrian Crum 865c3ef338 Fixed a bug in the form widgets that was caused by recent refactoring - https://issues.apache.org/jira/browse/OFBIZ-5882.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1641087 13f79535-47bb-0310-9956-ffa450edef68
2014-11-22 15:56:41 +00:00
Jacques Le Roux d244ee435b A slightly modified patch from Gareth Carter for "<@htmlTemplate.renderDateTimeField does not parse date string based on input format" https://issues.apache.org/jira/browse/OFBIZ-5850
Commit 1626419 changed htmlFormMacroLibrary.ftl renderDateTimeField to use Date.parse instead of Date.parseExact.
https://code.google.com/p/datejs/wiki/APIDocumentation states Date.parse will use current CultureInfo for formats but for parsing ISO yyyy-MM-dd from hidden field, need to use parseExact.
I spotted this when CultureInfo was en-GB and selecting 2014-11-01 on any date field (i18n field displays 11/01/2014 instead of 01/11/2014)
For November all days after the 12th display correctly

jleroux: I simply removed the line added in the block which remove the dot and 000 ms in date/time string. I did not see any reason why this was needed. I modified the comment on this block for faster understanding.

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1641066 13f79535-47bb-0310-9956-ffa450edef68
2014-11-22 14:15:54 +00:00
Jacques Le Roux 682c9014a2 Fixes and completes r1640588 and more minor things which were left after the change from run-install to load-demo
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1640727 13f79535-47bb-0310-9956-ffa450edef68
2014-11-20 12:18:59 +00:00
Jacopo Cappellato 94c01378ce Removed the findOne and findList methods from the OFBiz DSL: with the new support for the Entity Query Builder (thanks Scott) we can then run much more powerful queries in a simpler way.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1640679 13f79535-47bb-0310-9956-ffa450edef68
2014-11-20 05:28:49 +00:00
Jacques Le Roux d6c2d35d34 Inconsistencies related to the "java -jar ofbiz.jar" commands when used with arguments https://issues.apache.org/jira/browse/OFBIZ-5872
The help gives you:
c:\projectsASF\ofbiz>java -jar ofbiz.jar -help

Usage: java -jar ofbiz.jar [command] [arguments]
-both    -----> Run simultaneously the POS (Point of Sales) application and OFBiz standard
-help, -? ----> This screen
-install -----> Run install (create tables/load data)
-pos     -----> Run the POS (Point of Sales) application
-setup -------> Run external application server setup
-start -------> Start the server
-status ------> Status of the server
-shutdown ----> Shutdown the server
-test --------> Run the JUnit test script
[no config] --> Use default config
[no command] -> Start the server w/ default config

But actually only the -help, -status and -shutdown command need a dash. 

For now we decided to change the documentation generated by the help command to remove dashes when they are not needed.

To change 
-install -----> Run install (create tables/load data)
by
-load-data -----> Create tables/load data

To comment out the 
-setup -------> Run external application server setup
line

When done, we will try to have things consistent and re-add the missing dashes to the commands and in the help. Then the "Technical production setup guide" should be updated, pfew...

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1640588 13f79535-47bb-0310-9956-ffa450edef68
2014-11-19 16:27:49 +00:00
Jacques Le Roux afac2070b3 With Tomcat 7.0.57 we no longer need to force the TLS version to v1.2
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1640299 13f79535-47bb-0310-9956-ffa450edef68
2014-11-18 10:33:50 +00:00
Jacques Le Roux d2104a85af Updates embedded Tomcat to 7.0.57 - https://issues.apache.org/jira/browse/OFBIZ-5881
Notably related to OFBIZ-5848 (Poodle) changes in Coyote:

Add support for TLSv1.1 and TLSv1.2 for APR connector. Based upon a patch by Marcel Šebek. This feature requires Tomcat Native library 1.1.32 or later. (schultz/jfclere)
Add Disable SSLv3 by default for JSSE based HTTPS connectors (BIO and NIO). The change also ensures that SSLv2 is disabled for these connectors although SSLv2 should already be disabled by default by the JRE. (markt)
Add Disable SSLv3 by default for the APR/native HTTPS connector. (markt)

I will test later if we can get rid of forcing TLSv2 in OFBiz

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1640288 13f79535-47bb-0310-9956-ffa450edef68
2014-11-18 09:20:38 +00:00
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