(OFBIZ-11593)
The "entity/list" request has been put in with OFBIZ-11007. It's used to call
the entitymaint view and so is a demo/didactic duplicate of entitymaint request.
It's only used in FindGeneric screen (look for WebtoolsBackToEntityList label).
It's problematic because since the CSRF token defense was put in you can no
longer filter the entities from the entities list screen, even when the default
NoCsrfDefenseStrategy is used. It works if you use the entitymaint request
instead.
2020-01-19 I proposed in OFBIZ-11306 a solution for such cases.
It was not used because 2020-02-14 I thought it was no longer needed.
It was necessary for this case and implemented with commit e487122.
But as, Rohit Koushal reported, it breaks some functionalities like adding
address/update address during Quick Finalize Order. The issue can also be
reproduced in ecommerce when trying the same while checking out, or quick
checking out, an order.
More generally the error is of this kind:
|27.0.0.1-8009-exec-3 |ControlServlet |E| Error in request handler:
java.lang.IndexOutOfBoundsException: Index: 1, Size: 1
at java.util.LinkedList.checkElementIndex(LinkedList.java:555) ~[?:1.8.0_252]
at java.util.LinkedList.get(LinkedList.java:476) ~[?:1.8.0_252]
at org.apache.ofbiz.webapp.control.RequestHandler.getRequestUri(RequestHandler.java:837) ~[main/:?]
and happens with URLs like
updateCheckoutOptions/editcontactmech?DONE_PAGE=checkoutoptions&contactMechId=9015
or
updateCheckoutOptions/editcontactmech?preContactMechTypeId=POSTAL_ADDRESS&
contactMechPurposeTypeId=SHIPPING_LOCATION&DONE_PAGE=checkoutoptions
So I decided to revert the concerned part of commit e487122 and to rather use
entitymaint instead of "entity/list" request.
(OFBIZ-11593)
The FilterEntities widget form is also an issue because it's a POST form and
"entity/list" request use the GET method. Using "entitymaint" as target works
(POST by default)
(OFBIZ-11335)
Currently on OFBiz we implemented a process to define some different
screen and menu that can be implemented by the theming.
But for the form we have nothing. All style are hard coded on each
<grid name="ListEntities" ...
odd-row-style="alternate-row" default-table-style="basic-table hover-bar">
I extend the theming implementation principle to forms element with adding :
* a new xsd element common-forms (like common-screens)
* some default form templates to extend :
* grid CommonSimpleGrid
* grid CommonBasicGrid
* form CommonSimpleList
* form CommonBasicList
* form CommonInLineEditList
* form CommonBasicSingle
We can use its like :
<form name="LayoutDemoList" extends="CommonBasicList"
extends-resource="component://common/widget/CommonForms.xml"
The main difficulty raise to this task was propage the visualTheme during
the ModelForm intanciation, because we need to load wiget style
(and some other information wanted on the template) on model load in memory.
This is cover by commit 1941a05a34.
Forms present on the screen https://localhost:8443/webtools/control/WebtoolsLayoutDemo
are now extend through with theme.
Finally with this we can extend style form (pagination, header, line and so on ...)
directly by your theme without change the framework.
(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.
(OFBIZ-7532)
To display a number we had different possibilities :
* on ftl use the template <@ofbizAmount and <@ofbizCurrency
* by java call a function UtilFormatOut.formatAmount, UtilFormatOut.formatPrice, UtilFormatOut.formatQuantity, etc..
* by form widget, use <display type=accounting-number for accounting but nothing for other
To simplify and homogenize all, I implemented a number type purpose :
* default: display a number by default, use when no purpose is present
* quantity: display a number as a quantity
* amount: display a number as an amount (like price without currency)
* spelled: litteral displaying for a number (use on <@ofbizAmount ftl only before)
* percentage: display a number as a percentage
* accounting: diplay a number for accounting specific
Each purpose can be associate to a number for displaying it :
* on ftl <@ofbizNumber number=value format=purpose/>
* on java UtilFormatOut.formatNumber(value, purpose, delegator, locale)
* on form widget <display type=number format=purpose/>
The format use by a purpose is define on framework/common/config/number.properties with the template
.displaying.format = ##0.00
With this, you can surchage a configuration, create your own purpose or surchage only one through entity SystemProperty.
Concerning the backware compatibility:
* For the ftl the template <@ofbizAmount is now a link to '<@ofbizNumber format=amount'
* For java all previous function call UtilFormatOut.formatNumber with the matching purpose
* For form xml accounting-number is managed as an exection
Last point, display a currency is different that a number, so I didn't refactoring some code for this case (only move properties from general to number for centralize de configuration on the same file)
Thanks Charles Steltzlen to start the refactoring
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1864832 13f79535-47bb-0310-9956-ffa450edef68
(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
components
(OFBIZ-9905)
As the title says + removes now useless labels
Thanks: Aayush Jain for report, Sourabh Jain for the fix, Pierre Smits and
Rishi Solanki for comments
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1858291 13f79535-47bb-0310-9956-ffa450edef68
(OFBIZ-9557)
When scheduling a job it automatically schedules it to run as the user that
created the schedule. The issue comes up when that users password changes.
If your are forced to change your password automatically you have to delete all
previously scheduled jobs and recreate them.
This adds a checkbox to run a job as system on Schedule Job screen as system user
Permissions are used to guarantee security.
Thanks: Matthew Mulligan for report and Rohit Koushal for discussion and patch
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1846137 13f79535-47bb-0310-9956-ffa450edef68
(OFBIZ-10128)
The ofbiz_logo.png is now in theme. This is only the framework part.
I have also made change in theme but I need to review again and perhaps create
a patch for others to review...
Note: testUpdatePartyGroup is OK
Then I'll also rename the logo in site to use the same name before maybe
referring to svn trunk repo to use only 1 file everywhere, same for the .ico
file
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1820862 13f79535-47bb-0310-9956-ffa450edef68
(OFBIZ-9990)
Fixes this issue in Tomahawk and Flat Grey themes by using ofbiz_logo.png,
instead of the old logo deprecated ofbiz_logo.gif
While at it use the same logo everywhere it's possible. It was needed for links
to http://ofbiz.apache.org/images/ofbiz_logo.gif which no longer exists
(actually seems only used for tests so could stay like that but better not refer
to it anyway)
Also use this logo for Bluelight theme where it fits.
It could not be used in Rainbow themes because they are using a Scalable Vector
Graphics file (ofbiz-white.svg) that can't be replaced by the new png logo file
BTW this file still uses a TM symbol instead of a ®
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1816897 13f79535-47bb-0310-9956-ffa450edef68
(OFBIZ-9725)
When you run a service from webtools (not scheduling it) the the duration of the
service is limited to the transaction default timeout (60 seconds)
Thanks: Jeffrey Breault for report
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1809741 13f79535-47bb-0310-9956-ffa450edef68
Third step, move macro ftl libraries and ftl template present on framework common to common theme
At this step, the common-theme is forced like the common component previously.
Main common screens present on CommonScreens.xml, LookupScreens.xml and HelpScreens.xml are moved to common screen with a forced rewrite to common-theme
Warning this commit is going to follow with a other commit for CommonScreens.xml because LookupScreens.xml and HelpScreens.xml are recreated on common-theme, but to keep the history of CommonScreens.xml it was moved entirely, the second commit restore it with redirect call.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1806091 13f79535-47bb-0310-9956-ffa450edef68
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
At http://markmail.org/message/ffmyw773p65fndey I wrote:
I'd like to follow the suggestion I made in the last message of the linked
thread.
In other words, use
http://subversion.apache.org/docs/release-notes/1.8.html#repos-dictated-confighttp://blogs.collab.net/subversion/the-road-to-repository-dictated-configuration-day-2-autoprops
Then this problem would be over. No longer need to check from time to time that
concerned files, have svn:eol-style=native property set
This imply that all OFBiz users use svn > 1.7, but we can inform them, et voilà
Then at markmail.org/message/h3q2yvj4db544ro7 I wrote:
Actually, since we get new committers now and then and their are able to create
new files I have a warning every 6 months which says "Check Java
files, have all svn:eol-style=native" (I totally forgot that because I assume
the machine knows it and warns me ;))
I could extend that to all files (at least the most prominent types), I'll
see...
This does what the last sentence said for Groovy, XML and few new Birt
Java files.
I'll see if I can implement the svn 1.8 repos-dictated-config ASAP!
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1781219 13f79535-47bb-0310-9956-ffa450edef68
(OFBIZ-7758)
I am running on trunk rev 1751489 on tomahawk theme.
In the browser, right-click and view the page source.
There is duplicate linking of jquery.jgrowl.min.css i.e.
<link rel="stylesheet" href="/images/jquery/plugins/jquery-jgrowl/1.4.1/jquery.jgrowl.min.css" type="text/css"/>
The solution is to remove a hack for JPublish in fex Java classes
and related changes (mostly "page." in ftl and xml files)
Thanks: Rohit Koushal for the path and James Yong the report
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1761235 13f79535-47bb-0310-9956-ffa450edef68
(OFBIZ-8100)
Change all form names to upper camel case for consistency.
Thanks: Tanmay Muley for reporting and providing the patch.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1761104 13f79535-47bb-0310-9956-ffa450edef68
(OFBIZ-8099)
Change all form names to upper camel case for consistency.
Thanks: Tanmay Muley for reporting and providing the patch.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1761103 13f79535-47bb-0310-9956-ffa450edef68
(OFBIZ-8118)(OFBIZ-8122)(OFBIZ-8123)(OFBIZ-8124)(OFBIZ-8125)(OFBIZ-8126)(OFBIZ-8127)(OFBIZ-8128)(OFBIZ-8129)
Menu names should be in camel case to maintain consistency. I've slightly modified the provided patch to eliminate names with "-" or all lower case also.
Thanks: Tanmay Muley for reporting and providing the patches.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1760059 13f79535-47bb-0310-9956-ffa450edef68
Simply replaces the parenthesis in ServiceUtil.getResource() by 2 spaces when parsing files with getLabelsFromJavaFiles() and getLabelsFromFtlFiles().
ServiceUtil.getResource() breaks the parsing
Note: no occurrences of ServiceUtil.getResource() yet in FTL files, and only 16 in Java files.
Also replaces "script" by "minilang" in getLabelsFromSimpleMethodFiles()
This adds a getResourceRegex in a new webtools.properties files. This property
* Allow to remove this string from files when parsing with Label Manager, else it breaks
* Moreover the string can't be in the LabelReferences.java file, to avoid side effects
I have also increased the transaction-timeout of the screen "SearchLabels" to 600.
Because when using the "Only Not Used Labels" option the 1st pass can be long. 10 min should plenty enough, even on old machines. Not blocking anyway, just a bad stack trace in log
I'm sorry you will see a lot of false changes because the LabelManagerScreens.xml had no svn:properties at all, here they are now.
We have 5237 "Not Used Labels". I wondered if they were all real, I just checked some an indeed, they were not used.
But there are also a huge bunch of *.description.* labels which certainly make sense. I'll remove them from the "Only Not Used Labels" result in another Jira I'll create
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1759457 13f79535-47bb-0310-9956-ffa450edef68
* https://localhost:8443/webtools/control/LogView
* https://localhost:8443/webtools/control/FetchLogs
Each method use the same line rendering and the difference is : LogView display only runtime/logs/ofbiz.log (or you can surcharge it vith debug.properties) and FecthLogs list all file name ofbiz* present on runtime/logs/ofbiz.log and offert the possibility to search only line that macth a string.
I review the code to use only one script (remove LogView.groovy) and improve following points :
* Optimise the FetchLog.groovy to display with same velocity a file with or without string chain filtering
* Add a property to change the root log directory. Under linux we use /var/log/ofbiz/
* Add a regExp to match the file name of file present in the directory. Helpful when you want to see error.log
* Complete debug.properties with comment for describe example for new properties
And last point, add refresh button on the end page to reload the log without lost your state on the page.
Related issue OFBIZ-7944
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1755302 13f79535-47bb-0310-9956-ffa450edef68
This feature has been contributed a long time ago as an experimental feature but never really matured into a production ready artifact: since it was contributed, no users asked about how to use it, or tested it, or reported bugs or enhancement requests.
More importantly, the feature has always been disabled in the OFBiz framework (i.e. the widget code and the entity engine code were not using it).
This removal should not impact our user base; however, after the removal, an entry to the Attic will be created to keep track of it and to make it easier, to interested users, to get this code, improve it (e.g. by making it dependent on a live external jar, for example MapDB instead of JDBM) and possibly contribute it back to the project.
The most compelling reason for its removal is that the feature was based on a snapshot, unreleased version of JDBM, which is now a mostly dead project: for licensing reasons we are no more allowed to bundle jars in our releases. Additionally, having code that relies an old jar from a no more active project represents a maintenance issue for the community.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1751817 13f79535-47bb-0310-9956-ffa450edef68