[
https://issues.apache.org/jira/browse/OFBIZ-9138?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16096443#comment-16096443
]
Nicolas Malin commented on OFBIZ-9138:
--------------------------------------
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
> Create a common theme
> ---------------------
>
> Key: OFBIZ-9138
> URL: https://issues.apache.org/jira/browse/OFBIZ-9138
> Project: OFBiz
> Issue Type: Sub-task
> Components: framework
> Reporter: Nicolas Malin
> Assignee: Nicolas Malin
>
> 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
--
This message was sent by Atlassian JIRA
(v6.4.14#64029)