Details
-
Bug
-
Status: Closed
-
Minor
-
Resolution: Fixed
-
Trunk
Description
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.