Commit Graph
1335 Commits
Author SHA1 Message Date
Nicolas Malin dcdc3855a6 Fixed: Missing to convert a showDescription from widget.properties to modelTheme on the macroFormRendere.java to prepare the lookup macro (OFBIZ-9138 Create a common theme)
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1806821 13f79535-47bb-0310-9956-ffa450edef68
2017-08-31 16:19:29 +00:00
Nicolas Malin de11d898ad Fixed: HtmlFormMacroLibary.ftl contains direct call to widget.properties (OFBIZ-9138 Create a common theme)
Instead of use the properties on the current theme, some ftl macro present in the file HtmlFormMacroLibary.ftl used a directl call to widget.properties.
To help the code reader, the modelTheme has been set on the root ftl context, and the previous widget.properties call replace by modelTheme call

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1806742 13f79535-47bb-0310-9956-ffa450edef68
2017-08-30 21:40:33 +00:00
Nicolas Malin 2555742bf3 Fixed: the lookup property showDescription not present in common-theme (OFBIZ-9138 Create a common theme)
Display or not a description hasn't been loaded in the theme definition. I finished this migration to be sure to found all properties linked to lookups in the same place.

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1806741 13f79535-47bb-0310-9956-ffa450edef68
2017-08-30 21:33:47 +00:00
Nicolas Malin 0b33186d6f Fixed: Correct library ftl call to render the email body (OFBIZ-9138 Create a common theme)
add possibility to call the ThemeFactory.resolveTheme() with empty request if the visualTheme normaly present on the service context isn't found, so we return the default theme define in general.properties
Thanks to Jacques for raise this problem

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1806237 13f79535-47bb-0310-9956-ffa450edef68
2017-08-25 21:25:26 +00:00
Deepak Dixit 90abb7b919 Fixed: Warning related to duplicate type assignment for widget attribute in theme.xsd file
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1806209 13f79535-47bb-0310-9956-ffa450edef68
2017-08-25 18:21:59 +00:00
Nicolas Malin a5644da3e4 Fixed: Continue the common-theme upload (OFBIZ-9138 Create a common theme)
Forgot to complete the xsd with element common-screens as child of theme and the attribute name on the same element

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1806169 13f79535-47bb-0310-9956-ffa450edef68
2017-08-25 13:12:22 +00:00
Nicolas Malin a728d0c3b0 Implemented: Continue the common-theme upload (OFBIZ-9138 Create a common theme)
Five step
#10 when you missed a definition on your theme, improve the error message to understand what template failed
Now the common-theme would be functional

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1806151 13f79535-47bb-0310-9956-ffa450edef68
2017-08-25 10:04:44 +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
Nicolas Malin 10fa4452b7 Implemented: Continue the common-theme upload (OFBIZ-9138 Create a common theme)
Four step load the visualTheme in user session, freemarker, screen, groovy and service context
Add util to resolve easily a visualTheme

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1806134 13f79535-47bb-0310-9956-ffa450edef68
2017-08-25 08:18:35 +00:00
Nicolas Malin aec57b51c5 Implemented: Continue the common-theme upload (OFBIZ-9138 Create a common theme)
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
2017-08-24 21:55:06 +00:00
Nicolas Malin 965fed43d2 Implemented: Start the common-theme upload (OFBIZ-9138 Create a common theme)
First step, commit model theme engine :
ModelTheme: java object who interact with system and theme definition
VisualTheme: java object who interact with the user session and the theme
ThemeFactory: java factory to load and access to VisualTheme and ModelTheme with the cache
widget-theme.xsd: dtd to define a theme

Load also the main structure common-theme component, (empty for all template, screen, style or js) with this theme definition.
It's not functional at this time


git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1806076 13f79535-47bb-0310-9956-ffa450edef68
2017-08-24 19:01:34 +00:00
Jacques Le Roux 3cc575b6de Improved: Check there are no white spaces around the name of a form field when
updating a form
(OFBIZ-9306)

