[jira] [Commented] (OFBIZ-4949) Add a new attribute for entity-engine-xml tag, set-other-fields-to-null= true, if it exists at the beginning data file, all updates will set to null all fields not deta
[ https://issues.apache.org/jira/browse/OFBIZ-4949?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=13500140#comment-13500140 ] Scott Gray commented on OFBIZ-4949: --- UEL could be a good idea but it's a separate feature IMO, we already have the ability to set a field null by supplying an empty attribute value as I mentioned above. Maybe the issue here is larger than we think and the forest isn't being seen for the trees. The current mode of operation for data files is to perform a create-or-update operation for each record present. What is essentially being asked for here is a new operation mode of create-or-replace. How about if we were to find a way to support any possible operation mode? This could also solve the recurring problems that seem to appear with seed-initial data where we would want a create only operation with no update if the value exists. Possible operations: - create - create-update - create-replace - delete? If we were to go this route we'd just need to decide how the operation should be set for a given file or record, options coming to mind: 1. At the reader in the entity-engine.xml or ofbiz-component.xml files 2. As an attribute of the entity-engine-xml element 3. As child element of the entity-engine-xml element 4. As an attribute of the record element itself I think I'd prefer #2 or #3, probably #3 Thoughts? Add a new attribute for entity-engine-xml tag, set-other-fields-to-null= true, if it exists at the beginning data file, all updates will set to null all fields not detailed in the file Key: OFBIZ-4949 URL: https://issues.apache.org/jira/browse/OFBIZ-4949 Project: OFBiz Issue Type: Sub-task Components: framework Affects Versions: SVN trunk Reporter: Olivier Heintz Priority: Minor Attachments: OFBIZ-4949-NMA.patch, OFBIZ-4949.patch, OFBIZ-4949.patch, OFBIZ-4949.patch This enhancement is useful when a entity is load by reader (ex: seed) and sometime, it could be modify in data file. If a field is change from a value to null, currently this modification will not be done in the next load. For portletWidget, entity PortalPortal have a lot of field with potential default value, so sometime, first release use some field and when it's reviewed and corrected, some field are changed to null to use the default value (to follow best practice). This enhancement will be very useful for portletData file. -- This message is automatically generated by JIRA. If you think it was sent incorrectly, please contact your JIRA administrators For more information on JIRA, see: http://www.atlassian.com/software/jira
Re: New OFBiz webhelp - OFBIZ-4941
It's been all of 3 days since I asked you to wait for a thorough review, has that happened yet or will you just keep asking until no one can be bothered asking you to wait any longer? Patience is a virtue Jacques, the project has gone over 10 years without this feature and I don't think a few days/weeks/months will hurt any, especially considering the next release branch isn't due to be created for quite some time. Regards Scott On 19/11/2012, at 8:41 AM, Jacques Le Roux wrote: Hi, We (Tom and I) are ready to commit the new help (webhelp - OFBIZ-4941) in the content component where all work for us, and will be completed by Tom as he suggested. There are some trivial Birt issues which will dissapear when the process will be completed, see my last comment. Is it ok to commit as is and to improve later? Mostly we want to move webhelp outside of the content component in a new, to stay OOTB, specialpurpose webehlp component. Or do you want this addressed before? Note that if you want this addressed now we expect a rapid help from those who want that... Thanks Jacques
Re: svn commit: r1403870 - /ofbiz/branches/20120329_portletWidget/framework/entity/src/org/ofbiz/entit y/util/EntitySaxReader.java
excuse me for my late reply Thank you Jaccopo for review (I will check each point) and Paul to clarify the goal of the modification, it's exactly what I have tried to say. With portlet enhancement I propose, there are a lot field in PortalPortlet with a default value, so best practice is to use field only when something is specifics and so default value is not usable. Ex : formName with portletName as default value So the use case is : 1) first portlet release formName value is not empty 2) after review it's possible to use the portletName as formName, so correction of formName in Forms.xml and nullify formName field in PortalPortlet data file 3) after update correction will be ok only if loading the data file will nullify field in database. Second point, why have comitted on the portletWidget branch rather than trunk I have argue to Erwan than I was able to easily give use case for PortalPortlet and this modification is needed to multiple test of portletWidget. When I have write the Jira and answer to Paul (and no other remark after) I understand that this change does not generate a problem for someone, but perhaps lacked an real use-case. Le 18/11/2012 09:15, Jacques Le Roux a écrit : From: Paul Foxworthy p...@cohsoft.com.au Hi Jacques and Jacopo, Maybe set-absent-fields-to-null? Or even nullify-absent-fields? nullify-absent-fields: +1, this is where I see the difference with someone whose English is mother tongue ;) I think the idea behind the option is that when you are first importing new data, quite naturally all fields other than those specified in the file will be null. If, however, you're updating existing data, you might want any field not specified in the file to retain its current value, or you might want the contents of the file to specify everything about a record, in other words take this data and null out the rest. The alternative to set-other-fields-to-null (or whatever else we might call it) would be a huge number of attribute= in the file. I think, it's that indeed, thanks Paul to clarify Jacques Cheers Paul Foxworthy Jacques Le Roux wrote Just reviewed (thought Erwan followed our code formatting convention) I must say it's a matter to taste for variable names and formatting But I agree: * no underscore needed in front of variable name/s, * Formatting was done to aligne expressions I guess. This is no recommended by our (aging) conventions (based on an old Sun document, I think it's time to amend it a bit[1]) but I would not be a fundamentalist on this point: it does not make reading harder, even easier maybe... * I have no problem with set-other-fields-to-null but would use 'set-non-present-fields-to-null rather then (no pb if it's long, will be rarely used and then you get the point) Not sure I completly understand the Jira description (the requirement it seems) either. Jacques [1] I don't agree with all but, this article got some good points http://www.javacodegeeks.com/2012/10/java-coding-conventions-considered-harmful.html?utm_source=feedburnerutm_medium=twitterutm_campaign=Feed%3A+JavaCodeGeeks+%28Java+Code+Geeks%29 I would keep: 1. Line lenght (80 is ridiculous, it remembers me punched cards :D ) 2. variable names above comments 3. I agree on 6.3 placement Opinions? (sorry for sidetracking, I will create a thread if some are interested) - Original Message - From: Jacopo Cappellato lt; jacopo.cappellato@ gt; To: lt; dev@.apache gt; Sent: Saturday, November 17, 2012 11:56 AM Subject: Re: svn commit: r1403870 - /ofbiz/branches/20120329_portletWidget/framework/entity/src/org/ofbiz/entit y/util/EntitySaxReader.java Thank you Paul. After a cursory review I also see (in very few lines of the contribution): * bad formatting * a bad variable name (why _setOtherFieldsToNull rather than setOtherFieldsToNull) * I am also not sure I like the attribute name set-other-fields-to-null (that is btw better than put-other-fields-to-null) and last of all, frankly speaking, I don't understand the meaning of the description in Jira: This enhancement is useful when a entity is load by reader (ex: seed) and sometime, it could be modify in data file. If a field is change from a value to null, currently this modification will not be done in the next load. For portletWidget, entity PortalPortal have a lot of field with potential default value, so sometime, first release use some field and when it's reviewed and corrected, some field are changed to null to use the default value (to follow best practice). Kind regards, Jacopo On Nov 17, 2012, at 11:22 AM, Paul Foxworthy wrote: Hi all, I have no strong opinion on the change itself, which I suppose means I haven't had a use case that would need it. But the commit change description is misleading. In the Jira discussion for OFBIZ-4949 I proposed the name set-other-fields-to-null instead of put-other-field-to-null, and Olivier changed
Re: New OFBiz webhelp - OFBIZ-4941
Yes no problems. Depending on what you are starting from, you will need to add binaries files (from my last patch) or not (Tom's zips) but with zips you might get some issues, already blurred in my mind. Thanks Jacques From: Scott Gray scott.g...@hotwaxmedia.com It's been all of 3 days since I asked you to wait for a thorough review, has that happened yet or will you just keep asking until no one can be bothered asking you to wait any longer? Patience is a virtue Jacques, the project has gone over 10 years without this feature and I don't think a few days/weeks/months will hurt any, especially considering the next release branch isn't due to be created for quite some time. Regards Scott On 19/11/2012, at 8:41 AM, Jacques Le Roux wrote: Hi, We (Tom and I) are ready to commit the new help (webhelp - OFBIZ-4941) in the content component where all work for us, and will be completed by Tom as he suggested. There are some trivial Birt issues which will dissapear when the process will be completed, see my last comment. Is it ok to commit as is and to improve later? Mostly we want to move webhelp outside of the content component in a new, to stay OOTB, specialpurpose webehlp component. Or do you want this addressed before? Note that if you want this addressed now we expect a rapid help from those who want that... Thanks Jacques
[jira] [Commented] (OFBIZ-4949) Add a new attribute for entity-engine-xml tag, nullify-absent-fields
[ https://issues.apache.org/jira/browse/OFBIZ-4949?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=13500171#comment-13500171 ] Olivier Heintz commented on OFBIZ-4949: --- My preference is #2 or #3 delete should be useful for some specifics case like mass update prepared by end-user Add a new attribute for entity-engine-xml tag, nullify-absent-fields Key: OFBIZ-4949 URL: https://issues.apache.org/jira/browse/OFBIZ-4949 Project: OFBiz Issue Type: Sub-task Components: framework Affects Versions: SVN trunk Reporter: Olivier Heintz Priority: Minor Attachments: OFBIZ-4949-NMA.patch, OFBIZ-4949.patch, OFBIZ-4949.patch, OFBIZ-4949.patch This enhancement is useful when a entity is load by reader (ex: seed) and sometime, it could be modify in data file. If a field is change from a value to null, currently this modification will not be done in the next load. When you are first importing new data, quite naturally all fields other than those specified in the file will be null. If, however, you're updating existing data, you might want any field not specified in the file to retain its current value, or you might want the contents of the file to specify everything about a record, in other words take this data and null out the rest. The alternative to set-other-fields-to-null (or whatever else we might call it) would be a huge number of attribute= in the file. For portletWidget, entity PortalPortal have a lot of field with potential default value, so sometime, first release use some field and when it's reviewed and corrected, some field are changed to null to use the default value (to follow best practice). This enhancement will be very useful for portletData file. -- This message is automatically generated by JIRA. If you think it was sent incorrectly, please contact your JIRA administrators For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Commented] (OFBIZ-4949) Add a new attribute for entity-engine-xml tag, nullify-absent-fields
[ https://issues.apache.org/jira/browse/OFBIZ-4949?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=13500173#comment-13500173 ] Scott Gray commented on OFBIZ-4949: --- My main concern with #1 and #2 was decreased visibility to someone modifying the file which carries an increased risk of accidentally adding records under an inappropriate operation. #3 and #4 also carry the advantage of being able to perform multiple related operations within the same file. Add a new attribute for entity-engine-xml tag, nullify-absent-fields Key: OFBIZ-4949 URL: https://issues.apache.org/jira/browse/OFBIZ-4949 Project: OFBiz Issue Type: Sub-task Components: framework Affects Versions: SVN trunk Reporter: Olivier Heintz Priority: Minor Attachments: OFBIZ-4949-NMA.patch, OFBIZ-4949.patch, OFBIZ-4949.patch, OFBIZ-4949.patch This enhancement is useful when a entity is load by reader (ex: seed) and sometime, it could be modify in data file. If a field is change from a value to null, currently this modification will not be done in the next load. When you are first importing new data, quite naturally all fields other than those specified in the file will be null. If, however, you're updating existing data, you might want any field not specified in the file to retain its current value, or you might want the contents of the file to specify everything about a record, in other words take this data and null out the rest. The alternative to set-other-fields-to-null (or whatever else we might call it) would be a huge number of attribute= in the file. For portletWidget, entity PortalPortal have a lot of field with potential default value, so sometime, first release use some field and when it's reviewed and corrected, some field are changed to null to use the default value (to follow best practice). This enhancement will be very useful for portletData file. -- This message is automatically generated by JIRA. If you think it was sent incorrectly, please contact your JIRA administrators For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Created] (OFBIZ-5076) Manufacturing language help data: Wrong reference path to DTD
Carsten Schinzer created OFBIZ-5076: --- Summary: Manufacturing language help data: Wrong reference path to DTD Key: OFBIZ-5076 URL: https://issues.apache.org/jira/browse/OFBIZ-5076 Project: OFBiz Issue Type: Bug Components: manufacturing Affects Versions: SVN trunk Environment: independant (XML documentation) Reporter: Carsten Schinzer Priority: Trivial Fix For: SVN trunk The reference path to the DocType Definition is too short by one relative path, ie. one ../ is missing. I noticed this in my customer working copy and need to review this for trunk when I am back to my development machine. This currently prohibits proper validation of the XML files as the doctype reference points to a wrong location in the project path. -- This message is automatically generated by JIRA. If you think it was sent incorrectly, please contact your JIRA administrators For more information on JIRA, see: http://www.atlassian.com/software/jira
Re: svn commit: r1032472 - in /ofbiz/trunk/framework: birt/src/org/ofbiz/birt/ birt/src/org/ofbiz/birt/email/ birt/src/org/ofbiz/birt/report/servlet/ birt/src/org/ofbiz/birt/webapp/view/ catalina/src/
Hi Hans, Chattree, I have a question about the changes to ContextFilter.java in this commit related to the selection of the Tenant record matching the domainname: does it mean that if a matching record is found then the tenant selected by the user at login is automatically overridden? Is this the intended behavior? Thanks, Jacopo On Nov 8, 2010, at 7:54 AM, hans...@apache.org wrote: Author: hansbak Date: Mon Nov 8 06:54:17 2010 New Revision: 1032472 URL: http://svn.apache.org/viewvc?rev=1032472view=rev Log: next to setting of the tenent id, now also the initial mountpoint if entered also refactoring: - set delegator, dispatcher and security from session, servlet context or request's attribute to app context of birt engine before render and send email - add the initialPath field to Tenant entity - create the tenant context which as a default servlet using org.ofbiz.webapp.control.TenantServlet in the catalina container and check the multitenant property for initial the tenant context with root mount / - move the changing a multi tenant delegator statement from ControlServlet to ContextFilter that could apply to every servlets (implementation by Chattree Richard) Added: ofbiz/trunk/framework/webapp/src/org/ofbiz/webapp/control/TenantServlet.java Modified: ofbiz/trunk/framework/birt/src/org/ofbiz/birt/BirtWorker.java ofbiz/trunk/framework/birt/src/org/ofbiz/birt/email/BirtEmailServices.java ofbiz/trunk/framework/birt/src/org/ofbiz/birt/report/servlet/BirtEngineServlet.java ofbiz/trunk/framework/birt/src/org/ofbiz/birt/report/servlet/BirtViewerServlet.java ofbiz/trunk/framework/birt/src/org/ofbiz/birt/webapp/view/BirtViewHandler.java ofbiz/trunk/framework/catalina/src/org/ofbiz/catalina/container/CatalinaContainer.java ofbiz/trunk/framework/common/webcommon/login.ftl ofbiz/trunk/framework/entity/entitydef/entitymodel.xml ofbiz/trunk/framework/webapp/src/org/ofbiz/webapp/control/ContextFilter.java ofbiz/trunk/framework/webapp/src/org/ofbiz/webapp/control/ControlServlet.java Modified: ofbiz/trunk/framework/birt/src/org/ofbiz/birt/BirtWorker.java URL: http://svn.apache.org/viewvc/ofbiz/trunk/framework/birt/src/org/ofbiz/birt/BirtWorker.java?rev=1032472r1=1032471r2=1032472view=diff == --- ofbiz/trunk/framework/birt/src/org/ofbiz/birt/BirtWorker.java (original) +++ ofbiz/trunk/framework/birt/src/org/ofbiz/birt/BirtWorker.java Mon Nov 8 06:54:17 2010 @@ -23,6 +23,11 @@ import java.sql.SQLException; import java.util.Locale; import java.util.Map; +import javax.servlet.ServletContext; +import javax.servlet.http.HttpServletRequest; +import javax.servlet.http.HttpServletResponse; +import javax.servlet.http.HttpSession; + import org.eclipse.birt.report.engine.api.EXCELRenderOption; import org.eclipse.birt.report.engine.api.EngineException; import org.eclipse.birt.report.engine.api.HTMLRenderOption; @@ -36,7 +41,11 @@ import org.eclipse.birt.report.engine.ap import org.ofbiz.base.util.Debug; import org.ofbiz.base.util.GeneralException; import org.ofbiz.base.util.UtilGenerics; +import org.ofbiz.base.util.UtilValidate; import org.ofbiz.birt.container.BirtContainer; +import org.ofbiz.entity.Delegator; +import org.ofbiz.security.Security; +import org.ofbiz.service.LocalDispatcher; public class BirtWorker { @@ -138,4 +147,45 @@ public class BirtWorker { task.run(); task.close(); } + +public static void setWebContextObjects(IReportEngine engine, HttpServletRequest request, HttpServletResponse response) { +HttpSession session = request.getSession(); +ServletContext servletContext = session.getServletContext(); + +// set delegator +Delegator delegator = (Delegator) session.getAttribute(delegator); +if (UtilValidate.isEmpty(delegator)) { +delegator = (Delegator) servletContext.getAttribute(delegator); +} +if (UtilValidate.isEmpty(delegator)) { +delegator = (Delegator) request.getAttribute(delegator); +} +if (UtilValidate.isNotEmpty(delegator)) { +engine.getConfig().getAppContext().put(delegator, delegator); +} + +// set delegator +LocalDispatcher dispatcher = (LocalDispatcher) session.getAttribute(dispatcher); +if (UtilValidate.isEmpty(dispatcher)) { +dispatcher = (LocalDispatcher) servletContext.getAttribute(dispatcher); +} +if (UtilValidate.isEmpty(dispatcher)) { +dispatcher = (LocalDispatcher) request.getAttribute(dispatcher); +} +if (UtilValidate.isNotEmpty(dispatcher)) { +engine.getConfig().getAppContext().put(dispatcher, dispatcher); +} + +// set security +Security security = (Security)
Re: svn commit: r1032472 - in /ofbiz/trunk/framework: birt/src/org/ofbiz/birt/ birt/src/org/ofbiz/birt/email/ birt/src/org/ofbiz/birt/report/servlet/ birt/src/org/ofbiz/birt/webapp/view/ catalina/src/
Hi Jacopo, when a request for a certain domain name comes in the tenant is selected and the login screen without tenant input field is shown when login is required. Otherwise the login screen is skipped. A problem here is that only a single domain name can be specified, Here locally we already extended that and we should commit that...but it is an entity change which probably need a lot of discussion. Regards, Hans On 11/19/2012 08:31 PM, Jacopo Cappellato wrote: Hi Hans, Chattree, I have a question about the changes to ContextFilter.java in this commit related to the selection of the Tenant record matching the domainname: does it mean that if a matching record is found then the tenant selected by the user at login is automatically overridden? Is this the intended behavior? Thanks, Jacopo On Nov 8, 2010, at 7:54 AM, hans...@apache.org wrote: Author: hansbak Date: Mon Nov 8 06:54:17 2010 New Revision: 1032472 URL: http://svn.apache.org/viewvc?rev=1032472view=rev Log: next to setting of the tenent id, now also the initial mountpoint if entered also refactoring: - set delegator, dispatcher and security from session, servlet context or request's attribute to app context of birt engine before render and send email - add the initialPath field to Tenant entity - create the tenant context which as a default servlet using org.ofbiz.webapp.control.TenantServlet in the catalina container and check the multitenant property for initial the tenant context with root mount / - move the changing a multi tenant delegator statement from ControlServlet to ContextFilter that could apply to every servlets (implementation by Chattree Richard) Added: ofbiz/trunk/framework/webapp/src/org/ofbiz/webapp/control/TenantServlet.java Modified: ofbiz/trunk/framework/birt/src/org/ofbiz/birt/BirtWorker.java ofbiz/trunk/framework/birt/src/org/ofbiz/birt/email/BirtEmailServices.java ofbiz/trunk/framework/birt/src/org/ofbiz/birt/report/servlet/BirtEngineServlet.java ofbiz/trunk/framework/birt/src/org/ofbiz/birt/report/servlet/BirtViewerServlet.java ofbiz/trunk/framework/birt/src/org/ofbiz/birt/webapp/view/BirtViewHandler.java ofbiz/trunk/framework/catalina/src/org/ofbiz/catalina/container/CatalinaContainer.java ofbiz/trunk/framework/common/webcommon/login.ftl ofbiz/trunk/framework/entity/entitydef/entitymodel.xml ofbiz/trunk/framework/webapp/src/org/ofbiz/webapp/control/ContextFilter.java ofbiz/trunk/framework/webapp/src/org/ofbiz/webapp/control/ControlServlet.java Modified: ofbiz/trunk/framework/birt/src/org/ofbiz/birt/BirtWorker.java URL: http://svn.apache.org/viewvc/ofbiz/trunk/framework/birt/src/org/ofbiz/birt/BirtWorker.java?rev=1032472r1=1032471r2=1032472view=diff == --- ofbiz/trunk/framework/birt/src/org/ofbiz/birt/BirtWorker.java (original) +++ ofbiz/trunk/framework/birt/src/org/ofbiz/birt/BirtWorker.java Mon Nov 8 06:54:17 2010 @@ -23,6 +23,11 @@ import java.sql.SQLException; import java.util.Locale; import java.util.Map; +import javax.servlet.ServletContext; +import javax.servlet.http.HttpServletRequest; +import javax.servlet.http.HttpServletResponse; +import javax.servlet.http.HttpSession; + import org.eclipse.birt.report.engine.api.EXCELRenderOption; import org.eclipse.birt.report.engine.api.EngineException; import org.eclipse.birt.report.engine.api.HTMLRenderOption; @@ -36,7 +41,11 @@ import org.eclipse.birt.report.engine.ap import org.ofbiz.base.util.Debug; import org.ofbiz.base.util.GeneralException; import org.ofbiz.base.util.UtilGenerics; +import org.ofbiz.base.util.UtilValidate; import org.ofbiz.birt.container.BirtContainer; +import org.ofbiz.entity.Delegator; +import org.ofbiz.security.Security; +import org.ofbiz.service.LocalDispatcher; public class BirtWorker { @@ -138,4 +147,45 @@ public class BirtWorker { task.run(); task.close(); } + +public static void setWebContextObjects(IReportEngine engine, HttpServletRequest request, HttpServletResponse response) { +HttpSession session = request.getSession(); +ServletContext servletContext = session.getServletContext(); + +// set delegator +Delegator delegator = (Delegator) session.getAttribute(delegator); +if (UtilValidate.isEmpty(delegator)) { +delegator = (Delegator) servletContext.getAttribute(delegator); +} +if (UtilValidate.isEmpty(delegator)) { +delegator = (Delegator) request.getAttribute(delegator); +} +if (UtilValidate.isNotEmpty(delegator)) { +engine.getConfig().getAppContext().put(delegator, delegator); +} + +// set delegator +LocalDispatcher dispatcher = (LocalDispatcher) session.getAttribute(dispatcher); +if (UtilValidate.isEmpty(dispatcher)) { +dispatcher = (LocalDispatcher) servletContext.getAttribute(dispatcher); +
Re: svn commit: r1032472 - in /ofbiz/trunk/framework: birt/src/org/ofbiz/birt/ birt/src/org/ofbiz/birt/email/ birt/src/org/ofbiz/birt/report/servlet/ birt/src/org/ofbiz/birt/webapp/view/ catalina/src/
Thank you Hans, please see inline: On Nov 19, 2012, at 3:22 PM, Hans Bakker wrote: Hi Jacopo, when a request for a certain domain name comes in the tenant is selected and the login screen without tenant input field is shown when login is required. Otherwise the login screen is skipped. Ok, I think it is inline with my understanding after my review of the code; so we have two independent mechanisms to select a tenant for the logged in user: * by domain name: the tenant is selected automatically based on the URL of the server * selection by the user at login: the user selects a tenant entering its name in the login screen A problem here is that only a single domain name can be specified, Do you mean a single domain per tenant, right? Otherwise I don't see how this feature could be of any use... Thanks, Jacopo Here locally we already extended that and we should commit that...but it is an entity change which probably need a lot of discussion. Regards, Hans On 11/19/2012 08:31 PM, Jacopo Cappellato wrote: Hi Hans, Chattree, I have a question about the changes to ContextFilter.java in this commit related to the selection of the Tenant record matching the domainname: does it mean that if a matching record is found then the tenant selected by the user at login is automatically overridden? Is this the intended behavior? Thanks, Jacopo On Nov 8, 2010, at 7:54 AM, hans...@apache.org wrote: Author: hansbak Date: Mon Nov 8 06:54:17 2010 New Revision: 1032472 URL: http://svn.apache.org/viewvc?rev=1032472view=rev Log: next to setting of the tenent id, now also the initial mountpoint if entered also refactoring: - set delegator, dispatcher and security from session, servlet context or request's attribute to app context of birt engine before render and send email - add the initialPath field to Tenant entity - create the tenant context which as a default servlet using org.ofbiz.webapp.control.TenantServlet in the catalina container and check the multitenant property for initial the tenant context with root mount / - move the changing a multi tenant delegator statement from ControlServlet to ContextFilter that could apply to every servlets (implementation by Chattree Richard) Added: ofbiz/trunk/framework/webapp/src/org/ofbiz/webapp/control/TenantServlet.java Modified: ofbiz/trunk/framework/birt/src/org/ofbiz/birt/BirtWorker.java ofbiz/trunk/framework/birt/src/org/ofbiz/birt/email/BirtEmailServices.java ofbiz/trunk/framework/birt/src/org/ofbiz/birt/report/servlet/BirtEngineServlet.java ofbiz/trunk/framework/birt/src/org/ofbiz/birt/report/servlet/BirtViewerServlet.java ofbiz/trunk/framework/birt/src/org/ofbiz/birt/webapp/view/BirtViewHandler.java ofbiz/trunk/framework/catalina/src/org/ofbiz/catalina/container/CatalinaContainer.java ofbiz/trunk/framework/common/webcommon/login.ftl ofbiz/trunk/framework/entity/entitydef/entitymodel.xml ofbiz/trunk/framework/webapp/src/org/ofbiz/webapp/control/ContextFilter.java ofbiz/trunk/framework/webapp/src/org/ofbiz/webapp/control/ControlServlet.java Modified: ofbiz/trunk/framework/birt/src/org/ofbiz/birt/BirtWorker.java URL: http://svn.apache.org/viewvc/ofbiz/trunk/framework/birt/src/org/ofbiz/birt/BirtWorker.java?rev=1032472r1=1032471r2=1032472view=diff == --- ofbiz/trunk/framework/birt/src/org/ofbiz/birt/BirtWorker.java (original) +++ ofbiz/trunk/framework/birt/src/org/ofbiz/birt/BirtWorker.java Mon Nov 8 06:54:17 2010 @@ -23,6 +23,11 @@ import java.sql.SQLException; import java.util.Locale; import java.util.Map; +import javax.servlet.ServletContext; +import javax.servlet.http.HttpServletRequest; +import javax.servlet.http.HttpServletResponse; +import javax.servlet.http.HttpSession; + import org.eclipse.birt.report.engine.api.EXCELRenderOption; import org.eclipse.birt.report.engine.api.EngineException; import org.eclipse.birt.report.engine.api.HTMLRenderOption; @@ -36,7 +41,11 @@ import org.eclipse.birt.report.engine.ap import org.ofbiz.base.util.Debug; import org.ofbiz.base.util.GeneralException; import org.ofbiz.base.util.UtilGenerics; +import org.ofbiz.base.util.UtilValidate; import org.ofbiz.birt.container.BirtContainer; +import org.ofbiz.entity.Delegator; +import org.ofbiz.security.Security; +import org.ofbiz.service.LocalDispatcher; public class BirtWorker { @@ -138,4 +147,45 @@ public class BirtWorker { task.run(); task.close(); } + +public static void setWebContextObjects(IReportEngine engine, HttpServletRequest request, HttpServletResponse response) { +HttpSession session = request.getSession(); +ServletContext servletContext = session.getServletContext(); + +// set delegator +Delegator delegator = (Delegator) session.getAttribute(delegator); +
[jira] [Commented] (OFBIZ-5072) Tenant authentication problem
[ https://issues.apache.org/jira/browse/OFBIZ-5072?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=13500304#comment-13500304 ] Jacopo Cappellato commented on OFBIZ-5072: -- Thanks Rene, a slightly different version of your patch is now committed to trunk with rev. 1411196 and to release 12.04 with rev. 1411245 I hope I will find some more time to review the multi tenant code and improve some of its parts but for now this change should be enough. Tenant authentication problem - Key: OFBIZ-5072 URL: https://issues.apache.org/jira/browse/OFBIZ-5072 Project: OFBiz Issue Type: Bug Components: framework Affects Versions: Release Branch 12.04 Reporter: Rene Frauli Assignee: Jacopo Cappellato Fix For: SVN trunk, Release Branch 12.04 Attachments: LoginWorker.java.patch In 12.04 the LoginWorker method setWebContextObjects object doesn't store the delegator, dispatcher, security and the authz in the session only in the request. The effect is that the session for the tenant is not correct and the tenant cannot be used at all with strange effects. For e.g. data are stored with the default delegator. -- This message is automatically generated by JIRA. If you think it was sent incorrectly, please contact your JIRA administrators For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Closed] (OFBIZ-5072) Tenant authentication problem
[ https://issues.apache.org/jira/browse/OFBIZ-5072?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Jacopo Cappellato closed OFBIZ-5072. Tenant authentication problem - Key: OFBIZ-5072 URL: https://issues.apache.org/jira/browse/OFBIZ-5072 Project: OFBiz Issue Type: Bug Components: framework Affects Versions: Release Branch 12.04 Reporter: Rene Frauli Assignee: Jacopo Cappellato Fix For: SVN trunk, Release Branch 12.04 Attachments: LoginWorker.java.patch In 12.04 the LoginWorker method setWebContextObjects object doesn't store the delegator, dispatcher, security and the authz in the session only in the request. The effect is that the session for the tenant is not correct and the tenant cannot be used at all with strange effects. For e.g. data are stored with the default delegator. -- This message is automatically generated by JIRA. If you think it was sent incorrectly, please contact your JIRA administrators For more information on JIRA, see: http://www.atlassian.com/software/jira
buildbot success in ASF Buildbot on ofbiz-branch12
The Buildbot has detected a restored build on builder ofbiz-branch12 while building ASF Buildbot. Full details are available at: http://ci.apache.org/builders/ofbiz-branch12/builds/34 Buildbot URL: http://ci.apache.org/ Buildslave for this Build: portunus_ubuntu Build Reason: scheduler Build Source Stamp: [branch ofbiz/branches/release12.04] 1411245 Blamelist: jacopoc Build succeeded! sincerely, -The Buildbot
[jira] [Created] (OFBIZ-5077) apache-ofbiz-getting-started wiki page migration to static
Olivier Heintz created OFBIZ-5077: - Summary: apache-ofbiz-getting-started wiki page migration to static Key: OFBIZ-5077 URL: https://issues.apache.org/jira/browse/OFBIZ-5077 Project: OFBiz Issue Type: Improvement Reporter: Olivier Heintz Priority: Minor Migration done by creating the new page by copy-paste from index.html and change main content. I have choose to use the sidebar to not have link to mailing list or source repository in the main content. I have remove in the sidebar the DemoSites part to avoid update maintenance each time a new release is published. For the link at the beginning for the ofbiz-getting-started page, I have tried to show clearly it's link to the wiki site. Say me if yes or not. -- This message is automatically generated by JIRA. If you think it was sent incorrectly, please contact your JIRA administrators For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Updated] (OFBIZ-5077) apache-ofbiz-getting-started wiki page migration to static
[ https://issues.apache.org/jira/browse/OFBIZ-5077?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Olivier Heintz updated OFBIZ-5077: -- Attachment: OFBIZ-5077.patch apache-ofbiz-getting-started.html apache-ofbiz-getting-started wiki page migration to static -- Key: OFBIZ-5077 URL: https://issues.apache.org/jira/browse/OFBIZ-5077 Project: OFBiz Issue Type: Improvement Reporter: Olivier Heintz Priority: Minor Attachments: apache-ofbiz-getting-started.html, OFBIZ-5077.patch Migration done by creating the new page by copy-paste from index.html and change main content. I have choose to use the sidebar to not have link to mailing list or source repository in the main content. I have remove in the sidebar the DemoSites part to avoid update maintenance each time a new release is published. For the link at the beginning for the ofbiz-getting-started page, I have tried to show clearly it's link to the wiki site. Say me if yes or not. -- This message is automatically generated by JIRA. If you think it was sent incorrectly, please contact your JIRA administrators For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Assigned] (OFBIZ-5077) apache-ofbiz-getting-started wiki page migration to static
[ https://issues.apache.org/jira/browse/OFBIZ-5077?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Jacopo Cappellato reassigned OFBIZ-5077: Assignee: Jacopo Cappellato apache-ofbiz-getting-started wiki page migration to static -- Key: OFBIZ-5077 URL: https://issues.apache.org/jira/browse/OFBIZ-5077 Project: OFBiz Issue Type: Improvement Reporter: Olivier Heintz Assignee: Jacopo Cappellato Priority: Minor Attachments: apache-ofbiz-getting-started.html, OFBIZ-5077.patch Migration done by creating the new page by copy-paste from index.html and change main content. I have choose to use the sidebar to not have link to mailing list or source repository in the main content. I have remove in the sidebar the DemoSites part to avoid update maintenance each time a new release is published. For the link at the beginning for the ofbiz-getting-started page, I have tried to show clearly it's link to the wiki site. Say me if yes or not. -- This message is automatically generated by JIRA. If you think it was sent incorrectly, please contact your JIRA administrators For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Commented] (OFBIZ-5077) apache-ofbiz-getting-started wiki page migration to static
[ https://issues.apache.org/jira/browse/OFBIZ-5077?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=13500473#comment-13500473 ] Jacopo Cappellato commented on OFBIZ-5077: -- Thank you, Olivier. I would rather remove the sidebar for now from all the pages except the main one (index.html); the site will be easier to maintain (especially in this transition phase): but I will take care of this small change (together with some other editing I ma doing to the site) when I will commit your work. apache-ofbiz-getting-started wiki page migration to static -- Key: OFBIZ-5077 URL: https://issues.apache.org/jira/browse/OFBIZ-5077 Project: OFBiz Issue Type: Improvement Reporter: Olivier Heintz Assignee: Jacopo Cappellato Priority: Minor Attachments: apache-ofbiz-getting-started.html, OFBIZ-5077.patch Migration done by creating the new page by copy-paste from index.html and change main content. I have choose to use the sidebar to not have link to mailing list or source repository in the main content. I have remove in the sidebar the DemoSites part to avoid update maintenance each time a new release is published. For the link at the beginning for the ofbiz-getting-started page, I have tried to show clearly it's link to the wiki site. Say me if yes or not. -- This message is automatically generated by JIRA. If you think it was sent incorrectly, please contact your JIRA administrators For more information on JIRA, see: http://www.atlassian.com/software/jira
Re: portletWidget branch review
Le 17/11/2012 07:54, Jacopo Cappellato a écrit : Erwan, could you please explain why this patch was committed to the portletWidget branch? There were some objections in Jira and in general there was no general approval for the inclusion. Also, it was a patch for the trunk, not the branch. This is not the way to go, the branch is not the playground of one committer and we cannot use it as an easy way (a lot of traffic, less reviews from committers) to see the code we like committed to trunk. If this is the general trend, I am tempted to say that the experiment of branches (mostly) used by one committer is failing: branches make sense only if a relevant part of the committer group is working on new stuff, not just one. Since this branch was created we tried to operate only by Jira to give visibility to each update and to detail each modification (to help more committer to be involve in the branch review) . It's true that I forgot to link this Jira to portletWidget when I argue him to integrated it. If an other ways exist to propose a modification and having committer involve in review, give me the point to do. I and Erwan, we have tried to simplify committers review and to do a lot of tests and present a completely finished realization. I don't say we have done no mistake, but we have tried to add maximum of visiblity or help : In portletWidget there are some framework enhancement expose in mailing-list before and for each main point: - a use case in example, and sometime one in Party - developer help is written to explain how to use and what is the best practice It's not easy to maintain branch update and need some review or test, for most of correction after merge we have tried to give clear commit comment. I understand it's not easy to do contributor review, but you should trust in the efforts being made to meet your requests to have a better ofbiz. Please, do not forget, contributors have also (like commiter or PMC) to manage ofbiz bugs on day to day, and so, want a better ofbiz project. Olivier a contributor trying to help community for - better contributions - better ways to contribute Kind regards, Jacopo PS: a message to all: since I am not going to review each and every commit done on this branch, I am going to vote -1 to the merging of the portletWidget branch with the trunk until I will get enough guarantees from the people that worked on it that the changes will be only related to the original purpose of the branch. On Oct 30, 2012, at 10:10 PM, er...@apache.org wrote:
Re: svn commit: r1032472 - in /ofbiz/trunk/framework: birt/src/org/ofbiz/birt/ birt/src/org/ofbiz/birt/email/ birt/src/org/ofbiz/birt/report/servlet/ birt/src/org/ofbiz/birt/webapp/view/ catalina/src/
On 11/19/2012 09:53 PM, Jacopo Cappellato wrote: Thank you Hans, please see inline: On Nov 19, 2012, at 3:22 PM, Hans Bakker wrote: A problem here is that only a single domain name can be specified, Do you mean a single domain per tenant, right? Otherwise I don't see how this feature could be of any use... yes only a single domain per tenant which is a problem if you want to have different domainnames for frontend and backend and/or want to operate more than a single domainname in a single tenant.
[jira] [Commented] (OFBIZ-5075) Ofibz search Engine Bug
[ https://issues.apache.org/jira/browse/OFBIZ-5075?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=13500868#comment-13500868 ] Odai Jawasreh commented on OFBIZ-5075: -- after test i found there is no error Ofibz search Engine Bug --- Key: OFBIZ-5075 URL: https://issues.apache.org/jira/browse/OFBIZ-5075 Project: OFBiz Issue Type: Bug Components: ALL COMPONENTS Environment: All Environment JDK 1.6.0 and windows,ubuntu, centos and other Reporter: Odai Jawasreh Original Estimate: 1h Remaining Estimate: 1h this is an example screen about this bug if we go to the search screen about the invoice https://demo-stable.ofbiz.apache.org:8443/accounting/control/findInvoices and if we want to search about the date range for the invoice date field then no result will appear since we enter the search value between two dates that actully have invoices. i notice that the search service inisde the ofbiz not work when ever we use range search for dates. -- This message is automatically generated by JIRA. If you think it was sent incorrectly, please contact your JIRA administrators For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Resolved] (OFBIZ-5075) Ofibz search Engine Bug
[ https://issues.apache.org/jira/browse/OFBIZ-5075?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Odai Jawasreh resolved OFBIZ-5075. -- Resolution: Not A Problem no problem found in the search service Ofibz search Engine Bug --- Key: OFBIZ-5075 URL: https://issues.apache.org/jira/browse/OFBIZ-5075 Project: OFBiz Issue Type: Bug Components: ALL COMPONENTS Environment: All Environment JDK 1.6.0 and windows,ubuntu, centos and other Reporter: Odai Jawasreh Original Estimate: 1h Remaining Estimate: 1h this is an example screen about this bug if we go to the search screen about the invoice https://demo-stable.ofbiz.apache.org:8443/accounting/control/findInvoices and if we want to search about the date range for the invoice date field then no result will appear since we enter the search value between two dates that actully have invoices. i notice that the search service inisde the ofbiz not work when ever we use range search for dates. -- This message is automatically generated by JIRA. If you think it was sent incorrectly, please contact your JIRA administrators For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Closed] (OFBIZ-5075) Ofibz search Engine Bug
[ https://issues.apache.org/jira/browse/OFBIZ-5075?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Odai Jawasreh closed OFBIZ-5075. no problem found Ofibz search Engine Bug --- Key: OFBIZ-5075 URL: https://issues.apache.org/jira/browse/OFBIZ-5075 Project: OFBiz Issue Type: Bug Components: ALL COMPONENTS Environment: All Environment JDK 1.6.0 and windows,ubuntu, centos and other Reporter: Odai Jawasreh Original Estimate: 1h Remaining Estimate: 1h this is an example screen about this bug if we go to the search screen about the invoice https://demo-stable.ofbiz.apache.org:8443/accounting/control/findInvoices and if we want to search about the date range for the invoice date field then no result will appear since we enter the search value between two dates that actully have invoices. i notice that the search service inisde the ofbiz not work when ever we use range search for dates. -- This message is automatically generated by JIRA. If you think it was sent incorrectly, please contact your JIRA administrators For more information on JIRA, see: http://www.atlassian.com/software/jira