Details

    • Type: Sub-task
    • Status: Closed
    • Priority: Major
    • Resolution: Implemented
    • Affects Version/s: None
    • Fix Version/s: Upcoming Release
    • Component/s: framework
    • Labels:
      None

      Description

      A first task to UI Improvement would be create a common that receive the existent code.

      The benefice would be have a framework/common who list all screens that available for theme surcharge, so without technology information (css/html or something like that)

      Different task to do :

      • move all ftl template from framework/common to themes/common
      • move framework/images to themes/common (this directory contains unlogical element for theme but will be manage at a second time)
      • move default macro ftl template from framework/widget to themes/common

      After the realization on this task, all current themes call theme/common for html rendering instead of framework/common, framework/images and framework/widget. Just pave the way for the next

      1. common-theme-macro.svg
        25 kB
        Nicolas Malin
      2. common-theme-screen.svg
        28 kB
        Nicolas Malin

        Issue Links

          Activity

          Hide
          jacques.le.roux Jacques Le Roux added a comment -

          When I'll get some time I'll do a kinda SVN bisect (ie by hand) to find where the issues were introduced.

          Show
          jacques.le.roux Jacques Le Roux added a comment - When I'll get some time I'll do a kinda SVN bisect (ie by hand) to find where the issues were introduced.
          Hide
          jacques.le.roux Jacques Le Roux added a comment - - edited

          Ha another one is that you can't select a line in autocomplete list (anyone) see OFBIZ-9657. Both cases works at r1806036 (tested locally where OFBIZ-9645 does not work in trunk HEAD)

          Show
          jacques.le.roux Jacques Le Roux added a comment - - edited Ha another one is that you can't select a line in autocomplete list (anyone) see OFBIZ-9657 . Both cases works at r1806036 (tested locally where OFBIZ-9645 does not work in trunk HEAD)
          Hide
          tzngvi Wei Zhang added a comment -

          Sorry, Nicolas. I posted it in wrong issue. I am going to delete my comments.

          Show
          tzngvi Wei Zhang added a comment - Sorry, Nicolas. I posted it in wrong issue. I am going to delete my comments.
          Hide
          jacques.le.roux Jacques Le Roux added a comment - - edited

          BTW I will do a check out of https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk at the revision just before (r1806036) to check for OFBIZ-9645

          Show
          jacques.le.roux Jacques Le Roux added a comment - - edited BTW I will do a check out of https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk at the revision just before (r1806036) to check for OFBIZ-9645
          Hide
          jacques.le.roux Jacques Le Roux added a comment -

          Hi Wei Zhang,

          If you are sure it's a bug introduced by this new feature (you need to prove it), it's better to create a new Jira issue, to mark it as broken by the current one (OFBIZ-9138) and maybe to notice here (done already if you can prove it ).

          Else we will have few follow-ups mixed here. For instance, it's maybe the same for OFBIZ-9645 (unsure, I was not able to revert just before the switch to common-theme to check it was working just before) and it's possible that we will notice some others.

          Thanks

          Show
          jacques.le.roux Jacques Le Roux added a comment - Hi Wei Zhang, If you are sure it's a bug introduced by this new feature (you need to prove it), it's better to create a new Jira issue, to mark it as broken by the current one ( OFBIZ-9138 ) and maybe to notice here (done already if you can prove it ). Else we will have few follow-ups mixed here. For instance, it's maybe the same for OFBIZ-9645 (unsure, I was not able to revert just before the switch to common-theme to check it was working just before) and it's possible that we will notice some others. Thanks
          Hide
          soledad Nicolas Malin added a comment - - edited

          Hello Wei, can you explain me what is this code and what the relation with the common-theme ?

          Because if I check the entity view :

          ~/workspace/apache-svn/ofbiz-trunk
          nemo$ grep ExampleTypeView * -R
          ~/workspace/apache-svn/ofbiz-trunk
          nemo$ cd ../ofbiz-plugins/
          ~/workspace/apache-svn/ofbiz-plugins
          nemo$ grep ExampleTypeView * -R
          ~/workspace/apache-svn/ofbiz-plugins
          

          So I have no idea this the error

          Show
          soledad Nicolas Malin added a comment - - edited Hello Wei, can you explain me what is this code and what the relation with the common-theme ? Because if I check the entity view : ~/workspace/apache-svn/ofbiz-trunk nemo$ grep ExampleTypeView * -R ~/workspace/apache-svn/ofbiz-trunk nemo$ cd ../ofbiz-plugins/ ~/workspace/apache-svn/ofbiz-plugins nemo$ grep ExampleTypeView * -R ~/workspace/apache-svn/ofbiz-plugins So I have no idea this the error
          Hide
          soledad Nicolas Malin added a comment -

          Ok I close this issue, this step is now on trunk thanks all for your feedback and your correction

          Show
          soledad Nicolas Malin added a comment - Ok I close this issue, this step is now on trunk thanks all for your feedback and your correction
          Hide
          deepak.dixit Deepak Dixit added a comment -

          Yes we can close this issue.

          Show
          deepak.dixit Deepak Dixit added a comment - Yes we can close this issue.
          Hide
          soledad Nicolas Malin added a comment -

          Jacques Le Roux oh oh, thanks to scrum test I forgot the Email services. I correct it on trunk at 1806237 and found two other forgot on plugin components birt and example, correct it at 1806238

          Deepak Dixit nice correction, but you removed my spin wait as subliminal remember to Julien that I wait a minimal css for the common theme ^^. But no worries we keep it like that.

          If you are ok, I close this issue to open the next steps

          Show
          soledad Nicolas Malin added a comment - Jacques Le Roux oh oh, thanks to scrum test I forgot the Email services. I correct it on trunk at 1806237 and found two other forgot on plugin components birt and example, correct it at 1806238 Deepak Dixit nice correction, but you removed my spin wait as subliminal remember to Julien that I wait a minimal css for the common theme ^^. But no worries we keep it like that. If you are ok, I close this issue to open the next steps
          Hide
          deepak.dixit Deepak Dixit added a comment - - edited

          Fixed COMMON theme id display issue, removed the visualThemeSetId from COMMON theme at r#1806216

          Show
          deepak.dixit Deepak Dixit added a comment - - edited Fixed COMMON theme id display issue, removed the visualThemeSetId from COMMON theme at r#1806216
          Hide
          deepak.dixit Deepak Dixit added a comment -

          Need to hide COMMON theme id from set visual theme popup.

          Show
          deepak.dixit Deepak Dixit added a comment - Need to hide COMMON theme id from set visual theme popup.
          Hide
          jacques.le.roux Jacques Le Roux added a comment -

          Thanks Nicolas,

          This is quite an achievement!

          Just that we have an issue with scrum tests https://ci.apache.org/projects/ofbiz/logs/trunk/html/ I checked locally it's the same.
          We know the scrum does not always follow the best practices, so it could be that we need to improve the code or even the tests there...

          Show
          jacques.le.roux Jacques Le Roux added a comment - Thanks Nicolas, This is quite an achievement! Just that we have an issue with scrum tests https://ci.apache.org/projects/ofbiz/logs/trunk/html/ I checked locally it's the same. We know the scrum does not always follow the best practices, so it could be that we need to improve the code or even the tests there...
          Hide
          soledad Nicolas Malin added a comment -

          Ok I finalized the commits serie :
          1806134 : load VisualTheme and ModelTheme on different session and context
          1806137, 180614[0-9] : Migrate themes, common screens, handler to exploit values from the theme definition
          1806150 : migrate all other screen and scripts to exploit values from the theme definition
          180615 : improve error message and announce the commit end

          Show
          soledad Nicolas Malin added a comment - Ok I finalized the commits serie : 1806134 : load VisualTheme and ModelTheme on different session and context 1806137, 180614 [0-9] : Migrate themes, common screens, handler to exploit values from the theme definition 1806150 : migrate all other screen and scripts to exploit values from the theme definition 180615 : improve error message and announce the commit end
          Hide
          soledad Nicolas Malin added a comment -

          Sure Deepak, I continue the work I think it will be correct it

          Show
          soledad Nicolas Malin added a comment - Sure Deepak, I continue the work I think it will be correct it
          Hide
          deepak.dixit Deepak Dixit added a comment -

          Hi Nicolas Malin,

          Please have a look at OFBIZ-9622, I think this is broken due to recent change.

          2017-08-25 12:01:17,506 |jsse-nio-8443-exec-4 |ModelScreenWidget |W| In decorator-section-include could not find sections object in the context, not rendering section with name [pre-body]
          2017-08-25 12:01:17,513 |jsse-nio-8443-exec-4 |ModelScreen |E| Error rendering screen component://common-theme/widget/CommonScreens.xml#GlobalDecorator: java.lang.NullPointerException. Rolling back transaction.

          Show
          deepak.dixit Deepak Dixit added a comment - Hi Nicolas Malin , Please have a look at OFBIZ-9622 , I think this is broken due to recent change. 2017-08-25 12:01:17,506 |jsse-nio-8443-exec-4 |ModelScreenWidget |W| In decorator-section-include could not find sections object in the context, not rendering section with name [pre-body] 2017-08-25 12:01:17,513 |jsse-nio-8443-exec-4 |ModelScreen |E| Error rendering screen component://common-theme/widget/CommonScreens.xml#GlobalDecorator: java.lang.NullPointerException. Rolling back transaction.
          Hide
          jacques.le.roux Jacques Le Roux added a comment -

          Oops forgot that step, no issues with it

          Show
          jacques.le.roux Jacques Le Roux added a comment - Oops forgot that step, no issues with it
          Hide
          soledad Nicolas Malin added a comment -

          Hi Jacques, do you have already the problem after a "./gradlew loadAll" ?

          Show
          soledad Nicolas Malin added a comment - Hi Jacques, do you have already the problem after a "./gradlew loadAll" ?
          Hide
          jacques.le.roux Jacques Le Roux added a comment -

          Hi Nicolas,

          Got this error in log (UI OK), I quickly tried to understand (the file is in themes/common/template/includes/Messages.ftl) but did not get it yet

          2017-08-25 09:07:06,563 |jsse-nio-8443-exec-8 |HtmlWidget                    |E| Error rendering included template at location [component://common/template/includes/Messages.ftl]: freemarker.template.Template
          NotFoundException: Template not found for name "component://common/template/includes/Messages.ftl".
          The name was interpreted by this TemplateLoader: MultiTemplateLoader(loader1 = org.apache.ofbiz.base.util.template.FreeMarkerWorker$FlexibleTemplateLoader@6504430a, loader2 = StringTemplateLoader(Map { })).
          freemarker.template.TemplateNotFoundException: Template not found for name "component://common/template/includes/Messages.ftl".
          The name was interpreted by this TemplateLoader: MultiTemplateLoader(loader1 = org.apache.ofbiz.base.util.template.FreeMarkerWorker$FlexibleTemplateLoader@6504430a, loader2 = StringTemplateLoader(Map { })).
           at freemarker.template.Configuration.getTemplate(Configuration.java:2485) ~[freemarker-2.3.25-incubating.jar:2.3.25]
             at freemarker.template.Configuration.getTemplate(Configuration.java:2287) ~[freemarker-2.3.25-incubating.jar:2.3.25]
             at org.apache.ofbiz.base.util.template.FreeMarkerWorker.getTemplate(FreeMarkerWorker.java:259) ~[ofbiz.jar:?]
            at org.apache.ofbiz.widget.model.HtmlWidget.renderHtmlTemplate(HtmlWidget.java:164) [ofbiz.jar:?]
                at org.apache.ofbiz.widget.model.HtmlWidget$HtmlTemplate.renderWidgetString(HtmlWidget.java:215) [ofbiz.jar:?]
           at org.apache.ofbiz.widget.model.HtmlWidget.renderWidgetString(HtmlWidget.java:140) [ofbiz.jar:?]
                at org.apache.ofbiz.widget.model.ModelScreenWidget$PlatformSpecific.renderWidgetString(ModelScreenWidget.java:1321) [ofbiz.jar:?]
                at org.apache.ofbiz.widget.model.ModelScreenWidget.renderSubWidgetsString(ModelScreenWidget.java:98) [ofbiz.jar:?]
               at org.apache.ofbiz.widget.model.ModelScreenWidget$Section.renderWidgetString(ModelScreenWidget.java:280) [ofbiz.jar:?]
                  at org.apache.ofbiz.widget.model.ModelScreen.renderScreenString(ModelScreen.java:164) [ofbiz.jar:?]
              at org.apache.ofbiz.widget.model.ScreenFactory.renderReferencedScreen(ScreenFactory.java:214) [ofbiz.jar:?]
              at org.apache.ofbiz.widget.model.ModelScreenWidget$IncludeScreen.renderWidgetString(ModelScreenWidget.java:780) [ofbiz.jar:?]
            at org.apache.ofbiz.widget.model.ModelScreenWidget.renderSubWidgetsString(ModelScreenWidget.java:98) [ofbiz.jar:?]
               at org.apache.ofbiz.widget.model.ModelScreenWidget$Section.renderWidgetString(ModelScreenWidget.java:280) [ofbiz.jar:?]
                  at org.apache.ofbiz.widget.model.ModelScreen.renderScreenString(ModelScreen.java:164) [ofbiz.jar:?]
              at org.apache.ofbiz.widget.model.ScreenFactory.renderReferencedScreen(ScreenFactory.java:214) [ofbiz.jar:?]
              at org.apache.ofbiz.widget.model.ModelScreenWidget$IncludeScreen.renderWidgetString(ModelScreenWidget.java:780) [ofbiz.jar:?]
            at org.apache.ofbiz.widget.model.ModelScreenWidget.renderSubWidgetsString(ModelScreenWidget.java:98) [ofbiz.jar:?]
               at org.apache.ofbiz.widget.model.ModelScreenWidget$Section.renderWidgetString(ModelScreenWidget.java:280) [ofbiz.jar:?]
                  at org.apache.ofbiz.widget.model.ModelScreen.renderScreenString(ModelScreen.java:164) [ofbiz.jar:?]
              at org.apache.ofbiz.widget.model.ScreenFactory.renderReferencedScreen(ScreenFactory.java:214) [ofbiz.jar:?]
              at org.apache.ofbiz.widget.model.ModelScreenWidget$IncludeScreen.renderWidgetString(ModelScreenWidget.java:780) [ofbiz.jar:?]
            at org.apache.ofbiz.widget.model.ModelScreenWidget.renderSubWidgetsString(ModelScreenWidget.java:98) [ofbiz.jar:?]
               at org.apache.ofbiz.widget.model.ModelScreenWidget$Section.renderWidgetString(ModelScreenWidget.java:280) [ofbiz.jar:?]
                  at org.apache.ofbiz.widget.model.ModelScreen.renderScreenString(ModelScreen.java:164) [ofbiz.jar:?]
              at org.apache.ofbiz.widget.model.ScreenFactory.renderReferencedScreen(ScreenFactory.java:214) [ofbiz.jar:?]
              at org.apache.ofbiz.widget.model.ModelScreenWidget$DecoratorScreen.renderWidgetString(ModelScreenWidget.java:860) [ofbiz.jar:?]
                  at org.apache.ofbiz.widget.model.ModelScreenWidget.renderSubWidgetsString(ModelScreenWidget.java:98) [ofbiz.jar:?]
               at org.apache.ofbiz.widget.model.ModelScreenWidget$Section.renderWidgetString(ModelScreenWidget.java:280) [ofbiz.jar:?]
                  at org.apache.ofbiz.widget.model.ModelScreen.renderScreenString(ModelScreen.java:164) [ofbiz.jar:?]
              at org.apache.ofbiz.widget.renderer.ScreenRenderer.render(ScreenRenderer.java:137) [ofbiz.jar:?]
                 at org.apache.ofbiz.widget.renderer.ScreenRenderer.render(ScreenRenderer.java:99) [ofbiz.jar:?]
                  at org.apache.ofbiz.widget.renderer.macro.MacroScreenViewHandler.render(MacroScreenViewHandler.java:157) [ofbiz.jar:?]
           at org.apache.ofbiz.webapp.control.RequestHandler.renderView(RequestHandler.java:981) [ofbiz.jar:?]
              at org.apache.ofbiz.webapp.control.RequestHandler.doRequest(RequestHandler.java:645) [ofbiz.jar:?]
               at org.apache.ofbiz.webapp.control.ControlServlet.doGet(ControlServlet.java:207) [ofbiz.jar:?]
           at javax.servlet.http.HttpServlet.service(HttpServlet.java:687) [javax.servlet-api-3.1.0.jar:3.1.0]
              at javax.servlet.http.HttpServlet.service(HttpServlet.java:790) [javax.servlet-api-3.1.0.jar:3.1.0]
              at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:231) [tomcat-catalina-8.5.16.jar:8.5.16]
                 at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166) [tomcat-catalina-8.5.16.jar:8.5.16]
                 at org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:52) [tomcat-embed-websocket-8.0.39.jar:8.0.39]
             at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193) [tomcat-catalina-8.5.16.jar:8.5.16]
                 at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166) [tomcat-catalina-8.5.16.jar:8.5.16]
                 at org.apache.ofbiz.webapp.control.ContextFilter.doFilter(ContextFilter.java:196) [ofbiz.jar:?]
                  at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193) [tomcat-catalina-8.5.16.jar:8.5.16]
                 at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166) [tomcat-catalina-8.5.16.jar:8.5.16]
                 at org.apache.ofbiz.webapp.control.ControlFilter.doFilter(ControlFilter.java:157) [ofbiz.jar:?]
                  at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193) [tomcat-catalina-8.5.16.jar:8.5.16]
                 at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166) [tomcat-catalina-8.5.16.jar:8.5.16]
                 at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:198) [tomcat-catalina-8.5.16.jar:8.5.16]
               at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:96) [tomcat-catalina-8.5.16.jar:8.5.16]
                at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:478) [tomcat-catalina-8.5.16.jar:8.5.16]
            at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:140) [tomcat-catalina-8.5.16.jar:8.5.16]
             at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:80) [tomcat-catalina-8.5.16.jar:8.5.16]
              at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:87) [tomcat-catalina-8.5.16.jar:8.5.16]
                  at org.apache.catalina.valves.AbstractAccessLogValve.invoke(AbstractAccessLogValve.java:624) [tomcat-catalina-8.5.16.jar:8.5.16]
                 at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:342) [tomcat-catalina-8.5.16.jar:8.5.16]
               at org.apache.coyote.http11.Http11Processor.service(Http11Processor.java:799) [tomcat-coyote-8.5.16.jar:8.5.16]
                  at org.apache.coyote.AbstractProcessorLight.process(AbstractProcessorLight.java:66) [tomcat-coyote-8.5.16.jar:8.5.16]
            at org.apache.coyote.AbstractProtocol$ConnectionHandler.process(AbstractProtocol.java:868) [tomcat-coyote-8.5.16.jar:8.5.16]
             at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.doRun(NioEndpoint.java:1455) [tomcat-coyote-8.5.16.jar:8.5.16]
                 at org.apache.tomcat.util.net.SocketProcessorBase.run(SocketProcessorBase.java:49) [tomcat-coyote-8.5.16.jar:8.5.16]
             at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142) [?:1.8.0_112]
                 at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617) [?:1.8.0_112]
                 at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61) [tomcat-util-8.5.16.jar:8.5.16]
            at java.lang.Thread.run(Thread.java:745) [?:1.8.0_112]
          
          Show
          jacques.le.roux Jacques Le Roux added a comment - Hi Nicolas, Got this error in log (UI OK), I quickly tried to understand (the file is in themes/common/template/includes/Messages.ftl) but did not get it yet 2017-08-25 09:07:06,563 |jsse-nio-8443-exec-8 |HtmlWidget |E| Error rendering included template at location [component: //common/template/includes/Messages.ftl]: freemarker.template.Template NotFoundException: Template not found for name "component: //common/template/includes/Messages.ftl" . The name was interpreted by this TemplateLoader: MultiTemplateLoader(loader1 = org.apache.ofbiz.base.util.template.FreeMarkerWorker$FlexibleTemplateLoader@6504430a, loader2 = StringTemplateLoader(Map { })). freemarker.template.TemplateNotFoundException: Template not found for name "component: //common/template/includes/Messages.ftl" . The name was interpreted by this TemplateLoader: MultiTemplateLoader(loader1 = org.apache.ofbiz.base.util.template.FreeMarkerWorker$FlexibleTemplateLoader@6504430a, loader2 = StringTemplateLoader(Map { })). at freemarker.template.Configuration.getTemplate(Configuration.java:2485) ~[freemarker-2.3.25-incubating.jar:2.3.25] at freemarker.template.Configuration.getTemplate(Configuration.java:2287) ~[freemarker-2.3.25-incubating.jar:2.3.25] at org.apache.ofbiz.base.util.template.FreeMarkerWorker.getTemplate(FreeMarkerWorker.java:259) ~[ofbiz.jar:?] at org.apache.ofbiz.widget.model.HtmlWidget.renderHtmlTemplate(HtmlWidget.java:164) [ofbiz.jar:?] at org.apache.ofbiz.widget.model.HtmlWidget$HtmlTemplate.renderWidgetString(HtmlWidget.java:215) [ofbiz.jar:?] at org.apache.ofbiz.widget.model.HtmlWidget.renderWidgetString(HtmlWidget.java:140) [ofbiz.jar:?] at org.apache.ofbiz.widget.model.ModelScreenWidget$PlatformSpecific.renderWidgetString(ModelScreenWidget.java:1321) [ofbiz.jar:?] at org.apache.ofbiz.widget.model.ModelScreenWidget.renderSubWidgetsString(ModelScreenWidget.java:98) [ofbiz.jar:?] at org.apache.ofbiz.widget.model.ModelScreenWidget$Section.renderWidgetString(ModelScreenWidget.java:280) [ofbiz.jar:?] at org.apache.ofbiz.widget.model.ModelScreen.renderScreenString(ModelScreen.java:164) [ofbiz.jar:?] at org.apache.ofbiz.widget.model.ScreenFactory.renderReferencedScreen(ScreenFactory.java:214) [ofbiz.jar:?] at org.apache.ofbiz.widget.model.ModelScreenWidget$IncludeScreen.renderWidgetString(ModelScreenWidget.java:780) [ofbiz.jar:?] at org.apache.ofbiz.widget.model.ModelScreenWidget.renderSubWidgetsString(ModelScreenWidget.java:98) [ofbiz.jar:?] at org.apache.ofbiz.widget.model.ModelScreenWidget$Section.renderWidgetString(ModelScreenWidget.java:280) [ofbiz.jar:?] at org.apache.ofbiz.widget.model.ModelScreen.renderScreenString(ModelScreen.java:164) [ofbiz.jar:?] at org.apache.ofbiz.widget.model.ScreenFactory.renderReferencedScreen(ScreenFactory.java:214) [ofbiz.jar:?] at org.apache.ofbiz.widget.model.ModelScreenWidget$IncludeScreen.renderWidgetString(ModelScreenWidget.java:780) [ofbiz.jar:?] at org.apache.ofbiz.widget.model.ModelScreenWidget.renderSubWidgetsString(ModelScreenWidget.java:98) [ofbiz.jar:?] at org.apache.ofbiz.widget.model.ModelScreenWidget$Section.renderWidgetString(ModelScreenWidget.java:280) [ofbiz.jar:?] at org.apache.ofbiz.widget.model.ModelScreen.renderScreenString(ModelScreen.java:164) [ofbiz.jar:?] at org.apache.ofbiz.widget.model.ScreenFactory.renderReferencedScreen(ScreenFactory.java:214) [ofbiz.jar:?] at org.apache.ofbiz.widget.model.ModelScreenWidget$IncludeScreen.renderWidgetString(ModelScreenWidget.java:780) [ofbiz.jar:?] at org.apache.ofbiz.widget.model.ModelScreenWidget.renderSubWidgetsString(ModelScreenWidget.java:98) [ofbiz.jar:?] at org.apache.ofbiz.widget.model.ModelScreenWidget$Section.renderWidgetString(ModelScreenWidget.java:280) [ofbiz.jar:?] at org.apache.ofbiz.widget.model.ModelScreen.renderScreenString(ModelScreen.java:164) [ofbiz.jar:?] at org.apache.ofbiz.widget.model.ScreenFactory.renderReferencedScreen(ScreenFactory.java:214) [ofbiz.jar:?] at org.apache.ofbiz.widget.model.ModelScreenWidget$DecoratorScreen.renderWidgetString(ModelScreenWidget.java:860) [ofbiz.jar:?] at org.apache.ofbiz.widget.model.ModelScreenWidget.renderSubWidgetsString(ModelScreenWidget.java:98) [ofbiz.jar:?] at org.apache.ofbiz.widget.model.ModelScreenWidget$Section.renderWidgetString(ModelScreenWidget.java:280) [ofbiz.jar:?] at org.apache.ofbiz.widget.model.ModelScreen.renderScreenString(ModelScreen.java:164) [ofbiz.jar:?] at org.apache.ofbiz.widget.renderer.ScreenRenderer.render(ScreenRenderer.java:137) [ofbiz.jar:?] at org.apache.ofbiz.widget.renderer.ScreenRenderer.render(ScreenRenderer.java:99) [ofbiz.jar:?] at org.apache.ofbiz.widget.renderer.macro.MacroScreenViewHandler.render(MacroScreenViewHandler.java:157) [ofbiz.jar:?] at org.apache.ofbiz.webapp.control.RequestHandler.renderView(RequestHandler.java:981) [ofbiz.jar:?] at org.apache.ofbiz.webapp.control.RequestHandler.doRequest(RequestHandler.java:645) [ofbiz.jar:?] at org.apache.ofbiz.webapp.control.ControlServlet.doGet(ControlServlet.java:207) [ofbiz.jar:?] at javax.servlet.http.HttpServlet.service(HttpServlet.java:687) [javax.servlet-api-3.1.0.jar:3.1.0] at javax.servlet.http.HttpServlet.service(HttpServlet.java:790) [javax.servlet-api-3.1.0.jar:3.1.0] at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:231) [tomcat-catalina-8.5.16.jar:8.5.16] at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166) [tomcat-catalina-8.5.16.jar:8.5.16] at org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:52) [tomcat-embed-websocket-8.0.39.jar:8.0.39] at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193) [tomcat-catalina-8.5.16.jar:8.5.16] at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166) [tomcat-catalina-8.5.16.jar:8.5.16] at org.apache.ofbiz.webapp.control.ContextFilter.doFilter(ContextFilter.java:196) [ofbiz.jar:?] at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193) [tomcat-catalina-8.5.16.jar:8.5.16] at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166) [tomcat-catalina-8.5.16.jar:8.5.16] at org.apache.ofbiz.webapp.control.ControlFilter.doFilter(ControlFilter.java:157) [ofbiz.jar:?] at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193) [tomcat-catalina-8.5.16.jar:8.5.16] at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166) [tomcat-catalina-8.5.16.jar:8.5.16] at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:198) [tomcat-catalina-8.5.16.jar:8.5.16] at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:96) [tomcat-catalina-8.5.16.jar:8.5.16] at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:478) [tomcat-catalina-8.5.16.jar:8.5.16] at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:140) [tomcat-catalina-8.5.16.jar:8.5.16] at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:80) [tomcat-catalina-8.5.16.jar:8.5.16] at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:87) [tomcat-catalina-8.5.16.jar:8.5.16] at org.apache.catalina.valves.AbstractAccessLogValve.invoke(AbstractAccessLogValve.java:624) [tomcat-catalina-8.5.16.jar:8.5.16] at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:342) [tomcat-catalina-8.5.16.jar:8.5.16] at org.apache.coyote.http11.Http11Processor.service(Http11Processor.java:799) [tomcat-coyote-8.5.16.jar:8.5.16] at org.apache.coyote.AbstractProcessorLight.process(AbstractProcessorLight.java:66) [tomcat-coyote-8.5.16.jar:8.5.16] at org.apache.coyote.AbstractProtocol$ConnectionHandler.process(AbstractProtocol.java:868) [tomcat-coyote-8.5.16.jar:8.5.16] at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.doRun(NioEndpoint.java:1455) [tomcat-coyote-8.5.16.jar:8.5.16] at org.apache.tomcat.util.net.SocketProcessorBase.run(SocketProcessorBase.java:49) [tomcat-coyote-8.5.16.jar:8.5.16] at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142) [?:1.8.0_112] at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617) [?:1.8.0_112] at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61) [tomcat-util-8.5.16.jar:8.5.16] at java.lang. Thread .run( Thread .java:745) [?:1.8.0_112]
          Hide
          soledad Nicolas Malin added a comment -

          The second step r1806084, I moved all images folder to common-theme
          The third step r1806091 and r1806093 I moved all ftl template from common to common-theme and all macro ftl libraries.

          I hope to break nothing at this time.
          The next steps will load the dynamic theme load on session

          Show
          soledad Nicolas Malin added a comment - The second step r1806084, I moved all images folder to common-theme The third step r1806091 and r1806093 I moved all ftl template from common to common-theme and all macro ftl libraries. I hope to break nothing at this time. The next steps will load the dynamic theme load on session
          Hide
          soledad Nicolas Malin added a comment - - edited

          I commited a first step (engine and documentation) at 1806075 and 1806076 (^^ I selected only one file to commit) on trunk.
          I will continue to separate my commits to help the code review

          Show
          soledad Nicolas Malin added a comment - - edited I commited a first step (engine and documentation) at 1806075 and 1806076 (^^ I selected only one file to commit) on trunk. I will continue to separate my commits to help the code review
          Hide
          jacques.le.roux Jacques Le Roux added a comment -

          Thanks Nicolas for this easy to understand schemas

          Show
          jacques.le.roux Jacques Le Roux added a comment - Thanks Nicolas for this easy to understand schemas
          Hide
          soledad Nicolas Malin added a comment - - edited

          I uploaded two diagrams that try to explain how the theme system now work to resolve the ftl macro library and decorator screen.

          I hope it would be more easier with them to understand the code change realized.

          common-theme-macro.svg common-theme-screen.svg

          Show
          soledad Nicolas Malin added a comment - - edited I uploaded two diagrams that try to explain how the theme system now work to resolve the ftl macro library and decorator screen. I hope it would be more easier with them to understand the code change realized. common-theme-macro.svg common-theme-screen.svg
          Hide
          soledad Nicolas Malin added a comment - - edited

          It's now done, the common theme support the common screen redirection to the theme.

          For the session problem, I force to load the user pref at the looking. The single problem with that, if you change your theme on a webapp, it's currently not change in your others open sessions.
          In other word, if you have a browser tab in party and an other in product, if you change your theme the tab open with a party session, your product session keep your old preference. To reset it you need to logout from product. At this time I consider this as minor.

          So we can by theme surcharge :

          • widget properties
          • ftl template macro
          • common screen
            And I detect no regression. So if you want to play with it, it's the time !

          source code: https://github.com/nmalin/ofbiz-framework/tree/common-theme
          compare with trunk: https://github.com/apache/ofbiz-framework/compare/trunk...nmalin:common-theme?expand=1

          Show
          soledad Nicolas Malin added a comment - - edited It's now done, the common theme support the common screen redirection to the theme. For the session problem, I force to load the user pref at the looking. The single problem with that, if you change your theme on a webapp, it's currently not change in your others open sessions. In other word, if you have a browser tab in party and an other in product, if you change your theme the tab open with a party session, your product session keep your old preference. To reset it you need to logout from product. At this time I consider this as minor. So we can by theme surcharge : widget properties ftl template macro common screen And I detect no regression. So if you want to play with it, it's the time ! source code: https://github.com/nmalin/ofbiz-framework/tree/common-theme compare with trunk: https://github.com/apache/ofbiz-framework/compare/trunk...nmalin:common-theme?expand=1
          Hide
          soledad Nicolas Malin added a comment -

          Last update on the branch :

          • Add a new extend-common theme just for testing extends functionality
          • Correct the thread-safe that was started but my understanding grew during the build
          • Start to implement the common screens surcharge but not finish yet

          I detect a error when we change the webapp, we lose the theme preference, I will check why perhaps tomorrow

          Show
          soledad Nicolas Malin added a comment - Last update on the branch : Add a new extend-common theme just for testing extends functionality Correct the thread-safe that was started but my understanding grew during the build Start to implement the common screens surcharge but not finish yet I detect a error when we change the webapp, we lose the theme preference, I will check why perhaps tomorrow
          Hide
          soledad Nicolas Malin added a comment -

          Hello, I continue my work on this subject and success to pass the main problem that I detected the last time.
          I create an xml definition for the theme and three class :
          ModelTheme : a threadsafe class to load each theme definition
          Theme : is a runnable classe that contains a modelTheme and the specific visual theme selected
          ThemeFactory: to initialize in cache models and resolve easily a Theme from a visualThemeId

          With that, I modified OFBiz to set a theme on context for screen script and service, so when you need a value related to a theme, you just ask

          Each theme can extend an other theme (all theme extend common-theme). I realized some try and it's really fun. This open a multiple possibility, I imagine now to define a decorator API and each theme can surcharge the wanted element to indicate how it want render it.

          This is a POC, I appreciate if some other commiters can check this works for criticize it, because I move step by step and change my mind with each problem that I raised. So please I need some fresh eyes for some verification on my java class creation, the xsd definition and some other idea to improve this start.

          Oh The patch it's big so I isolate the ModelTheme adding on this commit https://github.com/nmalin/ofbiz-framework/commit/813b0aac473e32e71c9eef78ed18f9ffcb5e1cca

          Have fun

          Show
          soledad Nicolas Malin added a comment - Hello, I continue my work on this subject and success to pass the main problem that I detected the last time. I create an xml definition for the theme and three class : ModelTheme : a threadsafe class to load each theme definition Theme : is a runnable classe that contains a modelTheme and the specific visual theme selected ThemeFactory: to initialize in cache models and resolve easily a Theme from a visualThemeId With that, I modified OFBiz to set a theme on context for screen script and service, so when you need a value related to a theme, you just ask Each theme can extend an other theme (all theme extend common-theme). I realized some try and it's really fun. This open a multiple possibility, I imagine now to define a decorator API and each theme can surcharge the wanted element to indicate how it want render it. This is a POC, I appreciate if some other commiters can check this works for criticize it, because I move step by step and change my mind with each problem that I raised. So please I need some fresh eyes for some verification on my java class creation, the xsd definition and some other idea to improve this start. Oh The patch it's big so I isolate the ModelTheme adding on this commit https://github.com/nmalin/ofbiz-framework/commit/813b0aac473e32e71c9eef78ed18f9ffcb5e1cca Have fun
          Hide
          soledad Nicolas Malin added a comment -

          Thanks Deepak Dixit, I appreciate the confirmation from an other commiter that we take a good way.

          I will continue this after finalize the flexible report

          Show
          soledad Nicolas Malin added a comment - Thanks Deepak Dixit , I appreciate the confirmation from an other commiter that we take a good way. I will continue this after finalize the flexible report
          Hide
          deepak.dixit Deepak Dixit added a comment -

          Hi Nicolas Malin,

          Moving common theme related stuff from framework to themes/common make sense to me,
          I rethink on my comment and realize that Its good idea to keep theme part out from core.

          Show
          deepak.dixit Deepak Dixit added a comment - Hi Nicolas Malin , Moving common theme related stuff from framework to themes/common make sense to me, I rethink on my comment and realize that Its good idea to keep theme part out from core.
          Hide
          soledad Nicolas Malin added a comment - - edited

          Hi Deepak sorry for the latency, my concentration move on an other task

          After sharing with Taher, Julien and Gil on the apachecon eu , we oriented own mind to move all rendering system out framework and keep only the model on the framework.
          But if you have some arguments to defend your idea, I'm yours

          Show
          soledad Nicolas Malin added a comment - - edited Hi Deepak sorry for the latency, my concentration move on an other task After sharing with Taher, Julien and Gil on the apachecon eu , we oriented own mind to move all rendering system out framework and keep only the model on the framework. But if you have some arguments to defend your idea, I'm yours
          Hide
          deepak.dixit Deepak Dixit added a comment -

          Hi Nicolas,

          Can we use framework/common to put common theme?

          Show
          deepak.dixit Deepak Dixit added a comment - Hi Nicolas, Can we use framework/common to put common theme?
          Hide
          soledad Nicolas Malin added a comment - - edited

          I continue the work with :

          • with move macro ftl on common-theme
          • move uneeded properties from widget.properties commonWidget.properties present on common-theme to keep on first properties file only property related to widget model and not widget rendering
          • review some code on FindAutocompleteOptions.groovy and MacroFormRenderer.java to move rendering property use to FtlMacro or decorator screen

          POC available on https://github.com/nmalin/ofbiz-framework/tree/common-theme

          Show
          soledad Nicolas Malin added a comment - - edited I continue the work with : with move macro ftl on common-theme move uneeded properties from widget.properties commonWidget.properties present on common-theme to keep on first properties file only property related to widget model and not widget rendering review some code on FindAutocompleteOptions.groovy and MacroFormRenderer.java to move rendering property use to FtlMacro or decorator screen POC available on https://github.com/nmalin/ofbiz-framework/tree/common-theme
          Hide
          soledad Nicolas Malin added a comment -

          As I informed on mailing I create a POC with success for the two first points but I think we need to storm about the name.

          currently I use themes/common for the directory and common-theme for the webapp.
          Your remarks ?

          Show
          soledad Nicolas Malin added a comment - As I informed on mailing I create a POC with success for the two first points but I think we need to storm about the name. currently I use themes/common for the directory and common-theme for the webapp. Your remarks ?

            People

            • Assignee:
              soledad Nicolas Malin
              Reporter:
              soledad Nicolas Malin
            • Votes:
              1 Vote for this issue
              Watchers:
              6 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:

                Development