Commit Graph
245 Commits
Author SHA1 Message Date
Jacques Le Roux d324f6abee Fixed: Attribute 'placeholder' is not allowed to appear in element 'text'
Completes the previous fix by Wei Zhang. This was committed at a wrong place
for OFBIZ-5341. Only text was concerned, not date-time
2022-01-29 10:57:31 +01:00
Gil Portenseigne ab9ca12221 Execute a callback with parameters from the request (OFBIZ-12262)
Transform workEffort creation using modal and callback system to
illustrate this improvement.

A new Attribute `from-event-result` is created for `set-callback`
parameters, to indicate that the callback should be called with a
parameter which value comes from the event result initiated by the link.

In this example, is retrieved from the workeffort creation event the id
needed to display the WorkEffortSummary screen of the new data.

A new pattern is created to encode in CALLBACK JWT token the data that
should be parsed from the event. The parsing occurs in javascript.
2021-09-07 14:56:20 +02:00
Gil Portenseigne b4e46ff070 Implemented : New child element set-callback on link to control dynamism (OFBIZ-11812)
Refreshment information are controlled by the calling object,
instead of the called form.

This avoid dependency between called form and parent screens.

The set-callback tag generate a jwt encoded UpdateArea widget, that
is transmitted through submits and links until a submit with no
update-area information is met.  This specific submit ends the
process launched by the link, and trigger the refresh action
contained into the JWT token.
2021-06-24 16:13:00 +02:00
Nicolas Malin b663660486 Implemented: on-event-update-area on form inherit information from parent form
(OFBIZ-11811) (OFBIZ-11808)

When you write a form, if you want the dynamic interaction and style, you need to implement everything on the form.
The developer must know the style used, different area and rules support by the technology besides the really information/action that the form will do.

   <form name="ListFacility" type="list" list-name="listIt" paginate-target="FindFacility"
         odd-row-style="alternate-row" header-row-style="header-row-2" default-table-style="basic-table hover-bar">
       <actions>...
       <field name="facilityId">....
       <on-event-update-area event-type="sort-column" area-id="search-results" area-target="FacilitySearchResults"/>
       <on-event-update-area event-type="paginate" area-id="search-results" area-target="FacilitySearchResults"/>
   </form>

We can put all information on the theme and all dynamic refresh (for area) are related to the parent form and parent screen. Finally we will obtain :

    <form name="ListFacility" extends="CommonDynamicList" extends-resource="component://common/widget/CommonForms.xml"
          paginate-target="FindFacility">
        <actions>...
        <field name="facilityId">....
    </form>

    <form name="CommonDynamicList" type="list"
         odd-row-style="alternate-row" header-row-style="header-row-2" default-table-style="basic-table hover-bar">
       <on-event-update-area event-type="sort-column"/>
       <on-event-update-area event-type="paginate"/>
   </form>

The target and area to update has been automatically resolved from the parent form and screen.

This commit improve the modelForm and the widget-form.xsd to do that.

Thanks to Gil Portenseigne his help
2021-05-21 17:58:27 +02:00
Nicolas Malin 5229d572df Implemented: Element link can update partial area
(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.
2021-02-17 18:11:19 +01:00
Jacques Le Roux ec2b84341e Reverted: "Improved: Hyperlink target-type attribute is deprecated and should be replaced by url-mode (OFBIZ-12091)"
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
2020-12-18 11:08:32 +01:00
James Yong cac8c27477 Improved: Allow <html-template> to accept CDATA (OFBIZ-7004)
Fix cvc-complex-type.2.1 error
2020-09-10 10:13:28 +08:00
James Yong a8eb8bc059 Improved: Allow <html-template> to accept CDATA (OFBIZ-7004)
Allow inline content

Thanks: Jacques for review in 2016
2020-09-10 09:12:05 +08:00
Jacques Le Roux 9b3053de97 Improved: Complete the documentation in the XSD files (OFBIZ-7537)
Small changes in order to close the Jira :)
2020-08-29 19:17:49 +02:00
James Yong 4612e49fa6 Improved: multi-block attribute for html-template tag (OFBIZ-11686)
Remove support to headerize script and css links from html-template
as importLibrary js function is a more simple solution.
2020-08-23 21:55:09 +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 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 205914a1be Improved: just remove trailing space 2020-05-22 11:47:55 +02: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 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
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
Daniel Watford 5640de4eba Documented: Documented use of field attribute parameter-name and
lookup field attribute target-parameter in widget-form.xsd

