Commit Graph
8537 Commits
Author SHA1 Message Date
Jacques Le Roux a025b28013 Fixes an issue related done with "Autocompletion for Compound Widget" - https://issues.apache.org/jira/browse/OFBIZ-7061 reported by Swapnil M Mane
<<xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">> was missing, this happened in r1749488. It was the only case like that (checked in Eclipse using validate, there are tons of other mnior issues BTW)


git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1750050 13f79535-47bb-0310-9956-ffa450edef68
2016-06-24 08:51:05 +00:00
Jacques Le Roux 642f42886e A temporary workaround for "Autocompletion for Compound Widget" - https://issues.apache.org/jira/browse/OFBIZ-7061
Reverts the simple method to use the original schema without namespace. "Duplicates" simple-methods.xsd in simple-methods-ns.xsd as we did, to get the simple-method namespace for compound-widgets.

For myself: when we will do the 3rd more elegant option (no schema duplication), have been changed also:
minilang-catalog.xml
compound-widgets.xsd


git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1749938 13f79535-47bb-0310-9956-ffa450edef68
2016-06-23 16:40:22 +00:00
Arun Patidar a91b9edae9 Applied patch from ticket - OFBIZ-7339 - Replace EntityUtilProperties getPropertyValue method with correct method calls. Thanks Rahul Singh Kushwah and Rishi Solanki for your contribution.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1749882 13f79535-47bb-0310-9956-ffa450edef68
2016-06-23 13:10:51 +00:00
Ashish Vijaywargiya 9e63d2dde8 Applied patch from jira issue - OFBIZ-7330 - Error with Agreement Item Supplier product Pdf.
Thanks Ravi for the contribution.

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1749850 13f79535-47bb-0310-9956-ffa450edef68
2016-06-23 06:59:22 +00:00
Jacques Le Roux a0acf8fa3d No functional change, just formatting
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1749664 13f79535-47bb-0310-9956-ffa450edef68
2016-06-22 12:47:38 +00:00
Jacques Le Roux c8ba932772 Fixes a "typo" in last commit for "Autocompletion for Compound Widget" - https://issues.apache.org/jira/browse/OFBIZ-7061
We used targetNamespace (should only be used in schema) instead of xsi:schemaLocation



git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1749634 13f79535-47bb-0310-9956-ffa450edef68
2016-06-22 05:58:26 +00:00
Jacques Le Roux 89212904bd Completes and finish "Autocompletion for Compound Widget" - https://issues.apache.org/jira/browse/OFBIZ-7061
This is the 2nd step: puts back the original names, so it will be transparent for remaining references in xml catalogs, Java code, etc.

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1749489 13f79535-47bb-0310-9956-ffa450edef68
2016-06-21 11:37:47 +00:00
Jacques Le Roux 4931db1ed9 Completes and finish "Autocompletion for Compound Widget" - https://issues.apache.org/jira/browse/OFBIZ-7061 by replacing xsd files references in xml files by -ns.xsd files and removing the concerned xsd files
This is a 1st step, in a 2nd I will put back the original names, so it will be transparent for remaining reference in xml catalogs, Java code, etc.

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1749488 13f79535-47bb-0310-9956-ffa450edef68
2016-06-21 11:14:16 +00:00
Jacques Le Roux b43b62bef2 Updates Shiro to 1.2.5 (CVE-2016-4437) - https://issues.apache.org/jira/browse/OFBIZ-7373
Apache Shiro before 1.2.5, when a cipher key has not been configured for the "remember me" feature, allows remote attackers to execute arbitrary code or bypass intended access restrictions via an unspecified request parameter.

Details at https://web.nvd.nist.gov/view/vuln/detail?vulnId=CVE-2016-4437

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1749220 13f79535-47bb-0310-9956-ffa450edef68
2016-06-19 22:30:06 +00:00
Pranay Pandey ce35b0d583 [OFBIZ-7274] Updated the widget.lookup.width property so that the pagination header in lookups is rendered properly.
Thanks Vaibhav Jain for reporting the issue and Aditya Patwa for providing the patch.


