[ https://issues.apache.org/jira/browse/OFBIZ-11606?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Olivier Heintz updated OFBIZ-11606: ----------------------------------- Attachment: (was: OFBIZ-11606_0002-Fixed-getGridFromLocation-not-found-grid-in-a-compou.patch) > 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 > Priority: Minor > Labels: Framework, widget > Fix For: Trunk > > Attachments: > OFBIZ-11606_0001-Fixed-Model-Condition-read-the-name-s-nodes-without-.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)