[ https://issues.apache.org/jira/browse/OFBIZ-9230?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15900105#comment-15900105 ] Jacques Le Roux edited comment on OFBIZ-9230 at 3/7/17 8:35 PM: ---------------------------------------------------------------- Hi Rishi, bq. I think (also checked in the code) that we will always have the delegator name in the session which actually point to the current tenant (refer ControlServlet.java line160 and LoginWorker.java line530). Actually I think we also always have the delegator in the context. bq. I guess in the template/FTL context or in the screen context whenever we get the delegator as null we can use this delegatorName first from session and if it is empty then we could try to use default delegator. IMO, this should fix the problem if in the context we don't have the delegator but we have the delegatroName in the session. Actually in the template/FTL context or in the screen context when we have the delegatorName we have also the delegator. The problem we face here is when executing a macro in the widget form the context and session are always null. But I could use your idea of the delegatorName and decided to pass it to the macro. I had though to create an EntityUtilProperties.getPropertyValueFromDelegatorName() method to eventually pass the delegatorName. Two macros were concerned renderLookupField (reported here) and renderTextField. It's fixed in trunk r1785882 If nobody beats me on it, I'll backport later... was (Author: jacques.le.roux): Hi Rishi, bq. I think (also checked in the code) that we will always have the delegator name in the session which actually point to the current tenant (refer ControlServlet.java line160 and LoginWorker.java line530). Actully I think we also always have the delegator in the context. bq. I guess in the template/FTL context or in the screen context whenever we get the delegator as null we can use this delegatorName first from session and if it is empty then we could try to use default delegator. IMO, this should fix the problem if in the context we don't have the delegator but we have the delegatroName in the session. Actually in the template/FTL context or in the screen context when we have the delegatorName we have also the delegator. The problem we face here is when executing a macro in the widget form the context and session are always null. But I could use your idea of the delegatorName and decide to pass it to the macro. I had though to create an EntityUtilProperties.getPropertyValueFromDelegatorName() method to eventually pass the delegatorName. Two macros were concerned renderLookupField (reported here) and renderTextField. It's fixed in trunk r1785882 If nobody beats me on it, I'll backport later... > Missing reference to the delegator in framework/widget/templates/HtmlFormMacroLibrary.ftl > ----------------------------------------------------------------------------------------- > > Key: OFBIZ-9230 > URL: https://issues.apache.org/jira/browse/OFBIZ-9230 > Project: OFBiz > Issue Type: Bug > Components: ALL COMPONENTS > Affects Versions: Trunk > Reporter: Wei Zhang > Assignee: Jacques Le Roux > Priority: Minor > Fix For: Upcoming Release > > Attachments: OFBIZ-9230.patch > > > To reproduce > 1. Load test data <SystemProperty systemResourceId="widget" systemPropertyId="widget.autocompleter.defaultMinLength" systemPropertyValue="3"/> > 2. Open https://localhost:8443/partymgr/control/main > 3. You will still get warning below in log file > {quote} > 2017-02-24 12:56:16,348 |http-nio-8443-exec-7 |EntityUtilProperties |I| Could not get a system property for widget.autocompleter.defaultMinLength : null > {quote} -- This message was sent by Atlassian JIRA (v6.3.15#6346) |
Free forum by Nabble | Edit this page |