Commit Graph
8242 Commits
Author SHA1 Message Date
Jacopo Cappellato 66db37dc11 Services and events methods are defined with a methods without arguments (or a script): as usual the input fields are available in the context (Bindings)
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1300473 13f79535-47bb-0310-9956-ffa450edef68
2012-03-14 07:40:31 +00:00
Adrian Crum 203f5ee73d Improved JavaScriptTest.js file:
1. Fixed reference to application-level entity.
2. Made the behavior of the test function different from the behavior of global code - so the distinctions are clear in the service results.


git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1300469 13f79535-47bb-0310-9956-ffa450edef68
2012-03-14 06:40:55 +00:00
Jacopo Cappellato 66656fb4ac Now the Script Event Handler properly set the success/error messages returned by the events as request attributes.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1300268 13f79535-47bb-0310-9956-ffa450edef68
2012-03-13 18:23:09 +00:00
Jacopo Cappellato 4845c553ac The scripthelper object was created too early when the bindings were not set in the context; this caused the wrong scriptType to be set in the ContextHelper.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1300202 13f79535-47bb-0310-9956-ffa450edef68
2012-03-13 15:47:50 +00:00
Jacopo Cappellato 2dbf4c0e6e If a ScriptException is thrown while running a script that implements a service then a result map with the error message is automatically returned by the engine: this default error handling mechanism is similar to the one provided by Minilang and allows to delegate to the engine most of the most common error handling logic.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1300117 13f79535-47bb-0310-9956-ffa450edef68
2012-03-13 13:33:55 +00:00
Sascha Rodekamp dd3c285da8 JCR container definition was placed between the cataline container definition description and th definition itself. That doesn't looked good.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1300014 13f79535-47bb-0310-9956-ffa450edef68
2012-03-13 09:00:43 +00:00
Hans Bakker 0372daa663 OFBIZ-4638: make ofbiz run with openjdk7,6. Contribution of Chattree
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1299985 13f79535-47bb-0310-9956-ffa450edef68
2012-03-13 06:50:41 +00:00
Adrian Crum fda9bad4cf More JSR-223 work - added a ScriptHelper object to the bindings. Also added a demonstration to the JavaScript test service.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1299924 13f79535-47bb-0310-9956-ffa450edef68
2012-03-12 23:20:55 +00:00
Adrian Crum 1c162eb3d7 JSR-223 bug fix, added String constants for commonly used binding keys.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1299636 13f79535-47bb-0310-9956-ffa450edef68
2012-03-12 11:41:03 +00:00
Adrian Crum e3c333acdb Small fix for my last commit.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1299134 13f79535-47bb-0310-9956-ffa450edef68
2012-03-10 01:42:27 +00:00
Adrian Crum 7f741eb700 Added a JSR-223 event handler.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1299131 13f79535-47bb-0310-9956-ffa450edef68
2012-03-10 01:38:15 +00:00
Adrian Crum 7f15204b03 JSR-223 bug fixes.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1299121 13f79535-47bb-0310-9956-ffa450edef68
2012-03-10 00:46:54 +00:00
Adrian Crum 484f0e6999 More JSR-223 work - added the ability to protect the bindings, plus some minor code formatting changes.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1299040 13f79535-47bb-0310-9956-ffa450edef68
2012-03-09 20:41:18 +00:00
Jacopo Cappellato c8323e7ab5 Enhanced Groovy Event Handler to support the execution of a method (as an event) inside of a groovy source file (script class): the method can be specified in the "invoke" attribute.
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
2012-03-09 16:34:18 +00:00
Jacopo Cappellato 9986094080 Updated all the controller entries for Groovy event to consistently use the same way to define the location for the script file. Now the path and filename are always in the "path" attribute and the "invoke" attribute is reserved for the execution of a method in the file (I am going to add support for this feature in my next commit); if the invoke element is not specified then the whole script is executed.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1298904 13f79535-47bb-0310-9956-ffa450edef68
2012-03-09 16:17:12 +00:00
Jacopo Cappellato da59ea40b4 Enhanced Groovy service engine to inject a (configurable) script base class that provides a basic DSL language to the Groovy services; the DSL is still a work in progress but it is already enough to implement several services in Groovy following a programming style very close to Minilang.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1298461 13f79535-47bb-0310-9956-ffa450edef68
2012-03-08 16:36:18 +00:00
Sascha Rodekamp deced8bce4 No Url encoding for get parameters (https://issues.apache.org/jira/browse/OFBIZ-2628) using the URLEncoder to encode and render URLs with special Chars. The encoding is always UTF-8. Fixed Patch without the HTTPS redirect bug.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1298454 13f79535-47bb-0310-9956-ffa450edef68
2012-03-08 16:15:25 +00:00
Adrian Crum d9f7ea2cd4 Restore service definition that was unintentionally removed in my previous commit.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1298269 13f79535-47bb-0310-9956-ffa450edef68
2012-03-08 04:40:20 +00:00
Hans Bakker aa355b8fb5 Upgrade tomcat to 7.0.26: solve javax.naming.NameNotFoundException: Resource /WEB-INF/classes not found problem when OFBiz started. A contribution of Chattree
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1298261 13f79535-47bb-0310-9956-ffa450edef68
2012-03-08 02:38:40 +00:00
Adrian Crum 2ba7468eff More JSR-223 work - added a bsh engine so that bsh-specific code can be eliminated. Bsh is now invoked using JSR-223.
The engine comes from http://java.net/projects/scripting. I had to modify the code slightly because the BshScriptEngine class implemented Compilable - but the Compilable methods were not implemented. So I removed implements Compilable. I renamed the jar to signify that the code has been modified.


git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1297478 13f79535-47bb-0310-9956-ffa450edef68
2012-03-06 14:06:13 +00:00
Adrian Crum 84bfe84794 Remove HTML from CoreEvents.java error messages.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1297461 13f79535-47bb-0310-9956-ffa450edef68
2012-03-06 13:09:49 +00:00
Sascha Rodekamp b3e7f4fb32 Revert r1297006 because the encoding makes a problem with redirecting from HTTP to HTTPS
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1297443 13f79535-47bb-0310-9956-ffa450edef68
2012-03-06 12:24:12 +00:00
Adrian Crum 85b968b883 Small fixup for my last commit.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1297325 13f79535-47bb-0310-9956-ffa450edef68
2012-03-06 02:26:14 +00:00
Adrian Crum 0a0903efb8 More JSR-223 work - added a generic script service engine.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1297323 13f79535-47bb-0310-9956-ffa450edef68
2012-03-06 02:16:29 +00:00
Adrian Crum dd56fdd30d Fixed Groovy test script. String constants were being returned as org.codehaus.groovy.runtime.GStringImpl instead of java.lang.String.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1297214 13f79535-47bb-0310-9956-ffa450edef68
2012-03-05 20:21:19 +00:00
Sascha Rodekamp e1b53e3d50 No Url encoding for get parameters (https://issues.apache.org/jira/browse/OFBIZ-2628) using the URLEncoder to encode and render URLs with special Chars. The encoding is always UTF-8
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1297006 13f79535-47bb-0310-9956-ffa450edef68
2012-03-05 11:13:29 +00:00
Adrian Crum 340e6c9d0a Added a helpful startup message to ScriptUtil.java.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1296978 13f79535-47bb-0310-9956-ffa450edef68
2012-03-05 09:43:54 +00:00
Adrian Crum deac392f10 Refactored ScriptUtil.java to use the javax.script package (JSR-223).
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1296897 13f79535-47bb-0310-9956-ffa450edef68
2012-03-04 23:43:27 +00:00
Jacques Le Roux c6288f1d46 A patch from Wai "widget <image> tag to use css for resizing" https://issues.apache.org/jira/browse/OFBIZ-4678
Summary: The purpose of this patch is to address the following:
1. Provide a standardized set of image width and height specs for page layout in ofbiz. This gives ofbiz a uniform look throughout as it applies to image display.
2. Preserve the aspect ratio of the image when using these standardized image sizes.
3. One place to make styling modifications (eg. css file).
4. Decouple styling from code (eg. java,ftl,xml,html,jsp,etc).

Regarding including the real image size, the width/height attributes in <img> specifies the boundary of the image when shown on the page. If you need to specify the real size of the image, the server code would have to perform the determination. Afterwards, you can include the actual dimensions of the image in the title attribute of <img>

Details:
Manually specifying the image width and height does help with preserving the layout of a page regardless of the image size to be shown. The challenge with this method is that the image shown on the page in question may be distorted if the aspect ratio of the image differed from that of the width and height attributes of <img>. This basically forces the person uploading the image to be more vigilant about image aspect ratios.
The purpose is to harmonize on the display size of images with a standardized set of width/height constraints in which an image must fit and preserve the aspect ratio of images.

Currently the source files (eg. ftl, xml) either manually specifies the width or height of a displayed image (ie widget <image> and html <img> tag). The problem with specifying only one constraint is that an image can affect the layout of the page if the user uploads an image where the aspect ratio could be large.

Some ftl and xml files specify both the width and the height. The problem with this is that if the aspect ratio of the image in question does not match that of the width and height of the <img> tag, the image would be displayed distorted.

The solution was to create a standardized set of CSS styles that both configure the displayed image size and preserve the image aspect ratio (eg. thumbnail size, medium size and large size). Of course, the developers can further define or modify the styles to suit their need.

By using CSS, one can change the size of displayed images without having to tamper with the ftl and/or xml files. This helps to reduce potential bugs that come with modifying the ftl and xml files. The existing way of doing things is to go through each ftl or xml file in question and manually modify the width and/or height of the <image> and/or <img> tag.

The question about the "border" around images. If you do not wish to have a border around the image, just remove it from the CSS style. It's that easy No need to change anything else. Ie. configuration to the image is done on the CSS style and not on the <image>, <img> tag.

NB: The current patch does not apply to all displayed images. I have only made appropriate modifications to widget <image> and html <img> tags that have either specified the width and/or height. There are numerous <image> and <img> tags spread all over the project that do not specify dimensions. I would have to modify them as I encountered them when I could see where and how they are displayed on the screen. Note that these images would not be affect by this patch.

jleroux: despite my efforts I was not able to check all screens. But I think it's ok

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1296782 13f79535-47bb-0310-9956-ffa450edef68
2012-03-04 11:54:13 +00:00
Adrian Crum 6cb4c34e22 Minor changes to ScriptUtil.java: add private constructor, make class final, code format changes. No functional change.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1296771 13f79535-47bb-0310-9956-ffa450edef68
2012-03-04 09:02:07 +00:00
Jacopo Cappellato f18d49458f First pass in the direction of the implementation of a more flexible mechanism to plugin different scripting technologies and in the same time being able to get rid of a lot of framework related custom code to support them.
In particular these chenges should make it easier to implement JSR-223 (even if I think that we should still treat Groovy in a special way).


git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1296762 13f79535-47bb-0310-9956-ffa450edef68
2012-03-04 07:24:47 +00:00
Anil Patel 5919297dc0 Adding JQuery Mobile library. Also updated hhfacility application to use it. Lot more work needs to be done to make hhfacility application useful, We have a start :)
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1295344 13f79535-47bb-0310-9956-ffa450edef68
2012-02-29 23:56:40 +00:00
Adrian Crum 996c27fe19 Added missing <xml> element to Tests.xml file.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1294497 13f79535-47bb-0310-9956-ffa450edef68
2012-02-28 07:19:35 +00:00
Hans Bakker 34c1b497e7 related to Jacopo's query we do not need the datatools of verious databases because we use the delegator with Birt. Contribution by Chattree
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1294450 13f79535-47bb-0310-9956-ffa450edef68
2012-02-28 02:48:54 +00:00
Adrian Crum f4de5909bb Minor change to sendMailFromTemplateSetting service: Log message when no email address is found instead of throwing exception.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1294102 13f79535-47bb-0310-9956-ffa450edef68
2012-02-27 10:52:22 +00:00
Hans Bakker 7952083abd In 'data export all' be able to select a fromdate , tabs to spaces in a birt file from last commit. Contribution from Chattree
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1294048 13f79535-47bb-0310-9956-ffa450edef68
2012-02-27 07:33:05 +00:00
Hans Bakker 92397979ed upgrade BIRT to 3.7.2 http://www.eclipse.org/birt/phoenix/project/notable3.7.php
- Addresses BIRT engine with a new POJO based runtime
- Add more content types
  * Post Script
  * Open Document Text
  * Open Document Spreadsheet
  * Open Document Presentation

- Remove warning messages at compile time
- Set an override content type in the view handler

A contribution of Chattree



git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1293999 13f79535-47bb-0310-9956-ffa450edef68
2012-02-27 02:37:16 +00:00
Jacques Le Roux 5b43cd8035 Updates log4j from log4j-1.2.15.jar to log4j-1.2.16.jar.
BTW this remind me Jacopo's question (on user ML) about Selenium in OFBiz usage...

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1293808 13f79535-47bb-0310-9956-ffa450edef68
2012-02-26 11:23:13 +00:00
Jacques Le Roux 0acaefd402 A patch from Nicolas Malin "On extend form, use call-parent-actions element to run the herited form action" https://issues.apache.org/jira/browse/OFBIZ-2889
On widget form at this time the actions on parents form is not executed if child form contains also actions.
A solution is to implement a new element call-parent-actions on <actions> and <row-actions> element.
for more info see : http://markmail.org/message/hy3puy3fhpzqo7fd

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1293565 13f79535-47bb-0310-9956-ffa450edef68
2012-02-25 10:00:43 +00:00
Jacques Le Roux aa27c73baa A patch from Nicolas Malin "Label not loading on entityext components" https://issues.apache.org/jira/browse/OFBIZ-4717
The configuration directory config isn't loaded on the entityext's ofbiz-component.xml file.

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1293557 13f79535-47bb-0310-9956-ffa450edef68
2012-02-25 09:30:35 +00:00
Jacques Le Roux a3c423a3a3 A patch from Nicolas Malin "French uilabels for EntityExt components" https://issues.apache.org/jira/browse/OFBIZ-4716
French label in EntityExtUiLables.xml config file

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1293556 13f79535-47bb-0310-9956-ffa450edef68
2012-02-25 09:27:02 +00:00
Jacques Le Roux 642ebe11e6 A patch from Markus M. May "Adding German UI Labels on framework CommonUILabels" https://issues.apache.org/jira/browse/OFBIZ-3838
I'd like to have a review of this slighly modified patch (no labels changes) by a German speaking committer or contributor.
Because some labels are replaced and my German is not good enough (it's not good at all) to be able to take a decision by myself

Here are the points I'm unsure about

-        <value xml:lang="de">Forderungen</value>
+        <value xml:lang="de">Debitoren</value>

-        <value xml:lang="de">Klicken Sie hier</value>
+        <value xml:lang="de">Hier klicken</value>

-        <value xml:lang="de">Ansehen</value>
+        <value xml:lang="de">Suchen</value>

-        <value xml:lang="de">Neues Passwort (zur Überprüfung)</value>
+        <value xml:lang="de">Neues Passwort (Wiederholung)</value>

-        <value xml:lang="de">Erstellt von Benutzeranmeldung</value>
+        <value xml:lang="de">Erstellt von Benutzer</value>

-        <value xml:lang="de">Zuletzt geändert von Benutzeranmeldung</value>
+        <value xml:lang="de">Zuletzt geändert von Benutzer</value>



git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1293232 13f79535-47bb-0310-9956-ffa450edef68
2012-02-24 12:50:08 +00:00
Adrian Crum 827290f103 Refactored ModelDataFileReader.java - fixed thread-safety issues, simplified some unnecessarily complicated code, un-hide exceptions so the UI can display them.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1291007 13f79535-47bb-0310-9956-ffa450edef68
2012-02-19 14:39:10 +00:00
Jacques Le Roux 90c21deb08 A patch from Kiran Gawde "renderFormClose is missing arguments containerId, hasRequiredField" https://issues.apache.org/jira/browse/OFBIZ-4701
In htmlFormMacrolLibrary.ftl, renderFormClose has containerId, hasRequiredField.
But csv, fo, text, xml FormMacroLibary.ftl don't have these fields for this macro.

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1245778 13f79535-47bb-0310-9956-ffa450edef68
2012-02-17 21:52:25 +00:00
Hans Bakker 859f1c91df OFBIZ-4698: the price service check the currency.uom.id.default property from a system propery. Thanks Chattree for the contribution
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1245324 13f79535-47bb-0310-9956-ffa450edef68
2012-02-17 06:13:28 +00:00
Jacques Le Roux 4eb4ae56e3 A patch from Markus M. May "Add german translation to TemporalExpressionUiLabels.xml" https://issues.apache.org/jira/browse/OFBIZ-4700
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1245130 13f79535-47bb-0310-9956-ffa450edef68
2012-02-16 19:26:39 +00:00
Erwan de Ferrieres a8ce326075 OFBIZ-4667 At the time of page load unnecessary ajax request executed to get the lookup description. - A patch from Amardeep Singh Jhajj
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1244953 13f79535-47bb-0310-9956-ffa450edef68
2012-02-16 12:13:49 +00:00
Sascha Rodekamp 8953416d70 BUGFIX: Impossible cast from org.ofbiz.jcr.orm.jackrabbit.JackrabbitFolder to org.ofbiz.jcr.orm.jackrabbit.JackrabbitFile in org.ofbiz.jcr.api.jackrabbit.JackrabbitFileHelper.getRepositoryContent(String, String) (https://issues.apache.org/jira/browse/OFBIZ-4695): A patch from Michael Brohl which corrects the class cast exception.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1244404 13f79535-47bb-0310-9956-ffa450edef68
2012-02-15 09:02:32 +00:00
Sascha Rodekamp 0b01894ec1 BUGFIX: return value of String.replace(CharSequence, CharSequence) ignored in org.ofbiz.widget.form.[Macro/Html]FormRenderer.appendExternalLoginKey(String) (https://issues.apache.org/jira/browse/OFBIZ-4694): A patch from Michael Brohl Same error in both Classes MacroFormRenderer and HtmlFormRenderer.
Will provide a patch.

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1244401 13f79535-47bb-0310-9956-ffa450edef68
2012-02-15 08:53:07 +00:00
Erwan de Ferrieres 195ebb9010 missing license header and xml prefix
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1244208 13f79535-47bb-0310-9956-ffa450edef68
2012-02-14 20:54:19 +00:00