
de.beyondjava.angularFaces.core.Configuration Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of angularFaces-core Show documentation
Show all versions of angularFaces-core Show documentation
AngularFaces makes JSF programming simpler. In particular, it adds AngularJS to JSF.
package de.beyondjava.angularFaces.core;
public class Configuration {
public static boolean bootsFacesActive = false;
public static boolean myFaces = false;
static {
try {
Thread.currentThread().getContextClassLoader().loadClass("net.bootsfaces.component.column.Column");
bootsFacesActive = true;
} catch (Exception doWithoutBootsFaces) {
// Bootsfaces is not active
}
try {
Thread.currentThread().getContextClassLoader().loadClass("net.bootsfaces.layout.Column");
bootsFacesActive = true;
} catch (Exception doWithoutBootsFaces) {
// Bootsfaces is not active
}
StackTraceElement[] stackTrace = new NullPointerException().getStackTrace();
for (StackTraceElement line : stackTrace) {
if (line.getClassName().contains("org.apache.myfaces")) {
myFaces = true;
break;
}
if (line.getClassName().contains("com.sun.faces")) {
myFaces = false;
break;
}
}
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy