Commit Graph
24157 Commits
Author SHA1 Message Date
Deepak Dixit afbd2d635f Fixed: Added seca to ensure party role on createQuoteRole invoke (OFBIZ-9331)
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1792638 13f79535-47bb-0310-9956-ffa450edef68
2017-04-25 18:22:51 +00:00
Jacopo Cappellato 54aec4d949 Fixed: accounting quantity was not updated when a physical inventory variance
was created.
(OFBIZ-9324)

Thanks: Ingo Wolfmayr for the detailed bug report.


git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1792609 13f79535-47bb-0310-9956-ffa450edef68
2017-04-25 12:58:14 +00:00
Deepak Dixit bb9973b3a2 Fixed: Removed testCreateQuoteRole test case, as we converted createQuoteRole service to entity-auto. (OFBIZ-9331)
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1792275 13f79535-47bb-0310-9956-ffa450edef68
2017-04-22 09:25:37 +00:00
Deepak Dixit 65f97c28f3 Improved: From Date and Thru Date doesn't reflect on List Quote Roles screen.Applied slightly different patch from jira issue (OFBIZ-8266)
Thanks Akshay Modak for your contribution.

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1792272 13f79535-47bb-0310-9956-ffa450edef68
2017-04-22 08:26:39 +00:00
Deepak Dixit 8a63bec92d Fixed: Fixed c/p error.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1792271 13f79535-47bb-0310-9956-ffa450edef68
2017-04-22 08:17:09 +00:00
Deepak Dixit ae634e1896 Improved: Converted create and remove QuoteRole service to entity-auto also added update and expire QuoteRole service.(OFBIZ-9331)
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1792270 13f79535-47bb-0310-9956-ffa450edef68
2017-04-22 07:59:45 +00:00
Deepak Dixit 7829c73623 Improved: Removed Old Commented EditProductPriceRules screen adn EditProductPriceRules_old.groovy file,
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1792191 13f79535-47bb-0310-9956-ffa450edef68
2017-04-21 11:59:25 +00:00
Deepak Dixit 8281ef4642 Improved: Removed humanres/entitydef/entitymodel_old.xml, it was left in tree. (OFBIZ-9327)
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1792183 13f79535-47bb-0310-9956-ffa450edef68
2017-04-21 11:24:17 +00:00
Deepak Dixit 7fb5c14fe3 Improved: Removed deprecated entity related migration service, also removed some more deprecated entities that are located in entitymodel.xml instead entitymodel_old.xm (OFBIZ-9327)
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1792182 13f79535-47bb-0310-9956-ffa450edef68
2017-04-21 11:21:32 +00:00
Deepak Dixit b15d57c11a Improved: Removed deprecated entities. (OFBIZ-9327)
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1792176 13f79535-47bb-0310-9956-ffa450edef68
2017-04-21 10:31:59 +00:00
Jacopo Cappellato dc653d269b Improved: upgrade to the latest version of Apache Geronimo Transaction:
from 3.1.1 to 3.1.4


git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1792028 13f79535-47bb-0310-9956-ffa450edef68
2017-04-20 09:02:50 +00:00
Wei Zhang 7427f9f794 The viewSize should be converted Integer for multiplication
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1792020 13f79535-47bb-0310-9956-ffa450edef68
2017-04-20 07:25:58 +00:00
Jacopo Cappellato 727101dfc2 Fixed: removed explicit includes of HtmlTemplate.ftl from FreeMarker templates
since this has been deprecated and it is no more supported.
(OFBIZ-9325)

Improved the nextPrev macro by moving some logic from the template to the macro.


git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1792018 13f79535-47bb-0310-9956-ffa450edef68
2017-04-20 06:38:20 +00:00
Jacques Le Roux 6ed37e208c Improved: Create New Quote button is duplicated on View Quote page
(OFBIZ-9318)

