From: Anjo K. <an...@us...> - 2003-06-22 19:56:22
|
Update of /cvsroot/wonder/Wonder/Common/Frameworks/ERExtensions/Sources/er/extensions In directory sc8-pr-cvs1:/tmp/cvs-serv21591 Modified Files: ERXCompilerProxy.java Log Message: More generic usage Index: ERXCompilerProxy.java =================================================================== RCS file: /cvsroot/wonder/Wonder/Common/Frameworks/ERExtensions/Sources/er/extensions/ERXCompilerProxy.java,v retrieving revision 1.27 retrieving revision 1.28 diff -C2 -d -r1.27 -r1.28 *** ERXCompilerProxy.java 1 Jun 2003 07:21:51 -0000 1.27 --- ERXCompilerProxy.java 22 Jun 2003 19:56:19 -0000 1.28 *************** *** 507,514 **** WORequestHandler currentDAHandler = app.requestHandlerForKey(app.directActionRequestHandlerKey()); WODirectActionRequestHandler handler = null; ! if (currentDAHandler instanceof ERXDirectActionRequestHandler) ! handler = new ERXDirectActionRequestHandler(cacheEntry.className(), "default", false); ! else ! handler = new WODirectActionRequestHandler(cacheEntry.className(), "default", false); boolean directActionIsDefault = currentDAHandler == app.defaultRequestHandler(); app.registerRequestHandler(handler, app.directActionRequestHandlerKey()); --- 507,517 ---- WORequestHandler currentDAHandler = app.requestHandlerForKey(app.directActionRequestHandlerKey()); WODirectActionRequestHandler handler = null; ! try { ! Class[] paramArray = new Class[] { String.class, String.class, Boolean.TYPE }; ! java.lang.reflect.Constructor constructor = currentDAHandler.getClass().getConstructor(paramArray); ! handler = (WODirectActionRequestHandler)constructor.newInstance(new Object[] { cacheEntry.className(), "default", Boolean.FALSE } ); ! } catch(Exception ex) { ! log.error("Failed to instantiate DA Handler: " + ex); ! } boolean directActionIsDefault = currentDAHandler == app.defaultRequestHandler(); app.registerRequestHandler(handler, app.directActionRequestHandlerKey()); |