Commit Graph
19 Commits
Author SHA1 Message Date
Pawan Verma e19b12eae9 Improved: Replace explicit type argument with diamond operator(OFBIZ-11828)
Since Java 1.7, when defining generic types it is unnecessary to redefine those types in the constructor when it is already done in the declared type.
2020-06-28 01:04:51 +05:30
Jacques Le Roux c34491892a Improved:
Implemented:
Documented:
Completed:
Reverted:
Fixed:
Improved: no functional change
(OFBIZ-)
Explanation
Thanks:
2020-02-27 14:36:26 +01:00
Nicolas Malin 1ee1ec76d6 Fixed: Change 'restMethod' by '_method' in request parameters
(OFBIZ-11007)

Some issue has been introduce on the previous commit 6e1c7b5 [1], corrected by this one :
  * the view link on ListGeneric failed
  * the paginate on ListGeneric failed

I also simplify the url writing with delegate the entity path generation and translation
to two function on EntityUtil : entityToPath and getPkValuesMapFromPath

thanks to Pawan Verma to spot the pagination problem

[1] https://gitbox.apache.org/repos/asf?p=ofbiz-framework.git;h=6e1c7b5
2020-01-29 10:50:30 +01:00
Nicolas Malin 6e1c7b5958 Implemented: REST, adding segmented URI support for webtools/entitymaint
(OFBIZ-11007)

After implemeted Rest mechanism on rev. 1868963 by Mathieu Lirzin,
I reviewed the rest url implemented by Artemiy Rozovyk for entitymaint in webtools.

With discussion with Mathieu and Leila, I selected this pattern :

    entity/[cover]/{entityName}/{pkValues: .*}

and implemented like this :

    entity/list -> list all entities
    entity/find/Party -> search
    entity/find/Party/Company -> displaying form for Party with id Company
    entity/create/Party -> creation form for a Party
    entity/edit/Party/Company/Company -> edit form for Party with id Company
    entity/change/Party/Company -> call crud following given http method
    entity/relations/Party -> View relation for Party

The old uris were currently kept and the oldest GenericWebEvent.updateGeneric() were updated to support rest method information.

Thanks Mathieu, Artemiy and Leila for their help to complete this improvement.
2020-01-09 17:51:12 +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 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 344e294173 Improved: Missing uiLabel for Create New on CMS Content Find Screen
(OFBIZ-11005)

Seems that I missed to commit these.


git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1858759 13f79535-47bb-0310-9956-ffa450edef68
2019-05-06 08:26:28 +00:00
Deepak Dixit ef0c694a46 Improved: Use application/javascript instead of text/javascript
(OFBIZ-10492)
Replace text/javascript with application/javascript in all the script tag

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1836886 13f79535-47bb-0310-9956-ffa450edef68
2018-07-28 10:51:52 +00:00
Deepak Dixit 397628ba7d Improved: Remove use of deprecated language attribute from script tag
(OFBIZ-10491)

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1836545 13f79535-47bb-0310-9956-ffa450edef68
2018-07-24 11:26:23 +00:00
Michael Brohl 441673a2bd Improved: Improve layout and structure of forms.
(OFBIZ-10221)

This includes the webtools templates. 

Thanks Julian Leichert for reporting and providing the patch.

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1825261 13f79535-47bb-0310-9956-ffa450edef68
2018-02-24 16:23:19 +00:00
Jacques Le Roux 030b6b59de Fixed: EntitySaxReader mostly-insert (store after create-error) Fix
(OFBIZ-1032)

Karl:
Avoids rollback on create error to be able to store the entity instead 
(previous mostly-inserts feature).

Matin:
I think, the data load with "mostly inserts" activated should fail on a 
create-failure (what it does indeed already), so I see no need for a working 
solution of a fallback store attempt. Consistently the Feature should be renamed 
in the frontend from "mostly inserts" to "only inserts".

Kyra:
Additional trivial refactoring in the patch: I reduced the full qualified 
classname of org.xml.sax.SAXException in method signatures to the simple name.

This incorperates the changes that Martin has mentioned above. 
The unnecessary call to store() is removed, simplifying the process of creating 
and deleting entities. (These changes were already in Martins old patch but had 
the wrong format.) This means that the flag "mostly Inserts?" is not accurately 
worded since as long as there is only create fail, all operations are rolled 
back. So the second patch renames the flag and all appropriate parameters to 
"onlyInserts". 

jleroux: I made few no functional changes, apart not swallowing an exception

Thanks: Thanks Karl for the 1st patch, Martin to get further, and Kyra to 
complete the whole with a final touch and help to quickly test

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1822310 13f79535-47bb-0310-9956-ffa450edef68
2018-01-26 15:13:42 +00:00
Deepak Dixit d310aaf2cd Improved: Inconsistent String Comparisons, Applied patch for ftl file.
Thanks Devanshu Vyas for your contribution. (OFBIZ-9254)

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1812285 13f79535-47bb-0310-9956-ffa450edef68
2017-10-16 11:31:40 +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
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
Mridul Pathak 2da83e9dc1 [OFBIZ-7443] UI improvements on XML Data Export screen: label "Entity Names:" not positioned correctly; "Entity Sync Dump:" text box not visible in all the themes except Tomahawk. Thanks Gopal Yadav for your contribution.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1751430 13f79535-47bb-0310-9956-ffa450edef68
2016-07-05 10:00:20 +00:00
Divesh Dutta 1cdc79d383 [OFBIZ-7667] Webtools : Checkbox and Radio buttons should get selected on clicking upon their labels. Thanks Ratnesh Upadhyay for your patch
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1751348 13f79535-47bb-0310-9956-ffa450edef68
2016-07-04 17:09:30 +00:00
Deepak Dixit 09ca38b7f6 (OFBIZ-7164) Fix typo in freemarker else tag.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1746691 13f79535-47bb-0310-9956-ffa450edef68
2016-06-03 08:59:56 +00:00
Deepak Dixit 913d2d3ff5 (OFBIZ-7021) Renamed webtools component ftl file name from lower case to upper case pattern.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1743879 13f79535-47bb-0310-9956-ffa450edef68
2016-05-15 04:50:13 +00:00
Deepak Dixit 5063287ddf (OFBIZ-6824) Apply slightly modified patch from jira issue, updated path for ping.ftl and showDateTime.ftl in controller.xml
============================================================
relocate .ftl files in the framework/webtools component
============================================================
Thanks  Pierre Smits for your contribution. 

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1738581 13f79535-47bb-0310-9956-ffa450edef68
2016-04-11 12:57:45 +00:00