Steps to regenerate:
1. Go to Order component 
 (https://localhost:8443/ordermgr/control/main)
2. Click on Quotes submenu 
 (directing to https://localhost:8443/ordermgr/control/FindQuote)
3. Click on Find button.
4. Click on any quoteId 
 (directing to https://localhost:8443/ordermgr/control/ViewQuote?quoteId=CQ0001)
5. Create New Quote button is duplicated.

Problem:
1. "ViewQuote" request directs to "ViewQuote" screen in QuoteScreens.xml.
2. On ViewQuote screen, it includes "QuoteSubTabBar" from OrderMenus.xml.
3. "QuoteSubTabBar" has a "Create New Quote" button.

But as with OFBIZ-7841, to make it consistent Create New Quote button is added
 to menu bar.

Solution:
Removed the button to avoid redundancy.

Thanks: Aditya Sharma

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1791804 13f79535-47bb-0310-9956-ffa450edef68
2017-04-18 16:14:49 +00:00
Jacques Le Roux a9ce80c8e6 Fixed: temporal expression screen missing date dialogbox
(OFBIZ-7066)

Problem:
go to https://localhost:8443/webtools/control/editTemporalExpression
go to frequency expression section
notice date dialog button is missing

Explanation:
Same Id used by 2 macros

Solution:
Set different Ids in macros and use them in template

jleroux: I set clear different ids based on macros names

Thanks: Wai for report Florian Montalbano for investigation

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1791791 13f79535-47bb-0310-9956-ffa450edef68
2017-04-18 14:46:40 +00:00
Jacopo Cappellato 3475e8b748 Reverted: this reverts the commit 1785581 by Wei Zhang because it represented a
step back since the work done in rev. 1762227.


git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1791763 13f79535-47bb-0310-9956-ffa450edef68
2017-04-18 08:43:50 +00:00
Jacques Le Roux 429ed19020 Improved: Proper validation must be there while creating product attributes
(OFBIZ-7452)

Go to Catalog -> product
Select any product and then switch to attributes tab
Find Add Product Attribute form, proper validations must be there.

Thanks: Suraj Khurana

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1791752 13f79535-47bb-0310-9956-ffa450edef68
2017-04-18 07:30:26 +00:00
Jacques Le Roux 7188a6d2d6 Improved: No quick ship option with back ordered products
(OFBIZ-7220)

When an order contains back ordered products the quick ship option should not
be available


Thanks: Padmavati Rawat for report, Suraj Khurana for solution and patch

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1791751 13f79535-47bb-0310-9956-ffa450edef68
2017-04-18 07:21:11 +00:00
Jacques Le Roux da45417d5f No functional change
I spotted that I used stop instead of shutdown in this script (why did we change
 this word? :-o) So I thought that I could get rid of terminateOfbiz in 
trunk-manual.sh. But no, it's really needed. Though locally I can use shutdown 
to stop both instances. Not sure why it fails on the server.

I have no yet tried to use stable-manual.sh to restart stable independently, but 
I guess it works.



git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1791743 13f79535-47bb-0310-9956-ffa450edef68
2017-04-18 05:44:32 +00:00
Jacques Le Roux ac9eced07f Fixed: Routing should not be allow to update with empty routing name
(OFBIZ-7375)

Steps to regenerate -
1) Navigate to manufacturing -> Routing
2) Press New Routing button.
3) Try to create a routing without entering Routing Name. It will not allowed to 
   create the record as routing name is mandatory field.
4) Create routing by adding proper details.

5) Now, select newly create routing from manufacturing -> Routing
6) Try to update selected routing with empty Routing Name.

Actual   : Routing can be update with empty Routing Name.
Expected : Routing should not allow to update with empty Routing Name.

Thanks: Ankit Joshi for analysis and patch

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1791634 13f79535-47bb-0310-9956-ffa450edef68
2017-04-16 20:56:52 +00:00
Taher A. Alkhateeb 1573f1de0f Implemented: ignore the entire plugins directory in .gitignore
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1791515 13f79535-47bb-0310-9956-ffa450edef68
2017-04-15 15:47:58 +00:00
Deepak Dixit f18ff2404a Fixed: Console warning related to web-app declaration.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1791496 13f79535-47bb-0310-9956-ffa450edef68
2017-04-15 11:35:03 +00:00
Deepak Dixit caac1033e0 Fixed: Applied slightly modified patch from jira, Employment Applications in Party manager does not list any record even if they exist (OFBIZ-9220)
Thanks Aditya Sharma for your contribution.

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1791490 13f79535-47bb-0310-9956-ffa450edef68
2017-04-15 11:15:43 +00:00
Deepak Dixit 76e52a62d8 Fixed: Editing quantity of configurable products changes actual product
(OFBIZ-9225)
Thanks Suraj Khurana for your contribution.

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1791475 13f79535-47bb-0310-9956-ffa450edef68
2017-04-15 09:07:44 +00:00
Jacques Le Roux 68c8bcd028 Implemented: Special characters displays in From Date UI label field in forum
screen
Improved:
(OFBIZ-7850)