git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1748929 13f79535-47bb-0310-9956-ffa450edef68
2016-06-18 07:34:32 +00:00
Jacques Le Roux 11b4e86332 A patch from Gareth Carter for "connection pooling not working" https://issues.apache.org/jira/browse/OFBIZ-7346
Connection pooling does not seem to work. Connections are created fine but as the close() method is called (outside of transaction) or the transaction is committed the connections are closed to the db server and not returned to the pool.

I believe the issue is with org.apache.commons.dbcp2.PoolableConnectionFactory passivateObject method. This will call rollback() when rollbackOnReturn is set to true even if the transaction is committed. This is because any connection wrappers extending org.apache.commons.dbcp2.DelegatingConnection cache autoCommit status. At some point, this cached autoCommit is different from the underlying connection autoCommit. The rollback() method will throw an exception and the connection is destroyed rather than put back to the pool

Environment this has been tested on:
ofbiz: rev 1725574 and latest trunk (as of 2016-06-14)
db: postgresql 9.1
jdbc driver: postgresql-9.3-1101.jdbc4
os: linux and windows

jleroux: this issue doest not exist with Derby, it's a matter of driver (DBMS actually) see Derby vs Postgres

    https://db.apache.org/derby/docs/10.9/devguide/cdevconcepts29416.html
    https://www.postgresql.org/docs/9.1/static/ecpg-sql-set-autocommit.html

Another solution would be to force Postgres to autocommit but I'd not do that, better not change this DBMS dependent behaviour.


git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1748837 13f79535-47bb-0310-9956-ffa450edef68
2016-06-17 11:51:13 +00:00
Jacques Le Roux b476fc3dfc As always forgot to commit this French label change while committing stuff for OFBIZ-7363. Anyway better to have it apart.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1748703 13f79535-47bb-0310-9956-ffa450edef68
2016-06-16 12:34:30 +00:00
Jacques Le Roux 6eaa2239a6 Fixes "The Connection Pool Status feature in webtools is broken" - https://issues.apache.org/jira/browse/OFBIZ-7363
Completes the work I did in r1748689. Actually I worked on different editors and mixed things so not all was committed previously, here they are

