(OFBIZ-10052)
This completes the work done so far by removing double check in cases not using
brackets, like
if (Debug.verboseOn())
if (Debug.verboseOn()) Debug.logVerbose()
Thanks: Michael for reporting this case I missed.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1818445 13f79535-47bb-0310-9956-ffa450edef68
by org.jsoup.parser.Parser.unescapeEntities()
(OFBIZ-10023)
StringEscapeUtils.unescapeHtml() is deprecated or at least not reliable
After few tests using the Parser.unescapeEntities() strict mode seems OK
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1816461 13f79535-47bb-0310-9956-ffa450edef68
rendering error
(OFBIZ-9889)
A bug was introduced in OFBIZ-9710, that created a catch block for a
RuntimeException that would be thrown again. Unfortunately the code block relied
on catching a NumberFormatException in case VIEW_INDEX was not set, which in the
original code was not intuitively recognisable, because only Exception was caught.
In the provided patch I removed the catch block for the RTE und changed Exception
to NumberFormatException, since it is the only Exception that is expected.
Thanks: Tobias Laufkötter
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1813067 13f79535-47bb-0310-9956-ffa450edef68
org.apache.ofbiz.widget.renderer.
(OFBIZ-9704)
Applied a modified version of the patch, the null check for menuWarapper
in MenuWrapTransfor is needed.
Thanks Julian Leichert for reporting and providing the patch.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1812908 13f79535-47bb-0310-9956-ffa450edef68
org.apache.ofbiz.widget.renderer.html.
(OFBIZ-9686)
I modified the class further by removing all commented out code.
Thanks Julian Leichert for reporting and providing the patch.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1811439 13f79535-47bb-0310-9956-ffa450edef68
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
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
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
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
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
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
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
(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
(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
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
(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
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