(OFBIZ-11418)
2020-02-27 20:50:41 +00:00
Daniel Watford d6132fa534 Documented: change the id Attribute for input fields in the model macro
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.
2020-02-23 20:28:45 +01:00
Nicolas Malin 38f972a0d0 Improved: Add CommonForms as template pattern configured by theme
(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.
2020-02-20 14:49:11 +01:00
Nicolas Malin 4a511be1cc Implemented: Homogenize displaying number with multiple format
(OFBIZ-7532)

To display a number we had different possibilities :
 * on ftl use the template <@ofbizAmount and <@ofbizCurrency
 * by java call a function UtilFormatOut.formatAmount, UtilFormatOut.formatPrice, UtilFormatOut.formatQuantity, etc..
 * by form widget, use <display type=accounting-number for accounting but nothing for other

To simplify and homogenize all, I implemented a number type purpose :
   * default: display a number by default, use when no purpose is present
   * quantity: display a number as a quantity
   * amount: display a number as an amount (like price without currency)
   * spelled: litteral displaying for a number (use on <@ofbizAmount ftl only before)
   * percentage: display a number as a percentage
   * accounting: diplay a number for accounting specific

Each purpose can be associate to a number for displaying it :
   * on ftl <@ofbizNumber number=value format=purpose/>
   * on java UtilFormatOut.formatNumber(value, purpose, delegator, locale)
   * on form widget <display type=number format=purpose/>

The format use by a purpose is define on framework/common/config/number.properties with the template
    .displaying.format = ##0.00

With this, you can surchage a configuration, create your own purpose or surchage only one through entity SystemProperty.

Concerning the backware compatibility: 
 * For the ftl the template <@ofbizAmount is now a link to '<@ofbizNumber format=amount'
 * For java all previous function call UtilFormatOut.formatNumber with the matching purpose
 * For form xml accounting-number is managed as an exection

Last point, display a currency is different that a number, so I didn't refactoring some code for this case (only move properties from general to number for centralize de configuration on the same file)

Thanks Charles Steltzlen to start the refactoring

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1864832 13f79535-47bb-0310-9956-ffa450edef68
2019-08-09 20:37:11 +00:00
Suraj Khurana 90e70dd2f2 Fixed: Enable entity timestamp fields.
(OFBIZ-10959)
While working on a Production environment, it is found that for some reason entity timestamp fields are disabled at Search Results screen in Trunk and the previous release branch.

Thanks Pawan Verma for reporting the issue and providing the patch, Jacques, Gil, Mathieu for reviewing it.

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1859915 13f79535-47bb-0310-9956-ffa450edef68
2019-05-25 08:26:33 +00:00
Jacques Le Roux fc87d60987 Improved: Similar values reflecting twice on Add Action Type dropdown in Pricerule
(OFBIZ-10660)

Steps to Regenerate
1. Open /catalog/control/createProductPriceCond
2. Add the name for a new Price Rule
3. Add Condition and go to Add Action panel
4. Check the dropdown values under Action Type

*Actual: *
Same value reflecting twice in the dropdown ( Flat Amount Modify)
The Image is attached in Jira for reference

Thanks: Archana Asthana for report Prakhar Kumar for the fix

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1858355 13f79535-47bb-0310-9956-ffa450edef68
2019-04-29 09:55:56 +00:00
Nicolas Malin 2e1cacb2a8 Improved: Improve error message page to support Theming
(OFBIZ-10753)

When OFBiz raise an error, the framework use a jsp page to display it.
I improved the error page generation to support also ftl template rendering and by this way extend the theme engine to support to overide it

On controler.xml we can now use :
    <errorpage>/error/error.jsp</errorpage>
or 
    <errorpage>component://common/webcommon/error/Error.ftl</errorpage> (default configuration)

On your theme you can add your own error page :
    <template> 
      ...
      <template-file widget=menu location=component://common-theme/template/macro/HtmlMenuMacroLibrary.ftl/>
    + <template-file widget=error location=component://common-theme/template/ErrorPage.ftl/>
    </template>

The component://common/webcommon/error/Error.ftl contains the logic theming connection and to simplify source code, all framework old error page (error.jsp) have been removed to centralize all on this new page.

Thanks to Marine Desmarchelier for the error page design

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1856175 13f79535-47bb-0310-9956-ffa450edef68
2019-03-25 09:31:02 +00:00
Jacques Le Roux b0478d13f0 Improved: XML schemas should use predefined boolean type
(OFBIZ-10411)

To define boolean values, some ad-hoc enumeration of "true" and "false" are 
repeatedly used.  Since XML Schema defines a standard boolean datatype it's 
better to use it.

Thanks: Mathieu Lirzin

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1846727 13f79535-47bb-0310-9956-ffa450edef68
2018-11-16 16:38:24 +00:00
Julien Nicolas 995a39461a fixed: Change the Menu extends-resource management to allow structure changes by themes
(OFBIZ-10600)

Fixed the lack of menu theme definition in the xsd file

Thanks: To Jacques Le Roux for being more attentive to the log file than I have been ;)

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1844697 13f79535-47bb-0310-9956-ffa450edef68
2018-10-23 20:11:00 +00:00
Suraj Khurana 2d2aba0a4c Improved: Empty header row should not render if list to render in file is empty.
(OFBIZ-7598)
Thanks everyone for your inputs and suggestions.

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1839729 13f79535-47bb-0310-9956-ffa450edef68
2018-08-31 06:33:07 +00:00
Suraj Khurana 5d317c08de Reverted: Empty header row should not render if list to render in file is empty.
(OFBIZ-7598)

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1838823 13f79535-47bb-0310-9956-ffa450edef68
2018-08-24 11:37:16 +00:00
Deepak Dixit e7a7ba4876 Improved: Rendering different HTML container types with ScreenRenderer
(OFBIZ-10495)
Applied slightly modified patch 
Thanks Dennis Balkir for your contribution

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1837827 13f79535-47bb-0310-9956-ffa450edef68
2018-08-10 18:23:11 +00:00
Suraj Khurana 65b5b117f7 Improved: Empty header row should not render if list to render in file is empty.
(OFBIZ-7598)

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1835869 13f79535-47bb-0310-9956-ffa450edef68
2018-07-14 05:10:00 +00:00
Suraj Khurana 920050d685 Reverted: Empty header row should not render if list to render in file is empty because after this, search Result tables won't show first search result.
{OFBIZ-10438}

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1835042 13f79535-47bb-0310-9956-ffa450edef68
2018-07-04 05:24:41 +00:00
Rishi Solanki b9cf8a5d55 Improved: Add Support for Disable attribute in CheckBox Form Widget. Disabled attrivute can be used as
<field><check disabled=true/></field>

