This idea dont need a propertyfile! But I want to repeat that I'm using a jar
that the branded webapplication depends on. The jar is the core
functionallity that all brands depends on. As you see in the replace Im
keeping the package structure in the webapplication(on overrided
component/pages). Beside the WhateverName_brand.class I also have a
WhateverName_bran.html markupfile and css if it needed. I wonder if it might
be some memory/performance problem in this 'spike'. If the branded version
does not exist it will keep on throwing the exception.
public class NavLink extends PageLink {
public NavLink(String s, Class pClass) {
super(s, GetBrandedClass(pClass));
}
private static Class GetBrandedClass(Class pClass) {
String simpleName = pClass.getSimpleName();
String name = pClass.getName().replace(simpleName, simpleName + "_"
+ Session.get().getStyle());
try {
return
Thread.currentThread().getContextClassLoader().loadClass(name);
} catch (ClassNotFoundException e) {
e.printStackTrace(); //Should be logged
}
return pClass; //returns the core version
}
}
I still need to try the wicket:link idea from above. Then you only brand the
markup file and change wicket:link. But I need to check out if absolute
paths in the markup will be nice.
--
View this message in context:
http://www.nabble.com/Branding-a-PageLink-target-Page-tp18382006p18735873.html
Sent from the Wicket - User mailing list archive at Nabble.com.
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]