Thanks Martin & Dimitri for your effort.
Orig. Msg.:
The Perl5Matcher Perl5Compiler are not thread safe, as mentioned in their documentation: http://jakarta.apache.org/oro/api/org/apache/oro/text/regex/Perl5Compiler.html
A separate instance should be used per thread.
The concrete issue occurred in our system in the createCommContentDataResource service. The service tries to save emails to the database after they have been sent. It failed because of the described issue. This caused the whole email service (sendMailFromScreen) to be rescheduled. So customers got emails twice.
The Perl5Matcher and Perl5Compiler instances are assigned to static fields in the org.ofbiz.minilang.method.ifops.IfRegexp class. So every thread will use the same instance. No synchronization is done currently. Changing the fields to be non-static will not work either, as SimpleMethods are cached. So all calls to the same simple method use the same IfRegexp instance.
We fixed the problem by moving the instantiation of the Perl5Matcher and Perl5Compiler to the exec() method in IfRegexp.
Other classes are most likely affected, too: org.ofbiz.entity.condition.EntityComparisonOperator, org.ofbiz.minilang.method.conditional.RegexpCondition, org.ofbiz.minilang.operation.Regexp, org.ofbiz.widget.menu.ModelMenuCondition$IfRegexp, org.ofbiz.widget.screen.ModelScreenCondition$IfRegexp, org.ofbiz.widget.tree.ModelTreeCondition$IfRegexp
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1075322 13f79535-47bb-0310-9956-ffa450edef68
I created a new Screen <link feature. Similar to the Form Lookups a link can be opened in a layered JS Box (see Screenshot in Jira Task). It looks nice and is helpful in some cases.
You can add any screen u want. It's expected that you create a certain screen for the layered link which only contains the information you need.
The layered box doesn't contain any logic it's just a container for the screen which should be opened. So the screen it self can decide what to show. i.e if you load a form, the form itself implement the way how it react on a submit (either reload the site or perform the submit as Ajax request in the background).
There is also an example in the example section. Try to create a new Example on the mainpage.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1071698 13f79535-47bb-0310-9956-ffa450edef68
Orig. Msg:
The DateTimePicker calculates nearly always in 5m steps and rounds up or down, depending on the nearest result. This means, that you have at 14:11:10 and at 14:12:10 a time of 14:10:10 in the DTP and at 14:13:10 and 14:14:10 already 14:15:10 (so on the one hand you have a "current" time that shows in the future and on the other hand the same time 5 times in the DTP (while the mins. dont increase, the seconds do).
comment to the nearly always: i had exactly one case, where i had xx:01:xx, and i cant recreate it...
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1071328 13f79535-47bb-0310-9956-ffa450edef68
As xsd describes, "target-parameter" of a lookup field can be used to transfer extra parameters to lookup something. But if we choose "layer" mode (the default mode of lookup), this attribute does nothing. It works before jQuery introduced. I guess this feature is forgot by mistake during migration.
JLR: Nice catch! Actually IIRW it's because this has been introduced in trunk after we migrated this part in the jQuery branch and it passed "hidden" when I merged the trunk in branch.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1062709 13f79535-47bb-0310-9956-ffa450edef68
Fix using TagLib in freemarker follow this.
1. In ControlServlet.java, create ServletContextHashModel instance and set to request's attritube
2. In ScreenRenderer.java, set ServletContextHashModel instance from request's attribute to context name Application and set HttpRequestHashModel instance from requestAttributes in context to context name Request
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1061310 13f79535-47bb-0310-9956-ffa450edef68
By adding id attribute in the <a> tag then its helpful for developers to perform action on it using js or css.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1060229 13f79535-47bb-0310-9956-ffa450edef68
Fixes some bugs in CMS introduced in svn r1036195 when migrating from dojo to jQuery:
* reverted accidental logic change in callDocument() that broke the "new ..." context menu items
* making elRTE "save" toolbar button work: same behavior as the regular "Save" button
* using regular form submit instead of ajax for new content for now
o ajaxSubmitForm() can't handle new content, it won't reload the form because it doesn't know the new contentId
+ some controller changes would probably be necessary to make that work (return new contentId as JSON)
o nav tree is not updated with ajax submit currently
* now always creating editor if corresponsing html element exists
o editor was not initialized when WebSiteCMSContent screen was loaded by non-ajax call
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1058197 13f79535-47bb-0310-9956-ffa450edef68
Two reasons to this:
# we are not sure the descriptionFieldName is alwayd of the form formName_descriptionFieldName
# anyway we need a form name for call_fieldlookup3 and call_fieldlookup2 just above in htmlFormMacroLibrary.ftl.
While at it, I also removed all question marks in ${uiLabelMap.ProductIncludeSubCategories}? occurrences, it's already in the labels
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1056731 13f79535-47bb-0310-9956-ffa450edef68
Rohit reported a bug in the jQuery implementation (ecommerce):
The find button is not working in the 'googlebase' application. The 'googlebase' application has a page using which u can to search for product to be submitted to google base. the find button is not submitting the page at all.
Sascha: This issue was related to the Lookup Call. The Form in Google Base hadn't a 'name' tag, so the form could not be found. I changed the target by name to a target by Id call (which is better anyways).
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1056701 13f79535-47bb-0310-9956-ffa450edef68
During the last works on the my portal module, the Drag'n'Drop functionality was lost. Here is a fix which enables the Drag'n'Drop again.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1056670 13f79535-47bb-0310-9956-ffa450edef68
FieldDescription.[fieldname] - will be used for all fields of that name
FieldDescription.[entityname].[fieldname] - will be used for the specified entity field
The FieldDescription.[fieldname] wasn't supported yet, now it's done. I've also changed the log level to verbose as it may full the log console it there are a lot of fields on a screen
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1054573 13f79535-47bb-0310-9956-ffa450edef68
Added missing argument parameters in Macro renderContentBegin.
It was giving error on console when we render content in pdf file.
Error was coming : --
2010-12-27 19:51:42,033 (http-0.0.0.0-8443-4) [ Log4JLoggerFactory.java:96 :ERROR]
Macro renderContentBegin has no such argument: editContainerStyle
The problematic instruction:
----------
==> macro renderContentBegin [on line 52, column 1 in component://widget/templates/foScreenMacroLibrary.ftl]
in user-directive renderContentBegin [on line 1, column 1 in Mon Dec 27 19:51:42 IST 2010]
----------
Java backtrace for programmers:
----------
freemarker.template.TemplateException: Macro renderContentBegin has no such argument: editContainerStyle
at freemarker.core.Environment.visit(Environment.java:564)
at freemarker.core.UnifiedCall.accept(UnifiedCall.java:106)
at freemarker.core.Environment.visit(Environment.java:209)
at freemarker.core.Environment.include(Environment.java:1482)
at org.ofbiz.widget.screen.MacroScreenRenderer.executeMacro(MacroScreenRenderer.java:95)
at org.ofbiz.widget.screen.MacroScreenRenderer.renderContentBegin(MacroScreenRenderer.java:364)
at org.ofbiz.widget.screen.ModelScreenWidget$Content.renderWidgetString(ModelScreenWidget.java:1181)
at org.ofbiz.widget.screen.ModelScreenWidget.renderSubWidgetsString(ModelScreenWidget.java:136)
at org.ofbiz.widget.screen.ModelScreenWidget$Section.renderWidgetString(ModelScreenWidget.java:227)
at org.ofbiz.widget.screen.ModelScreenWidget.renderSubWidgetsString(ModelScreenWidget.java:136)
at org.ofbiz.widget.screen.ModelScreenWidget$DecoratorSection.renderWidgetString(ModelScreenWidget.java:703)
at org.ofbiz.widget.screen.ModelScreenWidget$SectionsRenderer.render(ModelScreenWidget.java:166)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at freemarker.ext.beans.BeansWrapper.invokeMethod(BeansWrapper.java:840)
at freemarker.ext.beans.SimpleMethodModel.exec(SimpleMethodModel.java:106)
at freemarker.core.MethodCall._getAsTemplateModel(MethodCall.java:93)
at freemarker.core.Expression.getAsTemplateModel(Expression.java:89)
at freemarker.core.Expression.getStringValue(Expression.java:93)
at freemarker.core.StringBuiltins$StringBuiltIn._getAsTemplateModel(StringBuiltins.java:71)
at freemarker.core.Expression.getAsTemplateModel(Expression.java:89)
at freemarker.core.Expression.getStringValue(Expression.java:93)
at freemarker.core.DollarVariable.accept(DollarVariable.java:76)
at freemarker.core.Environment.visit(Environment.java:209)
at freemarker.core.MixedContent.accept(MixedContent.java:92)
at freemarker.core.Environment.visit(Environment.java:209)
at freemarker.core.EscapeBlock.accept(EscapeBlock.java:84)
at freemarker.core.Environment.visit(Environment.java:209)
at freemarker.core.MixedContent.accept(MixedContent.java:92)
at freemarker.core.Environment.visit(Environment.java:209)
at freemarker.core.Environment.process(Environment.java:189)
at org.ofbiz.base.util.template.FreeMarkerWorker.renderTemplate(FreeMarkerWorker.java:216)
at org.ofbiz.widget.screen.HtmlWidget.renderHtmlTemplate(HtmlWidget.java:205)
at org.ofbiz.widget.screen.HtmlWidget$HtmlTemplate.renderWidgetString(HtmlWidget.java:250)
at org.ofbiz.widget.screen.HtmlWidget.renderWidgetString(HtmlWidget.java:110)
at org.ofbiz.widget.screen.ModelScreenWidget$PlatformSpecific.renderWidgetString(ModelScreenWidget.java:1000)
at org.ofbiz.widget.screen.ModelScreenWidget.renderSubWidgetsString(ModelScreenWidget.java:136)
at org.ofbiz.widget.screen.ModelScreenWidget$Section.renderWidgetString(ModelScreenWidget.java:227)
at org.ofbiz.widget.screen.ModelScreen.renderScreenString(ModelScreen.java:394)
at org.ofbiz.widget.screen.ModelScreenWidget$DecoratorScreen.renderWidgetString(ModelScreenWidget.java:671)
at org.ofbiz.widget.screen.ModelScreenWidget.renderSubWidgetsString(ModelScreenWidget.java:136)
at org.ofbiz.widget.screen.ModelScreenWidget$Section.renderWidgetString(ModelScreenWidget.java:227)
at org.ofbiz.widget.screen.ModelScreen.renderScreenString(ModelScreen.java:394)
at org.ofbiz.widget.screen.ScreenRenderer.render(ScreenRenderer.java:135)
at org.ofbiz.widget.screen.ScreenRenderer.render(ScreenRenderer.java:97)
at org.ofbiz.widget.screen.ScreenFopViewHandler.render(ScreenFopViewHandler.java:81)
at org.ofbiz.webapp.control.RequestHandler.renderView(RequestHandler.java:842)
at org.ofbiz.webapp.control.RequestHandler.doRequest(RequestHandler.java:558)
at org.ofbiz.webapp.control.ControlServlet.doGet(ControlServlet.java:227)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:617)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
at org.ofbiz.webapp.control.ContextFilter.doFilter(ContextFilter.java:269)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:233)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127)
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
at org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:555)
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:298)
at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:852)
at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:588)
at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:489)
at java.lang.Thread.run(Thread.java:619)
Thanks to Amit Sharma for the contribution.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1053285 13f79535-47bb-0310-9956-ffa450edef68
Problem in renderLookupField macro: duplicates LAST_VIEW_NAME query string when it's already in ajaxURL . This problem causes the request handler to not convert LAST_VIEW_NAME parameter to String because it would be List.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1052245 13f79535-47bb-0310-9956-ffa450edef68