Sometimes ago, I lost an hour because of a space at the end of a field's name in 
a form. In creation it does not pass (the field lacks) but when updating the 
form it passes and it's hard to find from where comes the problem.

Thanks: Michael for review and spotting a possible NPE in my 1st patch

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1805141 13f79535-47bb-0310-9956-ffa450edef68
2017-08-16 06:34:56 +00:00
Nicolas Malin cb175c71f7 Fixed: Missing fieldInfo when call constructor for ModelFormField Password, File and Lookup
(OFBIZ-9577)

When you create a form with an entity or service auto fields, the three previous form field call only "super(fieldSource, modelFormField);" in their constructor or this initialise a TextField with the fieldInfo FieldInfo.TEXT.
I force the field info when the super constructor is called

This missing has been found during investigation on the issue OFBIZ-9577 to improve auto-fields-service with a file upload



git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1805011 13f79535-47bb-0310-9956-ffa450edef68
2017-08-14 15:47:36 +00:00
Jacques Le Roux bfd533ccc3 Improved: [DEPRECATION] Replace BigDecimal.ROUND_* by RoundingMode.*
(OFBIZ-9571)

No functional change.

We read at http://docs.oracle.com/javase/7/docs/api/java/math/BigDecimal.html : 
<<Using the integer fields in this class (such as ROUND_HALF_UP) to represent 
rounding mode is largely obsolete; the enumeration values of the RoundingMode 
enum, (such as RoundingMode.HALF_UP) should be used instead.>>

That's an easy global replacement. But it also needs to import the RoundingMode 
class. It was 26 files so I decided to rather clean all the imports in all files
 with the help of Eclipse.

This is a 1st step. I will need to closely look at 2 special class: UtilNumber
and Calculate.



git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1804953 13f79535-47bb-0310-9956-ffa450edef68
2017-08-14 08:32:21 +00:00
Deepak Dixit ca74d2496a Improved: Remove unnecessary field types (OFBIZ-9351)
Applied patch from jira issue, also removed -ne field refereces from code.

Thanks Aditya Sharma for your contribution.

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1804031 13f79535-47bb-0310-9956-ffa450edef68
2017-08-03 18:11:45 +00:00
Nicolas Malin 6da5d7cf2e Fixed: Set first letter to upper case for xls macro library to keep the coherence with other macro library. This error was introduce by me so I repair :)
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1803391 13f79535-47bb-0310-9956-ffa450edef68
2017-07-29 20:18:16 +00:00
Nicolas Malin 966b1755a0 Improved: set auto completion only in lookup field (OFBIZ-9378)
Add a new option presentation none for the lookup element to don't display the link for display the search form bu only use autocompletion.
In the initial path from Pierre Gaudin the presentation name was autocompletion-only but I prefer change it to none because the link is just not preent.
Thanks Pierre Gaudin for this proposal and patch

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1802682 13f79535-47bb-0310-9956-ffa450edef68
2017-07-22 12:14:59 +00:00
Taher A. Alkhateeb 609c7d37e3 Improved: minor refactoring to remove miscellanous warnings
Minor code cleanup to remove:
- unused private variables
- unused imports
- improper object castings



git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1802172 13f79535-47bb-0310-9956-ffa450edef68
2017-07-17 16:59:18 +00:00
Deepak Dixit e95c7eb261 Fixed: fix tag "disable-if-empty" in menus if field has no value (OFBIZ-9377)
Thanks Gaudin Pierre and Humera Khan for your contribution.

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1801336 13f79535-47bb-0310-9956-ffa450edef68
2017-07-08 22:54:06 +00:00
Michael Brohl a78998ce47 Fixed: wrong assignment of the "default-hide-if-selected" attribute.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1801209 13f79535-47bb-0310-9956-ffa450edef68
2017-07-07 20:26:40 +00:00
Jacques Le Roux 2d409ff0e2 No functional change
Just comments about EntityListIterator usage in Paginator class. 


git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1798599 13f79535-47bb-0310-9956-ffa450edef68
2017-06-13 13:28:04 +00:00
Jacques Le Roux 2929627451 Improved: EntityListIterator closed but not in case of exception
(OFBIZ-9385)