1. Go to Find Forum group list page 
    https://localhost:8443/content/control/findForumGroups
2. Select one of the Forum from the available forum list.
3. On this Forum Group page, In Add Forum and List Forums section, the UI label 
	From Date Time displayed "From Date & Time", it should be corrected to 
	display From Date Time.

jleroux: patch obsolete, I had to change things by hand

Thanks: Gopal Yadav

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1791473 13f79535-47bb-0310-9956-ffa450edef68
2017-04-15 08:52:59 +00:00
Jacques Le Roux 085605898b No functional changes
Removes pandoc.bat, confusing! Missed in 1791379


git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1791467 13f79535-47bb-0310-9956-ffa450edef68
2017-04-15 08:13:13 +00:00
Jacques Le Roux 0212d1af40 No functional changes
Removes pandoc.bat, confusing!
Updated README.md and README.md.html


git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1791379 13f79535-47bb-0310-9956-ffa450edef68
2017-04-14 15:27:55 +00:00
Jacques Le Roux 1439c53fac no functional change, rename prefix from MD to md
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1791363 13f79535-47bb-0310-9956-ffa450edef68
2017-04-14 13:24:56 +00:00
Jacques Le Roux 0f6a7a6638 After changing the How+to+migrate+OFBiz+from+Derby+to+MySQL+database page in
wiki following Ingo's suggestion on user ML, adapts also the entityengine
definition to modern mySQL use

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1791361 13f79535-47bb-0310-9956-ffa450edef68
2017-04-14 13:02:33 +00:00
Jacques Le Roux a59c0054c8 Fixed: On setting verbose true, UtilHttp.getParameterMap() method prints
username and password in logs
(OFBIZ-9310)

In UtilHttp.getParameterMap(HttpServletRequest request, Set<? extends String>...
method, following line of code prints username and password in logs when verbose
 is set to true.

Debug.logVerbose("Request Parameter Map Entries: " + 
System.getProperty("line.separator") + UtilMisc.printMap(paramMap), module);

Aditya suggested:
Removed the line that prints "Request Parameter Map Entries" as it may print 
username and password entered by user when verbose set to true. 
It may not be a grave concern for staging environment as verbose are not logged 
there but it is still unethical to print such details.

jleroux: I decided to rather comment out the line which might still be useful
in some cases...

Thanks: Aditya Sharma

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1791346 13f79535-47bb-0310-9956-ffa450edef68
2017-04-14 11:04:04 +00:00
Jacques Le Roux 5ce5947cc3 Fixed: WorkEffort Keywords does not list
(OFBIZ-9315)

1) Go to workEffort component.
2) Create a new task from New Task button 
    https://localhost:8443/workeffort/control/mytasks
3) After creating Task with required fields, click on keywords tab.
4) Add a WorkEffort keyword. 
   https://localhost:8443/workeffort/control/EditWorkEffortKeywords?workEffortId=10000
5) Keyword added should be listed on Find WorkEffort keyword section. 
(Not listing in current scenario)

jleroux: actually you don'-t need to create a task. Simply use the pre-existing
one (task1). When you get to the keywords tab you don't see already
pre-existing keywords. The fix allows to show them


Thanks: Jagpreet Kaur

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1791342 13f79535-47bb-0310-9956-ffa450edef68
2017-04-14 10:44:03 +00:00
Jacques Le Roux ef839cab56 Improved: SOAPEventHandler only outputs error to log when secureSoapAnswer
= false
(OFBIZ-9289)

jleroux: I agree there is no risk showing information in log

Thanks: Gareth Carter

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1791288 13f79535-47bb-0310-9956-ffa450edef68
2017-04-13 17:39:34 +00:00
Jacques Le Roux 7a0fc4f061 Fixed: WorkEffort shows error on party assignment
(OFBIZ-9314)

