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
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
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()
(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
(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"
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.
(OFBIZ-11606)
Fixes "<**:condition" not well managed and generating an error
Changes all the getNodeName() by getLocalName() in the ModelX****Condition.java
Thanks: Olivier
(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
Mostly manually-automated, so some changes are not perfect. I have manually
changed back excessive ones
Comments out ArrayTypeStyle checkstyle
Updates checkstyleMain.maxErrors
rendered using ids from ModelFormField#getCurrentContainerId.
(OFBIZ-4035)
Fixes an issue due to Eclipse automated import organisation.
There are still check style errors
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...
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)
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.
form renderer from String to FlexibleStringExpander
(OFBIZ-4035)
Document that the id-name attribute for a form widget's field
element can use ${} notation. Also document the default value if id-name is
not set.
(OFBIZ-11335)
Currently on OFBiz we implemented a process to define some different
screen and menu that can be implemented by the theming.
But for the form we have nothing. All style are hard coded on each
<grid name="ListEntities" ...
odd-row-style="alternate-row" default-table-style="basic-table hover-bar">
I extend the theming implementation principle to forms element with adding :
* a new xsd element common-forms (like common-screens)
* some default form templates to extend :
* grid CommonSimpleGrid
* grid CommonBasicGrid
* form CommonSimpleList
* form CommonBasicList
* form CommonInLineEditList
* form CommonBasicSingle
We can use its like :
<form name="LayoutDemoList" extends="CommonBasicList"
extends-resource="component://common/widget/CommonForms.xml"
The main difficulty raise to this task was propage the visualTheme during
the ModelForm intanciation, because we need to load wiget style
(and some other information wanted on the template) on model load in memory.
This is cover by commit 1941a05a34.
Forms present on the screen https://localhost:8443/webtools/control/WebtoolsLayoutDemo
are now extend through with theme.
Finally with this we can extend style form (pagination, header, line and so on ...)
directly by your theme without change the framework.
(OFBIZ-11335)
Related to issue OFBIZ-11335, extends form's factories and form's models
to support a visualTheme during the model creation.
This extend help centralize style information used by forms on a theme.
For performance reason when the model is loaded in memory, all theme information
need to be present to set immutable as possible to put it in cache
(implies why the key cache contains now the visualThemeId).
(OFBIZ-11330)
Allows generation of unique names when repeating rendering of a form on a screen.
Added test cases to ensure parameter names can be built using FlexibleStringExpander.
(OFBIZ-11313)
‘RequestHandler#ControllerConfig’ was a wrapper around
‘ConfigXMLReader#ControllerConfig’ used as a convenience to gather
error handling when accessing configuration properties. Since the
later is now only throwing exceptions when instantiating the object,
‘RequestHandler#ControllerConfig’ is not useful anymore.
(OFBIZ-11161)
All files in {compoment}/config directories are placed in jar
root (cf. sourceSets definition in build.gradle) but there are 4 different
`freemarkerTransforms.properties` in ofbiz (content, product, webapp, widget).
This works fine because we are adding config directories in classpath (through
classpath tag in ofbiz-component.xml), but this is not really intuitive. So to
make things clearer this patch move `freemarkerTransforms.properties` into
`src/main/resources` with a namespace package and `FreeMarkerWorker.java` is
modified accordingly.
(OFBIZ-11253)
When you rendering for with auto-field-entity on edit mode, indicator field has been override by text field.
Fix also two error on source field type set to FieldInfo.SOURCE_AUTO_SERVICE instead of FieldInfo.SOURCE_AUTO_ENTITY
Thanks to Olivier Heintz to inform on the regression.
We currently have two ways to define component loading order. Either
by using ‘depends-on’ attribute in “component-config.xml” or by adding
a “component-load.xml” file at the root of a component directory.
“depends-on” is more flexible because it handles partial ordering when
“component-load.xml” defines a total order which is not necessarily
meaningful, so it is better to rely only “depends-on”.
This removes the usage of “component-load.xml” to use ‘depends-on’
instead. The dependency declarations correspond to the total ordering
previously defined but will need to be refined in the future to relax
unnecessary dependency declarations.
Only “framework/base/config/component-load.xml” which defines the
top-level directories order (framework, applications, themes and
plugins) is kept.
(OFBIZ-11253)
Update the script to generate xml form to introduce new following features :
* set equals as operator by default on pk instead of contains, when you use a pk on FindGeneric it's in general to resolve it on completed key.
* add on tooltip the raw field name
* add possibility to filter on internal field
* add sort on column
During this work I also view that the ModelFormField contains an 'IF forest' to analyze each field. I rewrote it to consolidate the analyze by type.
(OFBIZ-11190)
Currently when you rendering a screen, the transaction timeout would be resolve from the context or use default value (60s)
I reviewed this code part to reorganize timeout resolution on dedicate function (transaction timeout on widget screen is pre-apache)
and introduce possibility to set a default value by properties on 'widget.property' with name 'widget.screen.transaction.defaultTimeout'.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1867620 13f79535-47bb-0310-9956-ffa450edef68