(OFBIZ-11810)
Currently when you want to display an information easily on sub-screen
dynamically (example as related element) is currently not possible without
write specific js code.
To simplify it, we introduce a new link type: update-area, to indicate
to the theme that we want to refresh a local area with the call result.
Example :
<link target="ListCategoryProductMembers" link-type="update-area" target-window="detail">
<parameter param-name="productCategoryId"/>
</link>
For this example we indicate that the display result of target 'ListCategoryProductMembers' is going
on the area identify by 'detail'. Pleasure to the theme to manage it.
In the reported case, ModelFormField::getDescription double HTML encodes the
description when both the entity and the description contain an ampersand.
A solution is to test if the description is already HTML encoded before encoding
it again. If HTML encoded then only String encodes it.
BTW I'm not sure it's useful but it's harmless, the same solution can be applied
to OFBIZ-12026 and similarly in renderableFtlFormElementsBuilder::encode. I'll
do as improvements...
Thanks: Andrew Waters for report and help in analysis
Upcoming Branch is actually another name for trunk. It's always evolving and
never released. Better put a date when deprecating a Class or method. Else you
have no idea when it was deprecated, apart referring to git-blame.
(OFBIZ-11809)
During the rendering process, an element have no information about the screen which is dependent from. This not really help to automate some refresh treatment and force the developer to know the screen structure where is the element.
To solve this situation we implement a new class, ScreenStack that allow anytime for any element to identify its direct dependency. This help to resolve the unique Id that the screen take and can be used by the theme.
At any time a developer can retrieve the screen reference with uel function screen:id(screenStack)
example:
<container id="${screen:id(screenStack)}">
The object screenStack is always present during a rendering process.
fields
(OFBIZ-11900)
New RenderableFtl elements to represent pre-rendered FTL strings and FTL
macro calls. RenderableFtl elements are able to render themselves to
strings which are processed as an FTL template by the FtlWriter class.
For labels, display fields and text fields, MacroFormRenderer no longer
generates FTL to write to a template itself, but instead calls
RenderableFtlFormElementsBuilder to create corresponding RenderableFtl
elements which are then processed by FtlWriter. This is a WIP to reduce
complexity in MacroFormRenderer.
This reverts commit 17eb2e4cf7.
It does not work when using <<target="javascript:........>>
I could change those cases but it's easier and safer to simply revert back to
target-type!
Thanks: James for report
Add the portalPortletId + portletSeqId to the portlet context. This is useful if
a unique identifier within the portlet body (the portlet content) is required.
Thanks: Ingo Wolfmayr
When we use any title with special characters for hyperlink tag, it shows broken
string on UI, eg:
<hyperlink description="${uiLabelMap.CommonImportExport}" target="ImportExport">
should render a button with the title "Import/Export. But it shows as
Import/Export
jleroux: I have noticed that the same happens with special French characters.
So it's a general issue.
The title (description in code) is HTML encoded and that does not work for
special characters. I simply used a string encoder.
Thanks: Pradeep Choudhary for report, Sourabh Jain for a possible but not
general solution at OFBIZ-12023, ie using target-type="plain"
Workaround for an issue reported by
MacroFormRendererTest::renderSortFieldUsesQueryString
Put in with "MacroFormRenderer refactoring" (OFBIZ-11456)
I put a FIXME as I'm not sure how to handle it in a reasonable time :/
For this issue (OFBIZ-8302) I reverted the point 1 of
http://svn.apache.org/viewvc?view=revision&revision=1759555
As reported by Alvaro Munoz from GH security team it's not sufficient:
<<the second part of the fix was not effective, since the attacker can close the
raw string context with a double quote and write a new attribute or even close
the macro tag and write arbitrary FreeMarker code.>>
So this removes the 2nd part and add better solution to fix the OFBIZ-8302 issue
The solution is to encode only the QueryString and to handle it correctly in
UtilHttp::getParameterMap. I must say it was not a sinecure!
Add function to open the corresponding Form Widget file with IDE
when the named border is clicked from browser.
Dependent on widget.dev.namedBorder and widget.dev.cmd.openSourceFile properties.
Thanks Jacques for review
Allow the opening of screen definition that contributed to the web page from the browser. Command to open the file is set at widget.dev.cmd.openSourceFile.
Thanks Jacques for review.
Help to remove dependency of product component from widget component
An afterthought: webapp component seems better for SeoConfigUtil.java than widget component.
Thanks Jacques for review
Better use Debug.logVerbose in place where I replaced missing expression with
another varation of Debug.log. We mainly don't need these information, it's only
for Checkstyle.
I thought did not replace cases where using another variation makes sense
Removes last remaining "Must have at least one statement" issues by using
Debug.logVerbose
Decreases tasks.checkstyleMain.maxErrors from 543 to 535
Thanks: Suraj for report
We have a lot of "do nothing" in Java code. In case of catch we should at least
have Debug.logError(e, MODULE); and maybe an explanation in the comment.