Steps to reproduce:
Go to workEffort component.
2) Create a new task from New Task button 
    https://localhost:8443/workeffort/control/mytasks .
3) After creating Task with required fields, click on parties tab.
4) Screen for WorkEffort Party Assignment will be displayed.
5) Choose any party and role.
6) Click on Add. Error will be displayed.

Solution:
Any party is assigned to a WorkEffort on specific role, hence it is necessary 
that party should be in that role first (PartyRole).
Added code which make sure the party should be in given role (i.e service call 
to ensurePartyRole).

Thanks: Jagpreet Kaur

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1791277 13f79535-47bb-0310-9956-ffa450edef68
2017-04-13 16:56:58 +00:00
Jacques Le Roux d8661c1410 Reverted: r1791143 for "The createTenant Gradle task fails"
(OFBIZ-9273)

The fix was harmless but not to the point. Taher fixed the root cause at 
r1791168

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1791218 13f79535-47bb-0310-9956-ffa450edef68
2017-04-13 07:10:28 +00:00
Taher A. Alkhateeb fa833ee93b Fixed: A bug in which creating plugins crashes the build system
(OFBIZ-9273)

The issue was due to introducing an incorrect flag of pluginId instead
of plugin.name


git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1791168 13f79535-47bb-0310-9956-ffa450edef68
2017-04-12 18:01:39 +00:00
Jacques Le Roux bbe38dbae8 Fixed: The createTenant Gradle task fails
(OFBIZ-9273)

Problem:
When you enter
bq. gradlew createTenant -PtenantId=test
you get
FAILURE: Build failed with an exception.
* Where:
Build file 'C:\projectsASF\ofbiz-framework\build.gradle' line: 764
* What went wrong:
A problem occurred evaluating root project 'ofbiz'.
> Could not get unknown property 'pluginId' for task ':installAllPlugins' of 
type org.gradle.api.DefaultTask.

Investigation:
This issue is due creation of build.gradle file in plugin (with empty gradle 
task defined in it)

Solution:
Comment out build.gradle template content

Thanks: Deepak for confirmation, Swapnil M Mane for the investigation and patch

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1791143 13f79535-47bb-0310-9956-ffa450edef68
2017-04-12 16:38:59 +00:00
Jacques Le Roux 3b83961460 No functional change, removes changes which slipped in inadvertently
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1790945 13f79535-47bb-0310-9956-ffa450edef68
2017-04-11 09:26:34 +00:00
Jacques Le Roux 8398560d51 Fixed: Update Tomcat to 8.0.42 because of CVE-2017-5648
(OFBIZ-9313)

Quoting a message from announce@apache.org

================================================================================
VE-2017-5648 Apache Tomcat Information Disclosure

Severity: Low

Vendor: The Apache Software Foundation

Versions Affected:
Apache Tomcat 9.0.0.M1 to 9.0.0.M17
Apache Tomcat 8.5.0 to 8.5.11
Apache Tomcat 8.0.0.RC1 to 8.0.41
Apache Tomcat 7.0.0 to 7.0.75
Apache Tomcat 6.0.x is not affected

Description
While investigating bug 60718, it was noticed that some calls to
application listeners did not use the appropriate facade object. When
running an untrusted application under a SecurityManager, it was
therefore possible for that untrusted application to retain a reference
to the request or response object and thereby access and/or modify
information associated with another web application.

Mitigation:
Users of the affected versions should apply one of the following
mitigations:
- Upgrade to Apache Tomcat 9.0.0.M18 or later
- Upgrade to Apache Tomcat 8.5.12 or later
- Upgrade to Apache Tomcat 8.0.42 or later
- Upgrade to Apache Tomcat 7.0.76 or later

Credit:
This issue was identified by the Tomcat security team.

History:
2017-04-10 Original advisory

References:
[1] https://bz.apache.org/bugzilla/show_bug.cgi?id=60718
[2] http://tomcat.apache.org/security-9.html
[3] http://tomcat.apache.org/security-8.html
[4] http://tomcat.apache.org/security-7.html
================================================================================

It's a low security issue so I'll not backport on no longer or not released 
branches

