You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@ofbiz.apache.org by "Olivier Heintz (Jira)" <ji...@apache.org> on 2020/04/25 07:35:00 UTC
[jira] [Created] (OFBIZ-11606) Compound-widget not works with
condition
Olivier Heintz created OFBIZ-11606:
--------------------------------------
Summary: Compound-widget not works with condition
Key: OFBIZ-11606
URL: https://issues.apache.org/jira/browse/OFBIZ-11606
Project: OFBiz
Issue Type: Bug
Components: framework/widget
Affects Versions: Trunk
Reporter: Olivier Heintz
Assignee: Olivier Heintz
Fix For: Trunk
After starting to use a Compound-widget.xml file to group all the xml definitions (controler - menu - screen - form) of a functional resource, I have found bugs
# <sc:condition was not manage and generate an error
# if a form (or grid) has the same name as the screen, the form is not found
For Bug 1, message is "Condition element not supported with name: xs:if-empty"
After looking commit done when compound-widget have been "create" (xsd, ExampleCompoundWidgets.xml, autocompletion available, ...) I noticed that a lot of xxxxElement.getNodeName() have been change to xxxElement.getLocalName() before testing on name.
So on the first patch I have changed all the getNodeName() by getLocalName() in the ModelXxxxCondition.java, and now there is no more the bug, conditions works
For Bug 2. after studyng WidgetFactory no how screens are search and retrieve and compare to FormFactory and GridFactory, I noticed that getXxxx*s*FromLocation exist in the three but getXxxxFromLocation (without 's') use the previous method only for screen, and it's in these methods that for compoud-widget file root element is <screens or <forms , not the first node of the file.
So I have done on FormFactory and GridFactory the same thing that for screen.
Clearly, framework and java are not my expertise, so patch provide are only done with logical copy-paste, so they need review.
For testing I have tested the file I'm currently done (ExampleWidget.xml) and running some UI tests to check other screen always works.
Of course, if it's necessary to generate same patch for other branch, I can do it.
--
This message was sent by Atlassian Jira
(v8.3.4#803005)