This is an improvement only because no cases were reported. But obviously in 
case of unlucky exception after the EntityListIterator creation and before it's 
closed the EntityListIterator remains in memory. 
It should be closed in EntityListIterator.finalize() but the less happens there 
the better.

The solution is to use try-with-ressources when possible

This completes OFBIZ-9385, there are no other cases left.

There are few methods like FindServices.executeFind() or performFindParty 
service which can't be improved because they return an EntityListIterator. 
So methods using them must be carefully crafted to close the EntityListIterator. 
Most where already documented (in the framework). I completed few in 
applications at r1798495  




git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1798566 13f79535-47bb-0310-9956-ffa450edef68
2017-06-13 08:29:28 +00:00
Deepak Dixit d345ecf8e5 Improved: Made formName filed optional in renderDateTimeField macro, as this field is not required for all the cases, Only if user define an filed outside of form and want to submit it with form then only we need to use renderDateTimeField formName field. (OFBIZ-9380)
Thanks Chuck Kosta for reporting the issue.

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1796262 13f79535-47bb-0310-9956-ffa450edef68
2017-05-26 09:19:29 +00:00
Jacques Le Roux f2e9b9eeed Implemented: Add support for 'set-if-null' and 'set-if-empty' attributes on
screens for set element.
(OFBIZ-9251)

As stated in the discussion:
http://ofbiz.markmail.org/thread/hembr4hiabgwr7cs

"set-if-null" controls if field can be set to null and "set-if-empty" controls 
if field can be set to an empty value. Both these attributes are supported by 
"set" element of simple-method and similar support should be there on the screen.

jleroux: I fixed "if" formatting and added default="true" in widget-common.xsd

Thanks: Aditya Sharma

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1794513 13f79535-47bb-0310-9956-ffa450edef68
2017-05-09 09:33:52 +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 0cddec3a01 Fixed: Fix Default or Empty Catch block in Java files
(OFBIZ-8341)

Obviously a PatternSyntaxException should not occur there. 
So I simply put a comment to document the fact even it it seems obvious.

I note though that the repeated pattern is a smell for refactoring...

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1789163 13f79535-47bb-0310-9956-ffa450edef68
2017-03-28 15:26:02 +00:00
Jacques Le Roux 6572f0ceb0 Completed: Missing reference to the delegator in HtmlFormMacroLibrary.ftl
(OFBIZ-9230)

No functional changes, completes r1785882. I missed the other macro types which 
don't implement these macros

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1785925 13f79535-47bb-0310-9956-ffa450edef68
2017-03-08 08:21:49 +00:00
Jacques Le Roux 9b2209ef5d Fixed: Missing reference to the delegator in HtmlFormMacroLibrary.ftl
(OFBIZ-9230)

This has been temporarily fixed with r1784259. After a discussion on dev ML and
a code analysis reported in the Jira issue, I decided to follow Rishi Solanki's 
idea of using the delegatorName.

Since we have no context when executing a macro in the widget form, I decided 
to pass it to the macro. I had though to create an 
EntityUtilProperties.getPropertyValueFromDelegatorName() method to eventually 
pass the delegatorName. Two macros were concerned renderLookupField and 
renderTextField.

Note: while analysing the code I found that EntityExpr.checkRhsType() can face
a related kind of problem. I'll commit an improvement later...

Thanks: Wai for report and discussion and Rishi for pursuing his idea of using 
the delegatorName

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1785882 13f79535-47bb-0310-9956-ffa450edef68
2017-03-07 20:33:09 +00:00
Jacques Le Roux 75d4db8c94 No functional change, just a comment
context is always null here. It misled me , so I prefer to put a comment


git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1785865 13f79535-47bb-0310-9956-ffa450edef68
2017-03-07 18:43:39 +00:00
Jacques Le Roux 70fc173a0d No functional changes, code cleaning
While working on OFBIZ-9230 I noticed those needed changes