and default value for attribute will be false.
(OFBIZ-10367)
Thanks Pawan Verma for reporting the improvement and providing patch for that.
Thanks James Yong for testing the work.

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1833231 13f79535-47bb-0310-9956-ffa450edef68
2018-06-09 12:34:49 +00:00
Jacques Le Roux 22b6c33e88 Improved: Empty header row should not render if list to render in file is empty
(OFBIZ-7598)

If list inside form doesn't contain data, then header row should not render from
better UI perspective and proper message should be shown to user.

Get to catalog/control/EditProductGoodIdentifications with eg 
productId=ID:GZ-1006 for a test 

Thanks: Suraj 

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1832401 13f79535-47bb-0310-9956-ffa450edef68
2018-05-28 14:37:44 +00:00
Gil Portenseigne 65fe235f51 Implemented: Add the ability in performFind service to set OR search criteria
(OFBIZ-10195)

This improvement add a way to specify a condition-group attribute on search fields, for performFind service usage.
The same group conditions are gathered with AND operator, and each group is added with a OR
The resulting condition is added to the other with AND operator.
Thanks Taher for your reviews and ideas

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1825350 13f79535-47bb-0310-9956-ffa450edef68
2018-02-26 09:57:36 +00:00
Deepak Dixit d24c956bf9 Improved: Moved plugins js from images to common/js (OFBIZ-5776)
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1818600 13f79535-47bb-0310-9956-ffa450edef68
2017-12-18 18:16:09 +00:00
Deepak Dixit 982fe0c58a Added missing licence header
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1813620 13f79535-47bb-0310-9956-ffa450edef68
2017-10-28 12:46:43 +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
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 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
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
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 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 b0b7c65c0e Reverted: Can't find Company and admin in Party find feature
(OFBIZ-8505)

Reverts r1765058 + r1765080 following discussion on dev ML

This was introduced for this improvement: In form widgets of list type empty 
header row should not render if list to render in file is empty for OFBIZ-7598

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1766080 13f79535-47bb-0310-9956-ffa450edef68
2016-10-21 17:31:37 +00:00
Mridul Pathak 76fcb2f49a Improved: In form widgets of list type empty header row should not render if list to render in file is empty.
(OFBIZ-7598)

Thanks: Suraj Khurana for contribution.

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1765058 13f79535-47bb-0310-9956-ffa450edef68
2016-10-15 13:19:35 +00:00
Jacques Le Roux 615c18cb0f Improves: Adds a small sentence saying to look before for a possible
FormFieldTitle_ in the autocompletion help when creating a form widget title


git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1761975 13f79535-47bb-0310-9956-ffa450edef68
2016-09-22 16:14:35 +00:00
Deepak Dixit 834691742b (OFBIZ-6274) Renamed OFBiz artefacts from org.ofbiz.* to org.apache.ofbiz.*.Thanks to Taher for working on it.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1752920 13f79535-47bb-0310-9956-ffa450edef68
2016-07-16 10:30:49 +00:00
Jacques Le Roux 949d21159c A patch from James Yong for "Invalid content was found starting with element 'xls'" https://issues.apache.org/jira/browse/OFBIZ-7699 reported by Nameet Jain
If found this in console logs:

XmlFileLoader: File file:/home/ofbizDemo/trunk/framework/common/widget/CommonScreens.xml process error. Line: 491. Error message: cvc-complex-type.2.4.d: Invalid content was found starting with element 'xls'. No child element is expected at this point.

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1751055 13f79535-47bb-0310-9956-ffa450edef68
2016-07-02 12:47:38 +00:00