In order to use these engine and event rather than the one that uses JSR223:
* for services (service definition): set the engine to "groovy" rather than "script"
* for events (event element in the controller): set the event type to "groovy" rather than "script"
The main advantage of using them is that it is possible to attach a debugger to the Groovy methods.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1325253 13f79535-47bb-0310-9956-ffa450edef68
Currently auto-completer uses sync call to prepare auto-completer source (result list).
Due to this user can't perform any other operation on lookup field and user should have to wait until response came.
In general, synchronous requests should never be used because they tend to block the execution of anything else on the page (or even the entire browser UI), which isn't good.
Also ajax-loader image not display on google chrome browser due to sync request.
Need to use async request for auto-completer.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1308751 13f79535-47bb-0310-9956-ffa450edef68
The transform is now used to pass the "postalAddress" to the context of the postal address formatter screen.
This should fix the issue, reported by Chatree, that prevented to render the localized address when the screen was rendered from the send mail service (no request object was available).
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1307288 13f79535-47bb-0310-9956-ffa450edef68
Fixes this bug:
---- exception report ----------------------------------------------------------
Error in request handler:
Exception: org.ofbiz.widget.screen.ScreenRenderException
Message: Error rendering screen component://ecommerce/widget/CommonScreens.xml#main-decorator: java.lang.StringIndexOutOfBoundsException: String index out of range: 0 (String index out of range: 0)
---- cause ---------------------------------------------------------------------
Exception: java.lang.StringIndexOutOfBoundsException
Message: String index out of range: 0
---- stack trace ---------------------------------------------------------------
java.lang.StringIndexOutOfBoundsException: String index out of range: 0
java.lang.String.charAt(String.java:686)
org.ofbiz.webapp.ftl.OfbizContentTransform$1.close(OfbizContentTransform.java:97)
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1304200 13f79535-47bb-0310-9956-ffa450edef68
Similarly to Groovy services, the Groovy Events Handler sets the base script class containing helper methods; these helper methods have been enhanced in order to be used by groovy method executed as services or events in a transparent way.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1298908 13f79535-47bb-0310-9956-ffa450edef68
The return value of currentDelegatorTenantId.trim() is not assigned in org.ofbiz.webapp.control.LoginWorker.login() so trim() has no effect.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1244139 13f79535-47bb-0310-9956-ffa450edef68
* null values in Map
* BigDecimal
* correctly TimeStamp format (we use xsd:dateTime in ModelService.getTypes())
So CXF was not able to unmarshall a List of Maps with those types in them.
It does not introduce any regressions:
* A new specific SOAP null type is introduced using ("nillable","true") and ("xsi:nil","true) attributes. I had also to set the http://www.w3.org/2001/XMLSchema-instance schema on the null node. Because it was impossible to add it in the envelope header, not a big deal anyway.
* I introduced a 'T' in the TimeStamp format. It's is OK, the deserialisation handles it well (we use xsd:dateTime, see http://www.w3.org/TR/xmlschema-2/#dateTime)/. We don't handle TimeZone...
* BigDecimal was missing and is now correctly handled. I used 10 decimals and half up rounding (ROUND_HALF_UP)
Also improves the SOAPEventHandler.sendError() method by passing the serviceName in the message
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1243026 13f79535-47bb-0310-9956-ffa450edef68
Orig Msg:
Here is a step-by-step how the error occures:
1) Request a new password by entering your userlogin
2) Login and you will get to the "requirePasswordChange"-Page (depending on properties)
3) If you enter a wrong current password on this page the exception is thrown.
OFBiz tries to call the service "updatePassword" with a bad userLogin and an Exception is thrown:
org.ofbiz.service.ServiceAuthException: User authorization is required for this service: updatePassword [updatePassword::file:/C:/Workspace/apache_ofbiz/framework/common/servicedef/services.xml::Update a UserLogin ...
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1170473 13f79535-47bb-0310-9956-ffa450edef68
Actually I hastily did it bad using static instead of caching. Anyway, I checked there are no real needs to change current code in OFBiz for perf.: one instance is in an exception and the other not called OOTB...
Was: Closes https://issues.apache.org/jira/browse/OFBIZ-4201
"DateFormat.getDateTimeInstance() is very expensive, we can cache it to improve performance"
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1165084 13f79535-47bb-0310-9956-ffa450edef68
"DateFormat.getDateTimeInstance() is very expensive, we can cache it to improve performance"
jlr: It's not really cache but a static class constant
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1165076 13f79535-47bb-0310-9956-ffa450edef68
It works locally but not on clusters. You simply get a NPE.
Problem
When we logout we cross an issue due to Tomcat sessions persistence.
Because we set distributable to true, to allow sessions failover,
and use and DeltaManager for replication.
Delegator and other main Classes (notably Dispatcher) are not serialized in OFBiz. This is the origin of the problem
Tried solutions
By default DeltaManager save active sessions on disk. It uses a private String variable pathname for that (default to "SESSIONS.ser"). You can set it to null, to avoid session persistence, using a context.xml file in the WEB-INF folder with content like below. But I tried it in webtools app on staging qs001 (only) and it did not work (with distributable set to false). And we have no other means to set it from OFBiz (OOTB).
<Context>
<Manager className="org.apache.catalina.session.DeltatManager" pathname="">
</Manager>
</Context>
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1132749 13f79535-47bb-0310-9956-ffa450edef68
If the session is timed out the request handler checks weather it is an ajax request or not (The information comes from the request header if the X-Requested-With contains XMLHttpRequest we haven an ajax request.).
If it is an ajax request it don't return the normal "checkLogin" request, i return a a special ajaxCheckLogin request. This request can point to an site which shows the "Please Login Hint".
Orig Msg:
Take the following page (for example) https://localhost/content/control/findContent
field "Data Resource Id" has an icon beside it that creates an ajax dialog pop up. If the session has already timed out. The dialog box would show the login screen.
I suspect that all pages containing this functionality would exhibit the same symptom.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1102615 13f79535-47bb-0310-9956-ffa450edef68
This feature was not working since rev.741374 because a quick return from the login service was introduced if the user was already logged in.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1090853 13f79535-47bb-0310-9956-ffa450edef68