Removes now useless commented out line about DebugManagedDataSource (// Useful to debug the usage of connections in the pool). I put more information in the class head while fixing the type warnings

Fixes other type warnings I missed previously

Eventually removes the old comment
        // Hmm... then how do we close the JDBC connections?
Because "we" don't close JDBC connections, DBPC takes care of that (or at least should, I did not check).


git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1748693 13f79535-47bb-0310-9956-ffa450edef68
2016-06-16 12:13:02 +00:00
Jacques Le Roux e0c49bb75f Fixes "The Connection Pool Status feature in webtools is broken" - https://issues.apache.org/jira/browse/OFBIZ-7363
The Connection Pool Status feature was introduced by OFBIZ-4864 hence 1st in R13.07 where it still work well (see demo), as the connection pooling. But has been broken since, with the pooling.
Fortunately, it's easy to fix and has no implications has long has you don't enable verbose logging (the DebugManagedDataSource only extends ManagedDataSource for verbose logging and to generate the info needed for the Connection Pool Status feature).

I fixed it by using directly the DebugManagedDataSource. It's not an issue as long as you don't set the logging level to verbose which is anyway not something you would do in production. In case you do so and don't want to be disturbed in the log (focusing on something else), it's still easy to comment out the line from DebugManagedDataSource. I also fixed some type warnings while at it.

I also removed this old comment
        // Hmm... then how do we close the JDBC connections?
Because "we" don't close JDBC connections, DBPC takes care of that (or at least should, I did not check).

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1748689 13f79535-47bb-0310-9956-ffa450edef68
2016-06-16 11:46:03 +00:00
Jacques Le Roux 3d61573b57 A patch from Arvind Singh Tomar for "Inventory report throws an error" https://issues.apache.org/jira/browse/OFBIZ-6947 reported by Pierre Smits
When executing the print pdf function in https://demo-trunk-ofbiz.apache.org/facility/control/ViewFacilityInventoryByProduct
the following error is thrown:
Unable to transform FO file: org.apache.fop.apps.FOPException: org.apache.fop.fo.ValidationException: null:80:115: "fo:table-cell" is missing child elements. Required content model: marker* (%block;)+ (See position 80:115) javax.xml.transform.TransformerException: org.apache.fop.fo.ValidationException: null:80:115: "fo:table-cell" is missing child elements. Required content model: marker* (%block;)+ (See position 80:115)

The issue was due to missing child element which is failing on validation. Earlier we were using fop-1.1.jar and now it is updated to fop-2.0.jar which by default validates the markup. It is same as OFBIZ-7090
I have added the missing child elements in the macro which were causing the validation to fail and providing the updated patch.

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1748628 13f79535-47bb-0310-9956-ffa450edef68
2016-06-15 20:11:57 +00:00
Jacques Le Roux bd0b57613c A patch from Wai for "EntityUtilProperties" https://issues.apache.org/jira/browse/OFBIZ-7112
OFBiz reads properties from either a properties file or the entity:SystemProperty. The way it worked previously is that OFBiz reads from the entity:SystemProperty first and if there is no value associated with the target propertyname, it would then locate the value from the relevant properties file.
In other words, if there is a database entry for a property, the database entry should override the associated properties file.
The issue is that if a database entry exist but the value is empty, it would look for a value from the properties file.  It should not do so.  If a database entry exists for the propertyname of interest, the value should be taken from the database even if it holds an empty value.

"isExistInDb" is first defined in Map<String, String> getSystemPropertyValue(String, String, Delegator).  This method is call by many other methods.  "isExistInDb" is used to indicate whether the method is returning an empty value for the property that 'exists' in the database rather than as a result of an absent database entry for the property.

The other methods...
  boolean propertyValueEqualsIgnoreCase(String, String, String, Delegator)
  String getPropertyValue(String, String, String, Delegator)
  String getPropertyValue(String, String, Delegator) 
  String getMessage(String, String, Locale, Delegator)
uses the above method and needs to decide whether to use the empty value returned (ie. empty value from an existing property entry in database) or decide if it needs to read from the property file (ie. property entry does not exist in database)

jleroux: this also add systemPropertyValue data in CommonSystemPropertyData.xml

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1748560 13f79535-47bb-0310-9956-ffa450edef68
2016-06-15 11:23:54 +00:00
Jacques Le Roux 99de8f8705 A patch from Gareth Carter for "DB connections remain open and unused on startup" https://issues.apache.org/jira/browse/OFBIZ-7344
When ofbiz starts and checks the database, it will leave open connections and they will not get reused.

If you run Check/Update database from webtools, you can see a new connection is created for your selected group

As far as I can tell, the problem lies in DatabaseUtil.getDatabaseMetaData. If the parameter connection is null, a new connection object is created but not closed (like any resource should be!)

jleroux: I was unable to "see a new connection is created for your selected group" when running "Check/Update database from webtools". But I tested with Postgres while and after discussing with Gareth about this.

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1748543 13f79535-47bb-0310-9956-ffa450edef68
2016-06-15 10:35:18 +00:00
Jacques Le Roux da29d8e842 This closes "Add the -server JVM argument to Ant targets like start and tools/start*.bat files" https://issues.apache.org/jira/browse/OFBIZ-7321
I kept things as simple as possible. I only changed the following Ant targets
  start
  start-secure
  start-batch
  start-batch-secure
  run-test

I also changed the startofbiz.bat file. The other start*.bat are for the POS and it's not expected to run on a server.

I put a mention when using "java -jar ofbiz.jar -u" (start)
I will add a mention in "Technical+Production+Setup+Guide" wiki page about using "java -jar ofbiz.jar"

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1748173 13f79535-47bb-0310-9956-ffa450edef68
2016-06-13 10:34:39 +00:00
Pranay Pandey 042864ac13 [OFBIZ-7268] Improved the styling for the anchor links inside the 'button-bar' to fix styling for CommonButtonBarMenu. Reverted the changes committed under OFBIZ-7006, since these UI improvements fix that issue as well by extending CommonButtonBarMenu.
Thanks Swapnil M Mane for the contribution.

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1748145 13f79535-47bb-0310-9956-ffa450edef68
2016-06-13 09:13:14 +00:00
Jacques Le Roux 27b736e3ed No functional changes. While reviewing Wai's patch for OFBIZ-7112 I noticed that he (re)used this pattern introduced earlier:
(resource == null || resource.length() <= 0)
From Java spec. a String, Collection, Map or CharSequence can't have a negative length, so the pattern above can be reduced to 
  (resource == null || resource.length() == 0)
which can be replaced using 
  UtilValidate.isEmpty()
I checked, there are several other occurrences of this pattern (some very old, I guess most were routinely copied from an initial occurrence). I decided to replace all of them, here they are.

I did that already long ago for the 
  (resource == null || resource.length() == 0)
pattern. It remains 4 of them. Three are justified (because of the dependency on base component or because using isEmpty() on Object is disputable for performance reasons). I took care of the remaining one right aways (in SplashScreen.java)


git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1747976 13f79535-47bb-0310-9956-ffa450edef68
2016-06-12 10:43:58 +00:00
Deepak Dixit 02c723c669 (OFBIZ-7213) Applied patch from jira issue
===================================
Override allow-html attribute do not work in service implementing any interface
===================================

Thanks Nameet Jain for your contribution.

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1747959 13f79535-47bb-0310-9956-ffa450edef68
2016-06-12 07:17:06 +00:00
Deepak Dixit d9a8278ae6 (OFBIZ-7245) Renamed groovy file in upper camel case as per best practices
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1747850 13f79535-47bb-0310-9956-ffa450edef68
2016-06-11 06:12:27 +00:00
Jacques Le Roux 1ee87e749b This has slipped in inadvertently in a previous commit, removes
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1747792 13f79535-47bb-0310-9956-ffa450edef68
2016-06-10 19:52:15 +00:00
Jacques Le Roux 0029608c28 This has slipped in inadvertently in a previous commit, removes!
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1747783 13f79535-47bb-0310-9956-ffa450edef68
2016-06-10 19:25:25 +00:00
Deepak Dixit 4a276ecf91 (OFBIZ-7231) Relocate .groovy files in the framework/common component
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1747776 13f79535-47bb-0310-9956-ffa450edef68
2016-06-10 18:58:37 +00:00
Deepak Dixit e929d179d8 (OFBIZ-7228) Relocate .groovy files in the party component
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1747770 13f79535-47bb-0310-9956-ffa450edef68
2016-06-10 18:39:22 +00:00
Deepak Dixit 543dd8e488 (OFBIZ-7221) Relocate .groovy files in the framework/webtools component
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1747755 13f79535-47bb-0310-9956-ffa450edef68
2016-06-10 17:16:22 +00:00
Jacques Le Roux ec66e361e1 A big but straightforward commit for "Move minilang scripts from component://componentname/script/org/ofbiz to component://componentname/minilang" - https://issues.apache.org/jira/browse/OFBIZ-7267
I removed duplicate paths were componentname was uselessly repeated after component://componentname/script/org/ofbiz (projectmngr was the only one using there project instead)

I had few typos, easily fixed thanks to the tests. There could be still typos but they are unexpected and anyway no-brainer to fix 

I'm still wondering about specialpurpose/example/minilang/README.txt.
I changed its content to 
  "The minilang directory is for static resources that are interpreted at run time rather than being compiled. This goes on the classpath, but does not get built or put into a JAR file."
not sure it makes any sense, I don't see how this relates to the classpath. 


git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1747712 13f79535-47bb-0310-9956-ffa450edef68
2016-06-10 14:04:30 +00:00
Ashish Vijaywargiya 89e4e9c642 Applied patch from jira issue - OFBIZ-7203 - Empty Requirement Id and Product Id fields when generating pdf for Approved Product Requirements. Thanks Ravi for the contribution. Thanks for your extensive research and providing the details in the task, your notes are very helpful.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1747516 13f79535-47bb-0310-9956-ffa450edef68
2016-06-09 09:14:13 +00:00
Pranay Pandey f0134b07cc [OFBIZ-7214] No functional changes, adding missing license header.
Thanks Pierre Smits for reporting.

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1747344 13f79535-47bb-0310-9956-ffa450edef68
2016-06-08 04:09:23 +00:00
Taher A. Alkhateeb 50127f4a9c Major commit for refactoring the start component - Ref OFBIZ-6783
A thank you is due to Jacques Le Roux, whom substantially improved
the refactoring of the start component with his QA work, and also
credit is due to Jacopo Capellato and Gil Portenseigne for their help

This commit is the last commit on OFBIZ-6783 and applies the following:

- convert the startup loaders from ArrayList to List. Given that
  only two loaders existed in the system since the beginning of 
  OFBiz means that it is really unnecessary to use the 
  loaders.trimToSize() method. It's simply too much specificity for
  no apparent performance value. this leads to changing many method
  signatures from ArrayList to list across different classes
- More simplification of Config.java by simplifying timezone setting
  logic
- remove the throws StartupException from main. This was confusing
  confused me a lot and lead to a regression from my refactoring
  in OFBIZ-7167 because some exceptions bubble up all the way to
  main but then the system does not terminate because other 
  threads are running. It took me and Jacques a long while to 
  dig it out and figure the root cause.
- Introduce a function called fullyTerminateSystem(StartupException e).
  This function replaces the exception bubble issue that is
  described above. Consequently, the methods init, status and
  shutdown no longer throw an exception but instead terminate
  the system (which is the right thing to do).
- finetune adaptStartupCommandsToLoaderArgs(...) and other 
  places in StartupControlPanel
- separate the Classpath creation from NativeLibClassLoader 
  creation. This makes it cleaner and easier to refactor
  in the future
- break the StartupControlPanel.start(...) method into
  smaller more readable methods. It is easier now to understand
  the startup sequence for ofbiz in english words (the method names).
  It also allows for cleaner refactoring in the future.
- add JavaDoc to a lot of methods all over the start component
- rename AdminPortThread to AdminServer and create a new class called
  AdminClient. Now everything relating to controlling OFBiz directly
  happens through StartupControlPanel such as start, stop or init 
  for the server, and everything which happens indirectly through
  the network (by an admin client) is done through the AdminClient
  which talks to AdminServer
- more refactoring of AdminServer to simplify the code and break it
  down into multiple methods and refactor some messy old code

Assuming this commit is stable, and after waiting for a sufficient time
I will close the JIRA and move on with the refactoring exercise.



git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1747288 13f79535-47bb-0310-9956-ffa450edef68
2016-06-07 18:12:46 +00:00
Pranay Pandey 247df14284 [OFBIZ-7209] No functional change. Corrected formatting.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1747207 13f79535-47bb-0310-9956-ffa450edef68
2016-06-07 12:44:52 +00:00
Pranay Pandey be6ece2105 [OFBIZ-7209] Fixed Order Ship Group PDF.
This issue was due to the declaration of map with list syntax. It was introduced when we moved from Javolution collections to java collections.
One more issue found after fixing map syntax, that is missing block elements error. Added checks to handle that error as well.

Thanks Amardeep Singh Jhajj for the contribution.

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1747202 13f79535-47bb-0310-9956-ffa450edef68
2016-06-07 12:14:29 +00:00
Taher A. Alkhateeb d91d0dc283 Fix regression caused by refactoring start comp - ref OFBIZ-7167
Thanks to an excellent investigation by Jacques Le Roux we realized
that if not all tests are successful (on java -jar ofbiz -jar --tests)
then the system hangs and does not print HTML reports.

After investigating this issue, I realized that the old logic before
refactoring used to call System.exit(99) which executes all the shutdown
hooks and releases the system resources. In the new code, however, the
resources are not released as the exception simply bubbles up to the main
method and thrown out, while the other threads are still running. So
the resources are not released and build.xml cannot continue processing
the HTML results with <junitreport ...>

The fix is simple, but the investigation was hard. Big thank you to Jacques.


git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1746737 13f79535-47bb-0310-9956-ffa450edef68
2016-06-03 16:31:34 +00:00
Deepak Dixit 09ca38b7f6 (OFBIZ-7164) Fix typo in freemarker else tag.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1746691 13f79535-47bb-0310-9956-ffa450edef68
2016-06-03 08:59:56 +00:00
Christian Geisert 351a15a292 OFBIZ-7163 Fix Definition Location filter at Service Reference
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1746601 13f79535-47bb-0310-9956-ffa450edef68
2016-06-02 16:20:11 +00:00
Jacques Le Roux 0e7696a881 Adds a missing xls reference in platform-specific, stumbled upon it by chance
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1746420 13f79535-47bb-0310-9956-ffa450edef68
2016-06-01 10:51:20 +00:00
Jacques Le Roux 3aadf4e8da A slightly modified patch from James Yong for "Autocompletion for Compound Widget" https://issues.apache.org/jira/browse/OFBIZ-7061
1. The following xsd are duplicated to use namespaces
  site-conf.xsd     ->  site-conf-ns.xsd
  widget-form.xsd   ->  widget-form-ns.xsd
  widget-screen.xsd ->  widget-screen-ns.xsd
  widget-menu.xsd   ->  widget-menu-ns.xsd
  simple-methods.xsd->  simple-methods-ns.xsd
For example, in site-conf-ns.xsd, we have the following document level attribute
  <xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" elementFormDefault="qualified" xmlns="http://ofbiz.apache.org/Site-Conf" targetNamespace="http://ofbiz.apache.org/Site-Conf">
instead of 
  <xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" elementFormDefault="qualified">

2. The above schema are used into compound-widgets.xsd so that compound widgets use only one consolidated schema. 

3. Update ExampleCompoundWidgets.xml to use the new compound-widgets.xsd. For example
<compound-widgets xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
        xmlns:sc="http://ofbiz.apache.org/Site-Conf"
        xmlns:sm="http://ofbiz.apache.org/Simple-Method"
        xmlns:wf="http://ofbiz.apache.org/Widget-Form"
        xmlns:wt="http://ofbiz.apache.org/Widget-Tree"
        xmlns:wm="http://ofbiz.apache.org/Widget-Menu"
        xmlns:ws="http://ofbiz.apache.org/Widget-Screen"
        xsi:noNamespaceSchemaLocation="../../../../framework/widget/dtd/compound-widgets.xsd">
    
    <sc:site-conf>
        <sc:request-map uri="CompoundWidgets1">
            <sc:security https="true" auth="true"/>
            <sc:event type="simple" invoke="CompoundWidgetsFunc" path="component://example/widget/example/ExampleCompoundWidgets.xml"/>
            <sc:response name="success" type="view" value="CompoundWidgets1"/>
        </sc:request-map>
        <sc:request-map uri="CompoundWidgets2"><sc:security https="true" auth="true"/><sc:response name="success" type="view" value="CompoundWidgets2"/></sc:request-map>

        <sc:view-map name="CompoundWidgets1" type="screen" page="component://example/widget/example/ExampleCompoundWidgets.xml#CompoundWidgets1"/>
        <sc:view-map name="CompoundWidgets2" type="screen" page="component://example/widget/example/ExampleCompoundWidgets.xml#CompoundWidgets2"/>
    </sc:site-conf>
...... the rest

4. Change java code to support reading xml with namespace (i.e. xml for compound widgets)

jleroux: I simply replaced tabs by spaces in Java files and removed this commented out line 
  <compound-widgets xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="http://ofbiz.apache.org/dtds/compound-widgets.xsd">
in ExampleCompoundWidgets.xml

We decided to duplicate the simple-methods.xsd rather than updating all concerned files. Else we would have to update the attributes at document level for rest of the controllers, menus, forms, simple methods and screens. For example, in controller.xml, we would have to change 
  xsi:noNamespaceSchemaLocation="http://ofbiz.apache.org/dtds/site-conf.xsd”
to 
  xmlns="http://ofbiz.apache.org/sc” xsi:schemaLocation="http://ofbiz.apache.org/dtds/site-conf-ns.xsd”>
But especially we would have to use the same syntax with namespaces prefixes than in ExampleCompoundWidgets.xml (see example above). This can be discussed because with auto-completion it's not a big deal, but could be overwhelming for existing custom projects...

James mentionned that "the schema location at compound-widgets.xsd is relative to the project...". I don't see any problems with that. We can keep as is as long as we maintain the relation (ie if the main XSDs are moved). Moreover with the previous addition of compound-widgets.xsd in widget-catalog.xml it seems all things work correctly (eg w/o the new *-ns.xsd yet committed, the auto-completion works well in ExampleCompoundWidgets.xml




git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1746302 13f79535-47bb-0310-9956-ffa450edef68
2016-05-31 16:48:09 +00:00
Deepak Dixit 64d804e2e1 (OFBIZ-7141) Updated apache fop to 2.1 and also updated xmlgraphics-commons to 2.1.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1746270 13f79535-47bb-0310-9956-ffa450edef68
2016-05-31 12:49:12 +00:00
Jacques Le Roux 06245c53ae A fix for "Use only HTTPS in OFBiz" - https://issues.apache.org/jira/browse/OFBIZ-6849
The tests did not pass because of xmlrpc. Simply adding it in http.request-map.list in url.properties and like for SOAPService request setting <security https="false"/> does it.

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1746254 13f79535-47bb-0310-9956-ffa450edef68
2016-05-31 08:39:07 +00:00
Taher A. Alkhateeb e8b73f703f related to r1746236 on OFBIZ-6783 to delete extra files forgotten
The patch that I provided only emptied the files when they should be
deleted. This removes them completely


git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1746239 13f79535-47bb-0310-9956-ffa450edef68
2016-05-31 06:56:21 +00:00
Taher A. Alkhateeb ca819dda9d Remove cobertura and sonar completely. Ref OFBIZ-6783
After getting consensus from the community in the email thread below
we agreed to remove these two items because they make the startup
logic more complex and also because many things are broken and 
unmaintained for years.

It is a good idea to reintroduce cobertura in the future on a cleaner
implementation, hopefully completely away from the start component and
perhaps as a container implementation.

The email thread:
http://ofbiz.markmail.org/message/b4jovfhurczunbam?q=remove+cobertura

The related JIRA:
https://issues.apache.org/jira/browse/OFBIZ-6783


git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1746236 13f79535-47bb-0310-9956-ffa450edef68
2016-05-31 06:43:11 +00:00
Arun Patidar fbe2dfb9d2 [OFBIZ-7140] Added Fetch Log Functionality parallel to View Log in webtools. Thanks Rishi Solanki for new feature and patch.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1746227 13f79535-47bb-0310-9956-ffa450edef68
2016-05-31 05:26:43 +00:00
Jacques Le Roux 7531712225 A fix for "Use only HTTPS in OFBiz" - https://issues.apache.org/jira/browse/OFBIZ-6849
I just realised that the main change (the one in ConfigXMLReader.java, exposed in a comment in OFBIZ-6849) was not committed in r1745525. I guess it was because of tests I did for OFBIZ-4090, I certainly removed these changes then and forgot to put them back.

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1746159 13f79535-47bb-0310-9956-ffa450edef68
2016-05-30 17:40:10 +00:00
Pranay Pandey 681ebea533 [OFBIZ-7130] Applied patch from the ticket to fix error on console when navigating to update party email address view.
This error occurs due to the code used for dependent drop down for country and state. At party email address update page, no dependent drop down used, so js code triggering the request with empty countryGeoId and generating console error. Added check in code that if drop down field is not present on page then no need to observe it for the change. 

Thanks Amardeep Singh Jhajj for reporting the issue and providing patch.

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1746130 13f79535-47bb-0310-9956-ffa450edef68
2016-05-30 13:34:35 +00:00
Nicolas Malin ab92393570 Add xls screen renderer to convert a screen definition like an html flow directly ready by a spreadsheet application
In addition, add an export example button on FindExample screen and add complete macro ftl renderer unit test. Issue OFBIZ-6931 proposed by Leila Mekika. Thanks to her, jacques and pierre for theirs remarks.

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1746045 13f79535-47bb-0310-9956-ffa450edef68
2016-05-29 18:38:26 +00:00
Jacques Le Roux c048e9c85a Ugrades PDFBox to 1.8.12 (or 2.0.1?) due to vulnerability - https://issues.apache.org/jira/browse/OFBIZ-7136
See CVE-2016-2175: Apache PDFBox XML External Entity vulnerability

I did not try to update to version 2.0.1. 
I only tested by using https://localhost:8443/example/control/ExampleReportPdfOptions?exampleId=EX01 but I got nothing, so I tried with R15.12 before backporting with the same issue so I guess it's unrelated with this update moreover with both branches I get an error in log for the barcode PDF I will open a Jira

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1745751 13f79535-47bb-0310-9956-ffa450edef68
2016-05-27 13:12:55 +00:00
Jacques Le Roux 7df0fcda3a Fixes "Use only HTTPS in OFBiz" - https://issues.apache.org/jira/browse/OFBIZ-6849
Quoting Deepak on dev ML

Hi Jacques,

I think in fop.xconf file we have to keep http url, as FOP does not support
https baseUrl for external graphics due to certificate issue (not remember
exact reason).

{code}
 <!-- Base URL for resolving relative URLs -->
-  <base>http://localhost:8080</base>
+  <base>https://localhost:8443</base>
{code}

If we set the https as <base> than images will not be rendered. Please
refer
http://demo-trunk-ofbiz.apache.org/ordermgr/control/order.pdf?orderId=DEMO10091

and we get following error on console:
{code}

     [java] 2016-05-27 13:51:48,308 |http-nio-8443-exec-3 |FOUserAgent
              |E| Image not found. URI: /images/ofbiz_logo.gif. (No context
info available)

{code}
If we set the http url than its working fine.


git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1745732 13f79535-47bb-0310-9956-ffa450edef68
2016-05-27 09:52:51 +00:00
Taher A. Alkhateeb 741ac838cc move validation logic to its correct place in StartupCommandUtil OFBIZ-6783
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1745584 13f79535-47bb-0310-9956-ffa450edef68
2016-05-26 09:33:46 +00:00
Deepak Dixit f1fd6b0b44 (OFBIZ-6810) Fixed typo on tempExprMaint.ftl file name. Thanks Vaibhav Jain for reporting the issue.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1745559 13f79535-47bb-0310-9956-ffa450edef68
2016-05-26 05:33:25 +00:00