All tests pass and UI seems OK.

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1790943 13f79535-47bb-0310-9956-ffa450edef68
2017-04-11 09:18:32 +00:00
Jacques Le Roux f2d8d02b90 No functional changes, just formatting and grouping exceptions
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1790524 13f79535-47bb-0310-9956-ffa450edef68
2017-04-07 08:45:06 +00:00
Jacopo Cappellato 92b5652156 Improved: cleaned up some old code without altering its functional behavior.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1790520 13f79535-47bb-0310-9956-ffa450edef68
2017-04-07 08:34:57 +00:00
Jacopo Cappellato 7efc47a4ef Fixed: added missing default-entity-name attribute to the "entity-auto" service
definition for createReturnItemResponse. The missing attribute was causing a 
service execution error, preventing the processing of returns. 


git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1790396 13f79535-47bb-0310-9956-ffa450edef68
2017-04-06 12:53:27 +00:00
Jacques Le Roux efe1096e93 Fixed: Sort Links in Lookup for Owner Content Id causes unwanted behaviour on
Find Content page
(OFBIZ-9279)

How to reproduce :
1. Log in the Content component
2. Go to the Content tab. https://localhost:8443/content/control/findContent
3. In the search form, open the lookup of the field ' Owner Content Id '
4. Click on any of the table header links to sort the table. Results will be 
displayed on a new unstyled window closing the Lookup dialog.

Problem:
1. Lookup dialog for ownerContentId uses "ListLookupContent" form to list 
   Content records.
2. "ListLookupContent" form extends "ListContent" form for all the fields.
3. Sort-field is set to true in "ListContent" form for all the fields.
4. Sort-field adds <a> hyperlink to "LookupContent" .
5. When clicked <a> link it moves to a new page and doesn't renders the response
   in the Lookup dialog.

Solution:
First of all it is a lookup to select ownerContentId so as the pattern followed
 in other lookups in OFBiz it should not have any sort-fields. 
To set it false, it should be overridden. If all fields needs to be overridden 
it is better not to extend "ListContent" form and add these fields right away.
Apart from that added 'header-row-style="header-row-2"' to form.


Thanks: Aditya Sharma

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1789874 13f79535-47bb-0310-9956-ffa450edef68
2017-04-02 12:11:44 +00:00
Jacques Le Roux 5f5dc1eb18 Fixed: Sort Links in Lookup for Data Resource Id causes unwanted behaviour on
Find Content page
(OFBIZ-9280)

How to reproduce :
1. Log in the Content component
2. Go to the Content tab. https://localhost:8443/content/control/findContent
3. In the search form, open the lookup of the field ' Data Resource Id '
4. Click on any of the table header links to sort the table. Results will be
 displayed on a new unstyled window closing the Lookup dialog.


Problem:
Problem:
1. Lookup dialog for dataResourceId uses "ListLookupDataResource" form to list 
Data Resource records.
2. "ListLookupDataResource" form extends "ListDataResource" form for all the 
fields.
3. Sort-field is set to true in "ListDataResource" form for all the fields.
4. Sort-field adds <a> hyperlink to "LookupResource" .
5. When clicked <a> link it moves to a new page and doesn't renders the response
 in the Lookup dialog.
Solution:
First of all it is a lookup to select DataResourceId so as the pattern followed 
in other lookups in OFBiz it should not have any sort-fields.To set it false, 
it should be overridden. If all fields needs to be overridden it is better not 
to extend "ListDataResource" form and add these fields right away.
Apart from that added 'widget-style="smallSubmit"' to dataResourceId according 
to the uniform pattern followed.

jleroux: I added the header-row-style="header-row-2" style

Thanks: Aditya Sharma

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1789863 13f79535-47bb-0310-9956-ffa450edef68
2017-04-02 09:26:36 +00:00
Jacques Le Roux b64830c092 Improved: Refactor lists related to gateway transactions in accounting
(OFBIZ-9282)

Refactor various list forms into grids.
Refactor various list form references in screen widgets.

