Commit Graph
23 Commits
Author SHA1 Message Date
Nicolas Malin 2c58133e50 Improved: Improve webtools/control/FindGeneric
(OFBIZ-11253)
Update the script to generate xml form to introduce new following features :

   * set equals as operator by default on pk instead of contains, when you use a pk on FindGeneric it's in general to resolve it on completed key.
   * add on tooltip the raw field name
   * add possibility to filter on internal field
   * add sort on column

During this work I also view that the ModelFormField contains an 'IF forest' to analyze each field. I rewrote it to consolidate the analyze by type.
2019-11-10 20:14:34 +01:00
Mathieu Lirzin daa1e6160e Reverted: JSON entity data import and export utility
(OFBIZ-10966)

Implementation was not matching OFBiz code quality requirements.


git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1867342 13f79535-47bb-0310-9956-ffa450edef68
2019-09-22 12:29:54 +00:00
Jacques Le Roux ac288a4e7d Fixed: Export XML data, ,o proper error message displayed if user misses to
select entities 
(OFBIZ-11125)

No Proper error message is displayed if user misses to select entities from the 
list, and throw error message

Thanks: Jayansh Shinde

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1862207 13f79535-47bb-0310-9956-ffa450edef68
2019-06-27 12:03:21 +00:00
Jacques Le Roux b16285dd64 Implemented: JSON entity data import and export utility
(OFBIZ-10966)

Currently, we support import/export entity data in XML format.
  Nowadays JSON is widely used in industry, we can have support for JSON format 
  which looks quite similar to XML support.

Here is example of XML data and it's JSON version
<Party partyId="123456" partyTypeId="PERSON" statusId="PARTY_ENABLED"/>
{“Party”: {"partyId":"123456","partyTypeId":"PERSON","statusId":"PARTY_ENABLED”}}

Design Proposal

We can write entityImportJson and entityImportDirJson services for importing 
JSON from screen and directory respectively.
And the entityExportAllJson service for exporting entity data in JSON.

Import Design
 The import service will perform following operations:
 1.) Validate the input JSON data
 2.) On successful validation, convert JSON to OFBiz's entity model 
     (GenericValue)
 3.) The GenericValue will be inserted in database by some handler class for e.g 
     we can write JsonDataHandler, it will convert given JSON to 
     List<GenericValue>, and finally write it to database 
     (Similar pattern is used in XML import).

Export Design
 Based on existing XML pattern the writeXmlText method of GenericEntity class 
 write the exported data in XML format. 
 In the similar way, we can implement writeJsonText to export data in JSON format.

jleroux: I fixed 2 trivials things and at my request in last patch Jayansh added 
"JSON Data Export All" and "JSON Data Import Dir

Thanks: Jayansh Shinde 

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1862206 13f79535-47bb-0310-9956-ffa450edef68
2019-06-27 11:49:22 +00:00
Jacques Le Roux a60ebb4de2 Fixed: Allow to create single file if both directory and filename is
provided by user
(OFBIZ-11124)

In framework/webtools XML Data Export I reported an issue, Jayansh fixed it:

If user provided file name and output directory in that case the entity xml 
files are generated at both locations, i.e. at root we have test.xml and in user 
provided output directory we have multiple files with [entityname].xml. 

The expected change would be if user provided both output directory and filename 
then file should be created in given directory with given filename.

Thanks: Jayansh Shinde for the fix

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1862045 13f79535-47bb-0310-9956-ffa450edef68
2019-06-25 09:36:03 +00:00
Jacques Le Roux 28e119027c Improved: Use Groovy Truth instead of UtilValidate Class in Groovy
(OFBIZ-11064)

As we all know, Groovy is a powerful language with great built-in functions. 
Groovy Truth[1] is one of them, which is not used properly in our code base. 
We have used UtilValidate Class to validate arguments for Empty or NotEmpty, 
which can easily be done in groovy with built-in functionality[1].
 
Current Code: if (UtilValidate.isNotEmpty(locations)) { ... }
Groovy Built-in Code: if (locations) { ... }
 
[1] - http://groovy-lang.org/semantics.html#Groovy-Truth
 
