its not pretty but i got it to work with the following change. i hope there is a better
way.
| public class JSFMetaBridgeFactory
| {
|
| /** . */
| private static final Logger log = Logger.getLogger(JSFMetaBridgeFactory.class);
|
| private static boolean isJsf12() {
| try {
| Object af = FactoryFinder.getFactory(FactoryFinder.APPLICATION_FACTORY);
| java.lang.reflect.Method m = af.getClass().getMethod("getApplication",
new Class[]{});
| Object app = m.invoke(af, new Object[]{});
| if
("org.jboss.seam.jsf.SeamApplication12".equals(app.getClass().getName())) {
| return true;
| } else {
| return false;
| }
| } catch (Exception e) {
| throw new RuntimeException(e);
| }
| }
|
| public static JSFMetaBridge getMetaBridge()
| {
| JSFMetaBridge metaBridge = null;
|
| //
| String className =
FactoryFinder.getFactory(FactoryFinder.APPLICATION_FACTORY).getClass().getName();
| if
("com.sun.faces.application.ApplicationFactoryImpl".equals(className))
| {
| metaBridge = new SunRIJSFBridge();
| }
| else if
("org.apache.myfaces.application.ApplicationFactoryImpl".equals(className))
| {
| metaBridge = new MyFacesJSFBridge();
| }
| else if
("org.jboss.seam.jsf.SeamApplicationFactory".equals(className))
| {
| if (isJsf12()) {
| metaBridge = new SunRIJSFBridge();
| } else {
| metaBridge = new MyFacesJSFBridge();
| }
| }
|
| //
| if (metaBridge != null)
| {
| log.debug("Detected JSF bridge " + metaBridge.getName());
| }
| else
| {
| log.warn("No bridge detected for application factory " +
className);
| }
|
| //
| return metaBridge;
| }
|
| }
|
View the original post :
http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4060578#...
Reply to the post :
http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&a...