Commit Graph
1482 Commits
Author SHA1 Message Date
Suraj Khurana 8b1e0dbd85 Improved: Corrected all checkstyle formatting issues: 'typecast' is not followed by whitespace in framework component.
(OFBIZ-11887)
2020-07-18 12:26:42 +05:30
Suraj Khurana 0c37e80036 Improved: Corrected all checkstyle formatting issues: Line has trailing spaces in framework component.
(OFBIZ-11880)
Thanks Jacques for review.
2020-07-13 14:18:24 +05:30
Suraj Khurana dd4da77d76 Improved: Corrected checkstyle formatting issues, 'is preceded/not preceded with whitespace' for framework component.
(OFBIZ-11874)
This fixes following checkstyle issues:
'{' is not preceded with whitespace.
'{' is not followed by whitespace.
'}' is not followed by whitespace.
'}' is not preceded with whitespace.
'typecast' is not followed by whitespace.
'try' is not followed by whitespace.
';' is preceded with whitespace.
2020-07-11 14:33:47 +05:30
Suraj Khurana 3bb22302c7 Improved: Corrected all checkstyle issues related to succeeding space for comma in framework directory.
(OFBIZ-11805)
Thanks Jacques and Ritesh Kumar for review.
2020-07-09 12:07:29 +05:30
Suraj Khurana a38fa69e57 Improved: Corrected typo in license header text in ModelActionVisitor.java, ModelConditionVisitor.java and ModelFieldVisitor.java. While working on some checkstyle issues, I found this typo. 2020-07-08 11:12:07 +05:30
Suraj Khurana 4f53828bea Improved: Corrected all 'if is not followed by whitespace' checkstyle errors. Also corrected few ', is not followed by whitespace' checkstyle errors in framework component.
(OFBIZ-11805)
Thanks Jacques Le Roux and Ritesh Kumar for review.
2020-07-06 15:29:58 +05:30
Daniel Watford 3bc59aeb14 Improved: Added new MacroFormRenderer unit tests (OFBIZ-11456) (#213)
Improved: Suppress deprecation warning on test method used to ensure behaviour is preserved until the deprecated method is removed. (OFBIZ-11456)

* Improved: Unit Tests for MacroFormRenderer

As part of refactoring MacroFormRender, unit tests have been created for
the main render methods to help ensure consistent behaviour is
maintained when MacroFormRender is changed.

More in-depth unit testing may be added when the more complex parts of
MacroFormRenderer are modified in the future.
2020-07-03 09:31:21 +02:00
Jacques Le Roux b1e48eef37 Improved: makes ScreenFopViewHandler::render debug area also usable on Windows 2020-06-29 11:47:23 +02:00
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
Pawan Verma 4275825b4a Improved: Replace anonymous types with lambda expressions(OFBIZ-11833) 2020-06-24 14:11:05 +05:30
James Yong 4dbdf720c5 Fixed: Apply multi-block attr to each application (OFBIZ-11706)
Rendering screen within freemarker template not done correctly when multi-block=true

Thanks: Jacques for reporting
2020-06-19 23:09:17 +08:00
James Yong 3a13afe811 Fixed: showHelp not working (OFBIZ-11803)
Cater for page that uses layoutSettings.VT_STYLESHEET
instead of layoutSettings.styleSheets
2020-06-18 23:29:02 +08:00
James Yong 33deb94501 Improved: Allow definition of external style sheet in multi-block html template (OFBIZ-11819)
External style sheet in html template will be extracted to layoutSettings.styleSheets when multi-block=true.
2020-06-12 14:12:45 +08:00
James Yong f21dbd6d74 Improved: multi-block attribute for html-template tag (OFBIZ-11686)
Add CSRF token support for 'getJs' request uri.
2020-06-07 14:33:16 +08:00
James Yong e3f6d1547f Improved: Headerize external script in multi-block html template (OFBIZ-11741)
Fix regression in scrumtests that resulted in NullPointerException.
2020-06-06 14:28:32 +08:00
James Yong 347ea63479 Improved: Headerize external script in multi-block html template (OFBIZ-11741)
Improve function for adding links to layoutSettings
2020-06-06 10:23:41 +08:00
Jacques Le Roux 4b55e07505 Improved: Headerize external script in multi-block html template (OFBIZ-11741)
Fixes Javadoc issues
2020-06-01 07:52:59 +02:00
James Yong a5ab3961fa Improved: Headerize external script in multi-block html template (OFBIZ-11741)
Allow expression in template location.
2020-05-31 23:31:49 +08:00
James Yong f85040ff04 Improved: Headerize external script in multi-block html template (OFBIZ-11741)
Allow expression in template location.
2020-05-31 17:42:42 +08:00
James Yong d1a22a6ba8 Improved: Headerize external script in multi-block html template (OFBIZ-11741)
Cleanup script cache when session ended
2020-05-30 14:32:38 +08:00
James Yong c0e527efb2 Improved: Headerize external script in multi-block html template (OFBIZ-11741)
Allow external scripts within the multi-block html template, to be rendered
within the html head tag, when a new attribute data-import is set to “head”

Thanks: Jacques for review
2020-05-30 12:00:21 +08:00
holivier 1f673804a4 Improved: put simple-method optional for compound file (OFBIZ-11645) 2020-05-29 11:54:50 +02:00
holivier 097db39ee0 fixed: sort-order (field) not works in CompoundWidgets file (OFBIZ-11708)
In a form, when <sort-order tag is used, the children analyze not works
because, getTagName() is used not the getLocalName(). getTagName()
return "wf:sort-field" when getLocalName return "sort-field".
So change getTagName() to getLocalName() for sort-order children
2020-05-29 11:43:58 +02:00
holivier e4ee439e27 Fixed: drop-down field not work when in a compound-widget file (OFBIZ-11676)
When, in ModelFormField, FieldInfoWithOptions (which read xml file ) is
call, test on tag name is done with getName() and not getLocalName() so
none "option" is recognize when field is declare on a compound-widget
file. getName() is change to getLocalName()
2020-05-29 11:26:40 +02:00
Suraj Khurana abc7836dde Improved: Made MODULE as private data member of class instead of public in all framework components.
(OFBIZ-11739)
This will reduce checkstlye issues. Thanks Jacques for review.
2020-05-29 13:20:46 +05:30
James Yong 767390ad89 Improved: Apply multi-block attr to each application (OFBIZ-11706)
1. Bug Fix
2. Disable multi-block until function is stabilized.
2020-05-23 14:08:35 +08:00
holivier 205914a1be Improved: just remove trailing space 2020-05-22 11:47:55 +02:00
James Yong e675f0a79f Improved: Apply multi-block attr to each application (OFBIZ-11706)
1. Fix missing Boundary Comment at beginning
2. Apply multi-block attr
2020-05-22 00:54:20 +08:00
Pawan Verma 3b7e63744c Improved: Expansion of form widget field disabled atrribute with xsd improvement (#141)
(OFBIZ-10432)

1. Added disabled attribute support in ModelFormField with xs:boolean type
2. Removed specific field level disabled attribute support for CheckField and TextField
3. Modified existing usage of disabled attribute as per new implementation.

Thanks: Rishi for the report and Taher, Gil and Jacques for the feedback
2020-05-19 17:37:24 +05:30
James Yong e3e12ee487 Improved: No need to specify externalKeyParam in ofbizUrl calls (OFBIZ-11711)
Let ofbizUrl macro generates externalLoginKey when needed.

Thanks: Jacques for review
2020-05-17 20:37:48 +08:00
James Yong 47e6b9cad6 Improved: Apply multi-block attr to each application (OFBIZ-11706)
Fix regresssion
2020-05-16 17:51:34 +08:00
James Yong d94beee1b6 Improved: Apply multi-block attr to each application (OFBIZ-11706)
For Party application.
Also fixed bug where external script tag is incorrectly handled
when extracting internal script tag from freemarker template.
2020-05-15 15:43:31 +08:00
James Yong 60c78d24be Improved: <script-template> widget tag (OFBIZ-11686)
Removed script-template tag.
Use multi-block=true on html-template tag instead.
2020-05-15 11:16:15 +08:00
holivier 4f5e6f9f06 Improved: <script-template> widget tag
(OFBIZ-11686)

Correction in javadoc, <script is not authorize in javadoc because it
can introduce some javascript in javadoc, and so generate an error in
javadoc build.
Replace <script-template/> by "script-template"
2020-05-14 09:38:23 +02:00
James Yong 803f7fa060 Improved: <script-template> widget tag (OFBIZ-11686)
The new tag allows us to render a freemarker template containing javascript,
as external script in html instead of inline script.
This helps to reduce CSP errors.
2020-05-13 20:19:05 +08:00
Pawan Verma 8bd7b9b6f9 Fixed: Theme files loading taking longer time
(OFBIZ-11665)

Thanks: Pierre and Jacques for the review.
2020-05-10 14:17:13 +05:30
Jacques Le Roux ec23f8b61f Fixed: Compound-widget not works with condition
(OFBIZ-11606)

Fixes "<**:condition" not well managed and generating an error

Changes all the getNodeName() by getLocalName() in the ModelX****Condition.java

Thanks: Olivier
2020-04-27 17:43:38 +02:00
Jacques Le Roux d7c42e3b8c Fixed: Compound-widget not works with condition
(OFBIZ-11606)

rootElement is not correct for a compound file, it's necessary to do a
UtilXml.firstChildElement(rootElement, "forms"); to be correct.
It's done for screen, form but not for grid !

So correction is now added the correct read of rootElement.

Thanks: Olivier
2020-04-27 14:31:31 +02:00
Jacques Le Roux b95fa36bf4 Improved: follow checkstyle conventions in files committed for CSRF token defense
Mostly manually-automated, so some changes are not perfect. I have manually
changed back excessive ones

Comments out ArrayTypeStyle checkstyle
Updates checkstyleMain.maxErrors
2020-04-06 12:05:16 +02:00
Jacques Le Roux ddb8f4273a Improved: replaces module by MODULE everywhere 2020-04-05 19:46:34 +02:00
Jacques Le Roux 43f46399ff Improved: Added unit testing, using JMockit, to ensure that form macros are
rendered using ids from ModelFormField#getCurrentContainerId.

(OFBIZ-4035)

Fixes check style errors
2020-04-04 15:49:41 +02:00
Jacques Le Roux c68d43efa2 Improved: Added unit testing, using JMockit, to ensure that form macros are
rendered using ids from ModelFormField#getCurrentContainerId.

(OFBIZ-4035)

Fixes an issue due to Eclipse automated import organisation.

There are still check style errors
2020-04-04 15:49:41 +02:00
Jacques Le Roux d1ca68c166 Improved: Added unit testing, using JMockit, to ensure that form macros are
rendered using ids from ModelFormField#getCurrentContainerId.

(OFBIZ-4035)

Fixes a check issue (line too long)

Notice: on Windows I get 20 errors when compiling:
> Task :compileTestJava FAILED
C:\projectsASF\Git\ofbiz-framework\framework\widget\src\test\java\org\apache\
ofbiz\widget\renderer\macro\MacroFormRendererTest.java:134:
error: annotation type not applicable to this kind of declaration
        @Mock
        ^
I guess the change in build.gradle are not enough for Windows, to be seen later...
2020-04-04 15:49:41 +02:00
Daniel Watford 1fbf6c3d6b Improved: Added license header to MacroFormRendererTest
(OFBIZ-4035)
2020-04-04 15:49:41 +02:00
Daniel Watford 87277ab992 Improved: Added unit testing, using JMockit, to ensure that form macros are
rendered using ids from ModelFormField#getCurrentContainerId.

(OFBIZ-4035)
2020-04-04 15:49:40 +02:00
Daniel Watford a769aaf5fd Improved: Ensure MacroFormRenderer uses
ModelFormField#getCurrentContainerId rather than
ModelFormField#getIdName to ensure any FlexibleStringExpander expression
defined in the field's id-name property is processed before rendering
into the container FTL macro.

(OFBIZ-4035)
2020-03-21 11:31:55 +01:00
Daniel Watford 09b42258d9 Fixed: Fixed line lengths in ModelFormFieldTest to adhere to coding standards
(OFBIZ-11418)
2020-03-21 11:31:42 +01:00
Daniel Watford 59f65f3567 Documented: Documented use of field attribute parameter-name and
lookup field attribute target-parameter in widget-form.xsd

(OFBIZ-11418)
2020-03-21 11:31:42 +01:00
Daniel Watford b770f91a97 Improved: Use FlexibleStringExpander in form widget lookup field field
target parameters

(OFBIZ-11418)

Changed target-parameter attribute of the form widget's Lookup field to
use the FlexibleStringExpander type rather than String. This has been
done to allow reference to other form fields which may have had their
parameter-name attribute set to a FlexibleStringExpander expression.
2020-03-21 11:31:42 +01:00
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