We need to careful for some points while we change this:
Like:
maxRetry = 0
if (!maxRetry)
{  // Not set, use a default  maxRetry = -1 }

Because groovy evaluates zero to be false, it wouldn't be possible to set
maxRetry to zero.  So it's best not to use groovy truth for null-checks on
numbers in some cases. 
 
Thanks: Pawan Verma

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1860051 13f79535-47bb-0310-9956-ffa450edef68
2019-05-26 10:36:16 +00:00
Suraj Khurana 90e70dd2f2 Fixed: Enable entity timestamp fields.
(OFBIZ-10959)
While working on a Production environment, it is found that for some reason entity timestamp fields are disabled at Search Results screen in Trunk and the previous release branch.

Thanks Pawan Verma for reporting the issue and providing the patch, Jacques, Gil, Mathieu for reviewing it.

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1859915 13f79535-47bb-0310-9956-ffa450edef68
2019-05-25 08:26:33 +00:00
Deepak Dixit ae496e98c1 Improved: Show title information on Entity Data Maintenance page (OFBIZ-10207)
Thanks Aditya Sharma for your contribution

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1824659 13f79535-47bb-0310-9956-ffa450edef68
2018-02-18 10:23:12 +00:00
Deepak Dixit 0a652486ff Fixed: Fixed typo done at r#1818003
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1818606 13f79535-47bb-0310-9956-ffa450edef68
2017-12-18 18:38:54 +00:00
Deepak Dixit 7e19de9966 Improved: Replace all delegator findByAnd and findOne method calling by EntityQuery methods (OFBIZ-10029)
Applied slightly modified patch, rearrange import properly, 
Thanks Suraj Khurana for your contribution

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1818003 13f79535-47bb-0310-9956-ffa450edef68
2017-12-13 12:03:17 +00:00
Deepak Dixit 63258e90f8 Reverted r#1817989, workign fine locally, reverted for now will check and commit again
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1817998 13f79535-47bb-0310-9956-ffa450edef68
2017-12-13 10:42:32 +00:00
Deepak Dixit d1f85a7e5d Improved: Replace all delegator findByAnd and findOne method calling by EntityQuery methods (OFBIZ-10029)
Applied slightly modified patch, rearrange import properly, 
Thanks Suraj Khurana for your contribution

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1817989 13f79535-47bb-0310-9956-ffa450edef68
2017-12-13 09:21:33 +00:00
Deepak Dixit bbd6590816 Fixed: Used entityName instead of null while using FormFactory.readFormDocument method, as this parameter is used to prepare formLocationCache, and its causing issue to view different entity from webtools. Now form will be cached based on enittyName#formName so it will working fine for all possible scenaraio
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1817693 13f79535-47bb-0310-9956-ffa450edef68
2017-12-10 11:07:07 +00:00
Deepak Dixit 1cc65c1d2b Fixed: Fixed typo in FindGeneric.groovy, also removed the visualThemeSetId for common theme. Now common theme will be display on backend visual theme popup. (OFBIZ-9138)
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1806216 13f79535-47bb-0310-9956-ffa450edef68
2017-08-25 19:04:11 +00:00
Nicolas Malin 10af80b1a8 Implemented: Continue the common-theme upload (OFBIZ-9138 Create a common theme)
Five step these step break all the UI
#2 The MacroScreenRenderer class now resolve the macro ftl library location from the model theme
The widget.properties lost all definition now managed by the theme definition

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1806140 13f79535-47bb-0310-9956-ffa450edef68
2017-08-25 09:36:04 +00:00
Deepak Dixit 7bacf44bd4 Improved: Inconsistent String Comparisons, Applied framework groovy patch from jira issue. (OFBIZ-9254)
I found an inconsistency in the code for string comparison statusId.equals("PRUN_COMPLETED") whereas it should be written as "PRUN_COMPLETED".equals(statusId) cause the former can throw NullPointerException if the variable found to be NULL.

Thanks Devanshu Vyas for your contribution.

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1795342 13f79535-47bb-0310-9956-ffa450edef68
2017-05-16 17:20:24 +00:00
Jacques Le Roux 8108bf3c8c Improved: When searched from FindGeneric page it looses entityName from the url
(OFBIZ-9341)

Steps to generate:
1. Go to webtools (https://localhost:8443/webtools/control/main)
2. Click on "Entity Engine" (https://localhost:8443/webtools/control/entitymaint)
3. Click on any entity to view (https://localhost:8443/webtools/control/FindGeneric?entityName=AccommodationClass)
4. Click on "search" button (https://localhost:8443/webtools/control/FindGeneric)

When the search is hit, it looses the entityName from the url as it used to 
happen in previous releases and according to the pattern on other search pages.

Thanks: Aditya Sharma

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1793254 13f79535-47bb-0310-9956-ffa450edef68
2017-04-30 09:54:58 +00:00
Nicolas Malin 5be9a2f2ad Improved: Improve FindGeneric entity screen with xml form (OFBIZ-9217)
Replace the current groovy and ftl form rendering by a dynamic call to screen xml with build the xml form by analyse the entity
The find operation is now realize by the perfomFind service

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1783427 13f79535-47bb-0310-9956-ffa450edef68
2017-02-17 17:00:31 +00:00
Arun Patidar 2bfc816e9b Improved: Removed semicolon from all Groovy files of all components.
(OFBIZ-8652)

Thanks: Rohit Koushal, Jacques Le Roux and Rishi Solanki for the contribution.

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1767764 13f79535-47bb-0310-9956-ffa450edef68
2016-11-02 19:09:13 +00:00
Nicolas Malin 177c83ec1d Performance tests screen has been broken by a bad UtilCache call. Thanks to Pawan Verma for this correction throw OFBIZ-7989.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1757955 13f79535-47bb-0310-9956-ffa450edef68
2016-08-27 07:07:33 +00:00
Deepak Dixit 834691742b (OFBIZ-6274) Renamed OFBiz artefacts from org.ofbiz.* to org.apache.ofbiz.*.Thanks to Taher for working on it.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1752920 13f79535-47bb-0310-9956-ffa450edef68
2016-07-16 10:30:49 +00:00
Arun Patidar a91b9edae9 Applied patch from ticket - OFBIZ-7339 - Replace EntityUtilProperties getPropertyValue method with correct method calls. Thanks Rahul Singh Kushwah and Rishi Solanki for your contribution.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1749882 13f79535-47bb-0310-9956-ffa450edef68
2016-06-23 13:10:51 +00:00
Deepak Dixit 543dd8e488 (OFBIZ-7221) Relocate .groovy files in the framework/webtools component
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1747755 13f79535-47bb-0310-9956-ffa450edef68
2016-06-10 17:16:22 +00:00