Re: svn commit: r1746045 - in /ofbiz/trunk: framework/common/config/ framework/common/template/includes/ framework/common/webcommon/WEB-INF/ framework/common/widget/ framework/webtools/webapp/webtools
Hi Nicolas, The example list and the webtools layout work well But the "View as spreadsheet" at https://localhost:8443/example/control/EditExample?exampleId=EX01 renders only HTML at https://localhost:8443/example/control/ExampleReportXls?exampleId=EX01 Normal? Jacques Le 29/05/2016 à 20:38, nma...@apache.org a écrit : Author: nmalin Date: Sun May 29 18:38:26 2016 New Revision: 1746045 URL: http://svn.apache.org/viewvc?rev=1746045=rev Log: 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. Added: ofbiz/trunk/framework/common/template/includes/Simple.xls.ftl (with props) ofbiz/trunk/framework/widget/templates/xlsFormMacroLibrary.ftl (with props) ofbiz/trunk/framework/widget/templates/xlsScreenMacroLibrary.ftl (with props) ofbiz/trunk/framework/widget/templates/xlsTreeMacroLibrary.ftl (with props) Modified: ofbiz/trunk/framework/common/config/CommonUiLabels.xml ofbiz/trunk/framework/common/webcommon/WEB-INF/handlers-controller.xml ofbiz/trunk/framework/common/widget/CommonScreens.xml ofbiz/trunk/framework/webtools/webapp/webtools/WEB-INF/controller.xml ofbiz/trunk/framework/webtools/widget/Menus.xml ofbiz/trunk/framework/widget/config/widget.properties ofbiz/trunk/framework/widget/dtd/widget-screen.xsd ofbiz/trunk/framework/widget/src/org/ofbiz/widget/model/ModelScreenWidget.java ofbiz/trunk/framework/widget/src/org/ofbiz/widget/test/WidgetMacroLibraryTests.java ofbiz/trunk/specialpurpose/example/webapp/example/WEB-INF/controller.xml ofbiz/trunk/specialpurpose/example/widget/example/CommonScreens.xml ofbiz/trunk/specialpurpose/example/widget/example/ExampleForms.xml ofbiz/trunk/specialpurpose/example/widget/example/ExampleScreens.xml Modified: ofbiz/trunk/framework/common/config/CommonUiLabels.xml URL: http://svn.apache.org/viewvc/ofbiz/trunk/framework/common/config/CommonUiLabels.xml?rev=1746045=1746044=1746045=diff == --- ofbiz/trunk/framework/common/config/CommonUiLabels.xml (original) +++ ofbiz/trunk/framework/common/config/CommonUiLabels.xml Sun May 29 18:38:26 2016 @@ -12556,6 +12556,10 @@ Voir en xml æXMLæ ¼å¼æµè§ + +View as spreadsheet +Voir en tableur + ت٠Øظر اÙدخÙ٠عÙÙ Ùذ٠اÙصÙØØ© Zugriff auf diese Sicht wurde blockiert. Added: ofbiz/trunk/framework/common/template/includes/Simple.xls.ftl URL: http://svn.apache.org/viewvc/ofbiz/trunk/framework/common/template/includes/Simple.xls.ftl?rev=1746045=auto == --- ofbiz/trunk/framework/common/template/includes/Simple.xls.ftl (added) +++ ofbiz/trunk/framework/common/template/includes/Simple.xls.ftl Sun May 29 18:38:26 2016 @@ -0,0 +1,40 @@ +<#-- +Licensed to the Apache Software Foundation (ASF) under one +or more contributor license agreements. See the NOTICE file +distributed with this work for additional information +regarding copyright ownership. The ASF licenses this file +to you under the Apache License, Version 2.0 (the +"License"); you may not use this file except in compliance +with the License. You may obtain a copy of the License at + +http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, +software distributed under the License is distributed on an +"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +KIND, either express or implied. See the License for the +specific language governing permissions and limitations +under the License. +--> + +<#assign docLangAttr = locale.toString()?replace("_", "-")> +<#assign langDir = "ltr"> +<#if "ar.iw"?contains(docLangAttr?substring(0, 2))><#assign langDir = "rtl"> + +http://www.w3.org/1999/xhtml;> + + + + + + +.txf {mso-number-format:\@} <#-- Text format--> +.cf {mso-number-format:"\#\#0.00"} <#-- currency format--> +.nf {mso-number-format:"0.00"} <#-- number format--> +.tf {mso-number-format:"HH:mm:ss"} <#-- time format--> +.df {mso-number-format:"-MM-dd"} <#-- date format--> +.dtf {mso-number-format:"-MM-dd HH:mm:ss"} <#-- date-time format--> + +${sections.render("body")} + + Propchange: ofbiz/trunk/framework/common/template/includes/Simple.xls.ftl -- svn:eol-style = native Propchange: ofbiz/trunk/framework/common/template/includes/Simple.xls.ftl -- svn:keywords = Date Rev Author
[jira] [Closed] (OFBIZ-6931) Add XLS renderer
[ https://issues.apache.org/jira/browse/OFBIZ-6931?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Nicolas Malin closed OFBIZ-6931. Resolution: Implemented Fix Version/s: Upcoming Branch Ok It's commited at revision 1746045 on trunk > Add XLS renderer > > > Key: OFBIZ-6931 > URL: https://issues.apache.org/jira/browse/OFBIZ-6931 > Project: OFBiz > Issue Type: New Feature > Components: ALL COMPONENTS, framework >Affects Versions: Trunk >Reporter: Leila Mekika >Assignee: Nicolas Malin >Priority: Minor > Fix For: Upcoming Branch > > Attachments: OFBIZ-6931.patch, OFBIZ-6931.patch, Sélection_154.png, > xls-renderer.patch > > > Add a new renderer type in order to enable XLS file output. -- This message was sent by Atlassian JIRA (v6.3.4#6332)
[jira] [Commented] (OFBIZ-7104) CMS throws error on clicking Find button
[ https://issues.apache.org/jira/browse/OFBIZ-7104?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15305919#comment-15305919 ] james yong commented on OFBIZ-7104: --- I agree with [~nj] that the error message can be more user-friendly i.e. the FileNotFoundException handler at "specialpurpose/lucene/webapp/content/WEB-INF/actions/Search.groovy" can be improved. > CMS throws error on clicking Find button > > > Key: OFBIZ-7104 > URL: https://issues.apache.org/jira/browse/OFBIZ-7104 > Project: OFBiz > Issue Type: Bug > Components: content >Affects Versions: Trunk >Reporter: Nameet Jain >Priority: Minor > Attachments: OFBizContentManagerCMSSearchPage.png > > > Steps to regenerate > 1. Open the content app > 2. Click the CMS tab or user the link >https://localhost:8443/content/control/CMSContentFind > 3. Click in Find tab or use link > https://localhost:8443/content/control/AdminSearch -- This message was sent by Atlassian JIRA (v6.3.4#6332)
Re: Custom ClassLoader in OFBiz
Hi Jacques, Thank you very much for the research, excellent resources indeed. I doubt the classloader is used for something similar to tomcat. Tomcat uses the classloader to dynamically load the webapps. In OFBiz, everything kickstarts from the beginning and you cannot enable a component at runtime. I actually think I get it now. It has nothing to do with dynamic loading of the components, it's just a dynamic loading of the classpath for the libraries that are chugging along with every component. It is this specific code in StartupControlPanel.createClassLoader(...) NativeLibClassLoader classloader = new NativeLibClassLoader(classPath.getUrls(), parent); classloader.addNativeClassPath(System.getProperty("java.library.path")); for (File folder : classPath.getNativeFolders()) { classloader.addNativeClassPath(folder); } I see a word screaming in my face right now! OSGi. Implementing something like that means we can be 100% dynamic in loading our components, and their dependencies can also be dynamic, and we offset all the classloading headache. What this means is that many of the problems we currently face in ofbiz will go away (e.g. disabling specialpurpose components stops testing them). This also means we put real boundaries on components and disable all unintentional entanglements, AND it also means we can have a real "plugin" system for the components (a user can install a new component with his mouse!) I don't know if I'm going crazy with this, but it seems like a fundamental solution to the current set of dependency problems we have, and it can be done slowly and gradually while refactoring, and most of the work is in the Start and Base components. I know there were attempts in the past like: http://ofbiz.135035.n4.nabble.com/OSGi-based-OFBiz-framework-td1929599.html and https://sourceforge.net/projects/ofbiz-osgi/ But the implementation I'm thinking of is different in that each component is a bundle, not the whole framework. What do you think? Taher Alkhateeb On Sun, May 29, 2016 at 2:25 PM, Jacques Le Roux < jacques.le.r...@les7arts.com> wrote: > > > Le 28/05/2016 à 11:57, Taher Alkhateeb a écrit : > >> Hi Everyone, >> >> This is a question for advanced developers. I notice that OFBiz uses a >> custom class loader called NativeLibClassLoader which extends >> URLClassLoader from the JDK >> >> There is a comment in the class which mentions that the "class is >> necessary >> because the bootstrap ClassLoader caches the native library path - so any >> changes to the library path are ignored (changes that might have been made >> by loading OFBiz components)" >> >> I don't quite understand what is meant by that even after digging into the >> related classes. It seems like the design is saying that hey, we might >> load >> components dynamically and therefore, we will keep their effects in this >> field -> "CopyOnWriteArrayList libPaths" >> >> However, as far as I understand, ofbiz does not load libraries or >> components dynamically, they either load or not on start, and you cannot >> call start twice as that would shoot an exception. >> >> I guess my question is: Why does ofbiz have a custom ClassLoader? Why >> bypassing the bootstrapping loader and even then, why not use one of the >> standard JDK implementations in the ClassLoader hierarchy. >> >> I really appreciate your insights on this. >> >> Taher Alkhateeb >> >> > Hi Taher, > > As you may know this was introduced by Adrian > at http://svn.apache.org/viewvc?view=revision=1676746 > for https://issues.apache.org/jira/browse/OFBIZ-6268 > after an effort by Jacopo at > https://issues.apache.org/jira/browse/OFBIZ-5768 > > Maybe this was done for something like > > https://stackoverflow.com/questions/15635039/how-to-handle-shared-native-library-in-multiple-web-applications-on-tomcat > where another way of doing it in the Tomcat context is suggested > I did not dig further today, but I note this link here for myself > http://tomcat.apache.org/tomcat-8.0-doc/class-loader-howto.html > > Adrian also introduced InstrumentingClassLoader class then. It's related > with Cobertura. But as Adrian said he was unable to have it working. > > HTH > > Jacques > >
Re: Custom ClassLoader in OFBiz
Le 28/05/2016 à 11:57, Taher Alkhateeb a écrit : Hi Everyone, This is a question for advanced developers. I notice that OFBiz uses a custom class loader called NativeLibClassLoader which extends URLClassLoader from the JDK There is a comment in the class which mentions that the "class is necessary because the bootstrap ClassLoader caches the native library path - so any changes to the library path are ignored (changes that might have been made by loading OFBiz components)" I don't quite understand what is meant by that even after digging into the related classes. It seems like the design is saying that hey, we might load components dynamically and therefore, we will keep their effects in this field -> "CopyOnWriteArrayList libPaths" However, as far as I understand, ofbiz does not load libraries or components dynamically, they either load or not on start, and you cannot call start twice as that would shoot an exception. I guess my question is: Why does ofbiz have a custom ClassLoader? Why bypassing the bootstrapping loader and even then, why not use one of the standard JDK implementations in the ClassLoader hierarchy. I really appreciate your insights on this. Taher Alkhateeb Hi Taher, As you may know this was introduced by Adrian at http://svn.apache.org/viewvc?view=revision=1676746 for https://issues.apache.org/jira/browse/OFBIZ-6268 after an effort by Jacopo at https://issues.apache.org/jira/browse/OFBIZ-5768 Maybe this was done for something like https://stackoverflow.com/questions/15635039/how-to-handle-shared-native-library-in-multiple-web-applications-on-tomcat where another way of doing it in the Tomcat context is suggested I did not dig further today, but I note this link here for myself http://tomcat.apache.org/tomcat-8.0-doc/class-loader-howto.html Adrian also introduced InstrumentingClassLoader class then. It's related with Cobertura. But as Adrian said he was unable to have it working. HTH Jacques
[jira] [Updated] (OFBIZ-7061) Autocompletion for Compound Widget
[ https://issues.apache.org/jira/browse/OFBIZ-7061?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] james yong updated OFBIZ-7061: -- Attachment: OFBIZ-7061.patch Note that for the given patch, the schema location at compound-widgets.xsd is relative to the project for testing purposes. Also the same for ExampleCompoundWidgets.xml > Autocompletion for Compound Widget > -- > > Key: OFBIZ-7061 > URL: https://issues.apache.org/jira/browse/OFBIZ-7061 > Project: OFBiz > Issue Type: Improvement > Components: framework >Affects Versions: Trunk >Reporter: james yong >Assignee: james yong >Priority: Minor > Attachments: OFBIZ-7061.patch > > > I am trying to enable auto-completion when coding compound widget. > My plan as follows: > 1. The following xsd will be modified to use namespace > site-conf.xsd > widget-form.xsd > widget-screen.xsd > widget-menu.xsd > simple-methods.xsd > For example, in site-conf.xsd, we add the following document level attribute > {code} > xmlns="http://ofbiz.apache.org/sc; > targetNamespace="http://ofbiz.apache.org/sc; > {code} > 2. Import the above schema 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 > {code} > http://www.w3.org/2001/XMLSchema-instance; > xmlns:sc="http://ofbiz.apache.org/sc; > xmlns:m="http://ofbiz.apache.org/m; > xmlns:s="http://ofbiz.apache.org/s; > xmlns:f="http://ofbiz.apache.org/f; > xmlns:sm="http://ofbiz.apache.org/sm; > > xsi:noNamespaceSchemaLocation="http://ofbiz.apache.org/dtds/compound-widgets.xsd;> > > > > path="component://example/widget/example/ExampleCompoundWidgets.xml"/> > > > auth="true"/> value="CompoundWidgets2"/> > > page="component://example/widget/example/ExampleCompoundWidgets.xml#CompoundWidgets1"/> > page="component://example/widget/example/ExampleCompoundWidgets.xml#CompoundWidgets2"/> > > .. the rest > {code} > 4. Change java code to support reading xml with namespace (i.e. xml for > compound widgets) > 5. Update the attributes at document level for rest of the controllers, > menus, forms, simple methods and screens. Current setting will not work for > schema with a namespace. For example, in controller.xml, we will change > {code} > xsi:noNamespaceSchemaLocation="http://ofbiz.apache.org/dtds/site-conf.xsd” > {code} > to > {code} > xmlns="http://ofbiz.apache.org/sc” > xsi:schemaLocation="http://ofbiz.apache.org/dtds/site-conf-ns.xsd”> > {code} -- This message was sent by Atlassian JIRA (v6.3.4#6332)
[jira] [Commented] (OFBIZ-7061) Autocompletion for Compound Widget
[ https://issues.apache.org/jira/browse/OFBIZ-7061?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15305844#comment-15305844 ] james yong commented on OFBIZ-7061: --- Hi [~jacques.le.roux], I agree with your points regarding the naming of the targetNamespace. Will also leave out step 5. > Autocompletion for Compound Widget > -- > > Key: OFBIZ-7061 > URL: https://issues.apache.org/jira/browse/OFBIZ-7061 > Project: OFBiz > Issue Type: Improvement > Components: framework >Affects Versions: Trunk >Reporter: james yong >Assignee: james yong >Priority: Minor > > I am trying to enable auto-completion when coding compound widget. > My plan as follows: > 1. The following xsd will be modified to use namespace > site-conf.xsd > widget-form.xsd > widget-screen.xsd > widget-menu.xsd > simple-methods.xsd > For example, in site-conf.xsd, we add the following document level attribute > {code} > xmlns="http://ofbiz.apache.org/sc; > targetNamespace="http://ofbiz.apache.org/sc; > {code} > 2. Import the above schema 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 > {code} > http://www.w3.org/2001/XMLSchema-instance; > xmlns:sc="http://ofbiz.apache.org/sc; > xmlns:m="http://ofbiz.apache.org/m; > xmlns:s="http://ofbiz.apache.org/s; > xmlns:f="http://ofbiz.apache.org/f; > xmlns:sm="http://ofbiz.apache.org/sm; > > xsi:noNamespaceSchemaLocation="http://ofbiz.apache.org/dtds/compound-widgets.xsd;> > > > > path="component://example/widget/example/ExampleCompoundWidgets.xml"/> > > > auth="true"/> value="CompoundWidgets2"/> > > page="component://example/widget/example/ExampleCompoundWidgets.xml#CompoundWidgets1"/> > page="component://example/widget/example/ExampleCompoundWidgets.xml#CompoundWidgets2"/> > > .. the rest > {code} > 4. Change java code to support reading xml with namespace (i.e. xml for > compound widgets) > 5. Update the attributes at document level for rest of the controllers, > menus, forms, simple methods and screens. Current setting will not work for > schema with a namespace. For example, in controller.xml, we will change > {code} > xsi:noNamespaceSchemaLocation="http://ofbiz.apache.org/dtds/site-conf.xsd” > {code} > to > {code} > xmlns="http://ofbiz.apache.org/sc” > xsi:schemaLocation="http://ofbiz.apache.org/dtds/site-conf-ns.xsd”> > {code} -- This message was sent by Atlassian JIRA (v6.3.4#6332)