|
[ https://issues.apache.org/jira/browse/OFBIZ-11606?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17093492#comment-17093492 ] ASF subversion and git services commented on OFBIZ-11606: --------------------------------------------------------- Commit 6189bd8dddf6783b2a02d221d586bb0c8baac9be in ofbiz-framework's branch refs/heads/release17.12 from Jacques Le Roux [ https://gitbox.apache.org/repos/asf?p=ofbiz-framework.git;h=6189bd8 ] Fixed: Compound-widget not works with condition (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. jleroux: completely backported by hand Thanks: Olivier > 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: Jacques Le Roux > Priority: Minor > Labels: Framework, widget > Fix For: Trunk > > Attachments: OFBIZ-11606_0001-Fixed-Model-Condition-read-the-name-s-nodes-without-.patch, OFBIZ-11606_0002-Fixed-getGridFromLocation-not-found-grid-in-a-compou.patch > > > 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) |
| Free forum by Nabble | Edit this page |