git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1785861 13f79535-47bb-0310-9956-ffa450edef68
2017-03-07 17:11:35 +00:00
Jacques Le Roux 084c4fd9db No functional changes
completes r1781219 by putting svn:eol-style=native to all file types declared 
in [auto-props] section of the svn config files.css

Actually this is only a 1st pass, it was too complicated to do it for  
all file types at once only concerned here
*.java;*.bsh;*.groovy;*.jsp;*.tld;*.ftl;*.js;*.sql;*.c;*.cpp;*.h;*.txt;*.sgml;
*.properties;*.xml;.classpath;.project;*.sld;*.gml;*.xsl;*.xsd
*.html;*.htm;*.css;*.md;README;NOTICE;LICENSE;rc.ofbiz.*;*.less;*.dsp;*.dsw

Most files should not be concerned by this change, but it's impossible to do
it one by one.

There are also changes in files with have mixed EOLs; because this has no sense
when using native which automatically resolves this issue

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1781731 13f79535-47bb-0310-9956-ffa450edef68
2017-02-05 11:09:59 +00:00
Jacques Le Roux b057011c26 No functional change, reverts r1781366
I did not even notice I committed this bunch of WIP stuff. I guess I clicked 
somewhere while my machine was too buzy

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1781367 13f79535-47bb-0310-9956-ffa450edef68
2017-02-02 10:54:06 +00:00
Jacques Le Roux e130654d28 No functional change, this was reverted in r1781367
I did not even notice I committed this bunch of WIP stuff. I guess I clicked 
somewhere while my machine was too buzy



git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1781366 13f79535-47bb-0310-9956-ffa450edef68
2017-02-02 10:33:59 +00:00
Jacques Le Roux d26c3318b5 Fixed: Navigate Accounts tree does not work
(OFBIZ-9191)

This is due to a change in (at least) Tomcat 8.0.39

Here is a simple fix. I tried other ways but none worked and I prefer to keep
this simple.
I tried other ways but none worked and I prefer to keep this simple.
* Using an encoder at this stage (just before calling the macro) is not an 
option. Or maybe by using the encoder on the linkurl variable alone. 
But then linkurl  must be transformed in a String and  back to a 
StringBuilder or more refactoring is needed. It does not worth it IMO.
* Also using encode="true" for links in AccountingTrees.xml does not work.

This also removes trailing blanks (by hand)

Thanks: Moatasim Al Masri for report


git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1781125 13f79535-47bb-0310-9956-ffa450edef68
2017-01-31 17:24:01 +00:00
Jacques Le Roux b81851a6ab No functional change, only this test is concerned, more a bug fix though.
Despite missing the creation data in svn, I guess this file has been created 
after I created the portoffset feature or I missed it then (unlikely since I
changed all 8080 and 8443 ports in Java code). 

Anyway, we now need this to be portoffset aware and this commit just does that

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1780659 13f79535-47bb-0310-9956-ffa450edef68
2017-01-28 11:19:34 +00:00
Jacques Le Roux a019a3e257 No functional change, removes unused local delegator variables
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1778880 13f79535-47bb-0310-9956-ffa450edef68
2017-01-15 06:25:33 +00:00
Jacques Le Roux f9cfdd5880 No functional change, only formatting and imports cleaning
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1777446 13f79535-47bb-0310-9956-ffa450edef68
2017-01-05 11:13:28 +00:00
Jacques Le Roux 409d76ba07 Improved: Refactor ContentWorkerInterface methods signatures
(OFBIZ-9164)

While working on OFBIZ-6919 which was built on R13.07 I stumbled upon an issue 
due to r1652852 where Adrian improved the cacheKey in 
FormFactory.getFormFromLocation() by adding a delegator reference (Tenants). 

Actually I'm not even sure it was done at r1652852 because Adrian did not 
maintain the FormFactory svn history.

Anyway, to make a long story short I had to introduce a DispatchContext 
parameter when calling FormFactory.readFormDocument() when the code from 
R13.07 only passed a null.

This had an impact in the hierarchy tree because FormFactory.readFormDocument() 
was called in DataResourceWorker class, where the new code was called 
from renderDataResourceAsText(). 