Thanks: Pierre Smits

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1789781 13f79535-47bb-0310-9956-ffa450edef68
2017-04-01 09:14:49 +00:00
Jacques Le Roux 9f8f5d52db No functional change, forgot resultMapNameAcsr as param in the Javadoc
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1789738 13f79535-47bb-0310-9956-ffa450edef68
2017-03-31 19:40:00 +00:00
Jacques Le Roux b912d34c8f Improved: Refactor the runAction method in AbstractModelAction, ModelFormAction
and ModelTreeAction classes
(OFBIZ-9287)

This 3 methods share a pattern which should be refactored in a common protected
 method. The pattern is
{code}
if (!this.resultMapNameAcsr.isEmpty()) {
    this.resultMapNameAcsr.put(context, result);
    String queryString = (String) result.get("queryString");
    context.put("queryString", queryString);
    context.put("queryStringMap", result.get("queryStringMap"));
    if (UtilValidate.isNotEmpty(queryString)) {
        try {
            String queryStringEncoded = queryString.replaceAll("&", "%26");
            context.put("queryStringEncoded", queryStringEncoded);
        } catch (PatternSyntaxException e) {
         // obviously a PatternSyntaxException should not occur here
        }
    }
} else {
    context.putAll(result);
}
{code}
Enough for a refactor I'd say.

I created a ModelActionUtil class where I extracted the method I used in the 3
other classes.

This also removes the swallowed exception that we had in ModelFormAction and 
ModelTreeAction, but not in ModelActionUtil from where I extracted the method.
It's now consistent and if ever, for a very unlikely reason, the exception 
is thrown, people will know about it and will take appropriate measures.

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1789737 13f79535-47bb-0310-9956-ffa450edef68
2017-03-31 19:37:00 +00:00
Jacques Le Roux 308b18ee83 No functional change.
Michael suggested in dev ML that we don't show the error in UI because VIEW_SIZE
 is only technical, which I agree with. The log is enough.
 
Actually it was already the case because I missed to move the
if (errMsgList) {
    request.setAttribute("_ERROR_MESSAGE_LIST_", errMsgList)
}
block below the now caught NumberFormatException

So I just need to remove the 2nd line in the catch, done.


git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1789736 13f79535-47bb-0310-9956-ffa450edef68
2017-03-31 19:23:12 +00:00
Jacques Le Roux 4a3230c15c No functional change, fixes a C/P with wrong value name in errMsgList
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1789711 13f79535-47bb-0310-9956-ffa450edef68
2017-03-31 17:00:58 +00:00
Jacques Le Roux ffc82e67ea Fixed: Fix Default or Empty Catch block in Java and Groovy files
(OFBIZ-8341)

While working on OFBIZ-7759, I stumbled upon this by chance. 
It's unlikely that this NumberFormatException is ever caught, but not a reason 
to swallow it. 

I checked there are no other swallowed exceptions in Groovy files.

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1789710 13f79535-47bb-0310-9956-ffa450edef68
2017-03-31 16:56:04 +00:00
Jacques Le Roux 58e5bececb Fixed: Link in LookupContent causes unwanted behaviour
(OFBIZ-7759)

How to reproduce :
- Log in the Content component
- Go to the Content tab
- In the search form, open the lookup of the field ' Owner Content Id '
- Click on the search button
- In the result list, click on a button link in the column 'Data Resource Id'
- The form to edit the Content will be displayed (a whole OFBiz seems to be 
  accessible from this new page)
- Close the lookup.
- Try to reopen it, it doesn't show anything anymore.


Problem:
1. Lookup dialog for ownerContentId uses "ListLookupContent" form to list 
  Content records.
2. "ListLookupContent" form extends "ListContent" form for all the fields.
3. As fields dataResourceId and ownerContentId are extended fields they creates 
  a link to Edit pages.
Solution:
First of all it is a lookup to select ownerContentId so as the pattern followed 
in other lookups in OFBiz it should not have any links to Edit page. If links 
are removed there will not be the problem as well.
Apart from that added 'widget-style="smallSubmit"' to contentId according to 
the uniform pattern followed.
Link to edit ownerContentId shows contentId in description rather than 
ownerContentId in "ListLookupContent" form , updated that too.

Thanks: Florian Montalbano for report and Aditya Sharma for patch

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1789665 13f79535-47bb-0310-9956-ffa450edef68
2017-03-31 12:10:40 +00:00