Hello Taher,

I continued 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 you 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

Yes its a duplication of jira comment ;)

Nicolas

Le 18/07/2017 à 21:18, Nicolas Malin a écrit :
Hi Taher, I understand the motivation but my work it's currently unstable. I continue to centralize the theme configuration for more stabilization.

Nicolas


Le 18/07/2017 à 16:54, Taher Alkhateeb a écrit :
Hi Nicolas,

Great stuff, I'm not sure what everyone thinks but I prefer if we can
try to get your work incorporated back into the code base as early as
possible and to start completing the work from there.

On Tue, Jul 18, 2017 at 5:38 PM, Nicolas Malin <[email protected]> wrote:
Michael,

I finished to restore my work on common-theme from ofbiz to ofbiz-framework
:
https://github.com/apache/ofbiz-framework/compare/trunk...nmalin:common-theme?expand=1

Now I will work on the java object to manage the widget theme on user
session.

Nicolas

--
logoNrd <https://nereide.fr/>
         Nicolas Malin
The apache way <http://theapacheway.com/> : *Openness* Technical decisions
are made publicly
[email protected]
8 rue des Déportés 37000 TOURS, 02 47 50 30 54

Apache OFBiz <http://ofbiz.apache.org/>|The Apache Way
<http://theapacheway.com/>|ofbiz-fr <http://www.ofbiz-fr.org/>|réseau LE
<http://www.libre-entreprise.org/>



Reply via email to