So I instead of only passing a Delegator I decided to pass only a 
LocalDispatcher parameter in renderDataResourceAsText(), since we can get the 
Delegator  from the LocalDispatcher. Doing so it had an impact on the 
renderDataResourceAsText hierarchy tree ending in DataResourceWorkerInterface 
and all related.

I finally decided to apply the same "Change Method Signature" refactoring 
pattern (http://refactoring.com/catalog/addParameter.html) to all cases 
related to ContentWorkerInterface. No need to pass a delegator when you have 
LocalDispatcher!

Since last commit and revert I fixed 5 test failures and improved the code more,
 mostly formatting, comments, etc.

There are very ugly method signatures out there which still need refactoring,
but it's so much work...

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1777297 13f79535-47bb-0310-9956-ffa450edef68
2017-01-04 12:48:11 +00:00
Jacques Le Roux e59c71db8b Reverted:Merged revision(s) 1777145 from ofbiz/trunk:
Improved: Refactor ContentWorkerInterface methods signatures
(OFBIZ-9164)

While working on OFBIZ-6919 which was built on R13.07 I stumbled upon an issue 
due to r1652852 where Adrian improved the cacheKey in 
FormFactory.getFormFromLocation() by adding a delegator reference (Tenants). 

Actually I'm not even sure it was done at r1652852 because Adrian did not 
maintain the FormFactory svn history.

Anyway, to make a long story short I had to introduce a DispatchContext 
parameter when calling FormFactory.readFormDocument() when the code from 
R13.07 only passed a null.

This had an impact in the hierarchy tree because FormFactory.readFormDocument() 
was called in DataResourceWorker class, where the new code was called 
from renderDataResourceAsText(). 

So I instead of only passing a Delegator I decided to pass only a 
LocalDispatcher parameter in renderDataResourceAsText(), since we can get the 
Delegator  from the LocalDispatcher. Doing so it had an impact on the 
renderDataResourceAsText hierarchy tree ending in DataResourceWorkerInterface 
and all related.

I finally decided to apply the same "Change Method Signature" refactoring 
pattern (http://refactoring.com/catalog/addParameter.html) to all cases 
related to ContentWorkerInterface. No need to pass a delegator when you have 
LocalDispatcher!

I locally got 5 incomprehensible test failures. After checking as much as I can
w/o committing I believe it's a Windows 7 issue only. Anyway if Buildbot reports
the same I'll revert. I need this changes in to continue on another not yet 
created subtask of OFBIZ-6919 
........


git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1777154 13f79535-47bb-0310-9956-ffa450edef68
2017-01-03 16:14:29 +00:00
Jacques Le Roux 8ff0fe3a74 Improved: Refactor ContentWorkerInterface methods signatures
(OFBIZ-9164)

While working on OFBIZ-6919 which was built on R13.07 I stumbled upon an issue 
due to r1652852 where Adrian improved the cacheKey in 
FormFactory.getFormFromLocation() by adding a delegator reference (Tenants). 

Actually I'm not even sure it was done at r1652852 because Adrian did not 
maintain the FormFactory svn history.

Anyway, to make a long story short I had to introduce a DispatchContext 
parameter when calling FormFactory.readFormDocument() when the code from 
R13.07 only passed a null.

This had an impact in the hierarchy tree because FormFactory.readFormDocument() 
was called in DataResourceWorker class, where the new code was called 
from renderDataResourceAsText(). 

So I instead of only passing a Delegator I decided to pass only a 
LocalDispatcher parameter in renderDataResourceAsText(), since we can get the 
Delegator  from the LocalDispatcher. Doing so it had an impact on the 
renderDataResourceAsText hierarchy tree ending in DataResourceWorkerInterface 
and all related.

I finally decided to apply the same "Change Method Signature" refactoring 
pattern (http://refactoring.com/catalog/addParameter.html) to all cases 
related to ContentWorkerInterface. No need to pass a delegator when you have 
LocalDispatcher!

I locally got 5 incomprehensible test failures. After checking as much as I can
w/o committing I believe it's a Windows 7 issue only. Anyway if Buildbot reports
the same I'll revert. I need this changes in to continue on another not yet 
created subtask of OFBIZ-6919 

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1777145 13f79535-47bb-0310-9956-ffa450edef68
2017-01-03 15:37:25 +00:00
Jacopo Cappellato 1b9f6eba44 Implemented: a set of unit tests for the
ExternalLoginKeysManager.getExternalLoginKey(...) method.

Minor refactoring of the getExternalLoginKey(...) method to make it more 
friendly to unit tests.


git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1776138 13f79535-47bb-0310-9956-ffa450edef68
2016-12-27 14:29:37 +00:00
Jacopo Cappellato ebac046aef Improved: moved the logic/implementation of OFBiz legacy authentication
tokens from the LoginWorker class to a new class named ExternalLoginKeysManager.

Improved Javadocs in the new class.
 


git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1775807 13f79535-47bb-0310-9956-ffa450edef68
2016-12-23 09:35:26 +00:00
Taher A. Alkhateeb 71f512a0d2 Improved: refactor javadocs in OFBiz to be standards compliant
(OFBIZ-9144)

This is the first commit to the above mentioned issue which fixes many javadoc
errors dispersed through the different components. The fixes are not
necessarily improvements to the javadocs but rather making them valid javadocs
to prevent reporting errors from gradle


git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1774154 13f79535-47bb-0310-9956-ffa450edef68
2016-12-14 09:22:32 +00:00
Jacopo Cappellato 262e87f79e Fixed: form macros with incorrect arguments.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1773337 13f79535-47bb-0310-9956-ffa450edef68
2016-12-09 08:47:41 +00:00
Deepak Dixit 05b1f9cb81 Fixed: layered-modal hyperlink doesn't show style
(OFBIZ-7323)


Thanks Pierre Smits for reporting the issue.

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1770490 13f79535-47bb-0310-9956-ffa450edef68
2016-11-19 12:03:36 +00:00
Divesh Dutta 8e8272b4fa Improvement: Generic value is null or not should be checked using native checks. Utility method isEmpty or isNotEmpty is not needed to check if generic value is null or not because generic values can never be empty. They can be null or not nulls. So made changes accordingly all over the places.
(OFBIZ-8471)

Thanks: Ratnesh Upadhyay for reporting the improvement and providing the patch.

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1768192 13f79535-47bb-0310-9956-ffa450edef68
2016-11-05 11:27:46 +00:00
Arun Patidar 80498ef38d Implemented: Refer to objects by their interfaces rather than class when instantiating Collection implementation classes in Java files
(OFBIZ-9023) (OFBIZ-9026)(OFBIZ-9027)(OFBIZ-9032)(OFBIZ-9034)(OFBIZ-9036)(OFBIZ-9030)

Thanks: Divesh Dutta, Amit Gadaley and Shubham Agrawal for the contribution.

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1768189 13f79535-47bb-0310-9956-ffa450edef68
2016-11-05 11:16:49 +00:00
Arun Patidar 3521a331b7 Fixed: Catch GenericEntityException and GenericServiceException and other instead of Exception in Java classes.
(OFBIZ-8909)(OFBIZ-8910)(OFBIZ-8911)(OFBIZ-8912)(OFBIZ-8913)(OFBIZ-8914)(OFBIZ-8915)(OFBIZ-8917)(OFBIZ-8918)(OFBIZ-8919)(OFBIZ-8920)(OFBIZ-8921)(OFBIZ-8922)

Thanks: Divesh Dutta for reporting and Amit Gaadaley for providing patch.

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1768168 13f79535-47bb-0310-9956-ffa450edef68
2016-11-05 09:30:07 +00:00
Arun Patidar 80e3f8ec12 Fixed: Page bottom navigation problem with grid and include-grid
(OFBIZ-7648)

Thanks: Rohit Koushal and Rishi Solanki for the contribution.

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1768150 13f79535-47bb-0310-9956-ffa450edef68
2016-11-05 05:08:16 +00:00