Logo on header panel by client ?

225 views
Skip to first unread message

Nicolas Micoud

unread,
Jan 13, 2017, 11:55:21 AM1/13/17
to iDempiere
Hello,

In a SaaS environment, I wanted to personnalize the logo at the upper left (next to the menu) by tenant.
Reading code from HeaderPanel.onCreate(), i see the logo is the same for all.
Could it be changed or is there a reason ?

Thanks,

Nicolas

Carlos Antonio Ruiz Gomez

unread,
Jan 13, 2017, 2:48:09 PM1/13/17
to idem...@googlegroups.com
What I have done is to include a class in my theme plugin.

A local HeaderPanel extending org.adempiere.webui.panel.HeaderPanel

and overwriting this method like:

@Override
protected void onCreate() {
super.onCreate();
Image image = (Image) getFellowIfAny("clientlogo");
if (image != null) {
try {
org.zkoss.image.Image logo =
ThemeManager.getClientWebLogo();
if (logo != null) {
image.setContent(logo);
} else {
image.setVisible(false);
}
} catch (IOException e) {
e.printStackTrace();
}

}
}


Then you can use the desktop-header class and the clientlogo image in
your theme header.zul file.

Regards,

Carlos Ruiz


El 13/01/17 a las 17:55, Nicolas Micoud escribió:

Nicolas Micoud

unread,
Jan 14, 2017, 7:07:36 AM1/14/17
to iDempiere
Thanks Carlos !
I will try it

Regards,

Nicolas

Luis Amesty

unread,
Jan 15, 2017, 6:24:07 AM1/15/17
to iDempiere

Hi Nicolas
 See attach word doc. I used it on an Idempiere  2.1 Version Fragment Plugin for theme.
This is a way to change using ad_sysconfig table.

Regards,
Luis Amesty 
amerp_themes.doc

Steven Sackett

unread,
Jan 23, 2017, 7:13:43 PM1/23/17
to iDempiere
Hi Nicolas
I see this is marked as complete however in case it is useful I attach a document about how it was done 'elsewhere'.
regards
steven
Branding and Logo changes by Adaxa in Adempiere.pdf

Nicolas Micoud

unread,
Jan 24, 2017, 3:58:14 AM1/24/17
to iDempiere
Thanks Steven :)

Regards,

Nicolas
Reply all
Reply to author
Forward
0 new messages