List of usage examples for org.apache.wicket.request.cycle IRequestCycleListener IRequestCycleListener
IRequestCycleListener
From source file:edu.wfu.inotado.tool.MainApplication.java
License:Apache License
@Override protected void init() { // Configure for Spring injection getComponentInstantiationListeners().add(new SpringComponentInjector(this)); // Don't throw an exception if we are missing a property, just fallback getResourceSettings().setThrowExceptionOnMissingResource(false); // Remove the wicket specific tags from the generated markup getMarkupSettings().setStripWicketTags(true); // Don't add any extra tags around a disabled link (default is // <em></em>) getMarkupSettings().setDefaultBeforeDisabledLink(null); getMarkupSettings().setDefaultAfterDisabledLink(null); // On Wicket session timeout, redirect to main page getApplicationSettings().setPageExpiredErrorPage(LandingPage.class); getApplicationSettings().setAccessDeniedPage(LandingPage.class); // to put this app into deployment mode, see web.xml getRequestCycleListeners().add(new IRequestCycleListener() { public void onBeginRequest() { // optionally do something at the beginning of the request }/*w w w . j a v a2s . co m*/ public void onEndRequest() { // optionally do something at the end of the request } public IRequestHandler onException(RequestCycle cycle, Exception ex) { // optionally do something here when there's an exception // then, return the appropriate IRequestHandler, or "null" // to let another listener handle the exception ex.printStackTrace(); return null; } @Override public void onBeginRequest(RequestCycle arg0) { // TODO Auto-generated method stub } @Override public void onDetach(RequestCycle arg0) { // TODO Auto-generated method stub } @Override public void onEndRequest(RequestCycle arg0) { // TODO Auto-generated method stub } @Override public void onExceptionRequestHandlerResolved(RequestCycle arg0, IRequestHandler arg1, Exception arg2) { // TODO Auto-generated method stub } @Override public void onRequestHandlerExecuted(RequestCycle arg0, IRequestHandler arg1) { // TODO Auto-generated method stub } @Override public void onRequestHandlerResolved(RequestCycle arg0, IRequestHandler arg1) { // TODO Auto-generated method stub } @Override public void onRequestHandlerScheduled(RequestCycle arg0, IRequestHandler arg1) { // TODO Auto-generated method stub } @Override public void onUrlMapped(RequestCycle arg0, IRequestHandler arg1, Url arg2) { // TODO Auto-generated method stub } }); }
From source file:org.sakaiproject.attendance.tool.Attendance.java
License:Educational Community License
/** * Configuration//ww w . j a va 2s.c om */ @Override protected void init() { super.init(); //Configure for Spring injection getComponentInstantiationListeners().add(new SpringComponentInjector(this)); //Don't throw an exception if we are missing a property, just fallback getResourceSettings().setThrowExceptionOnMissingResource(false); //Remove the wicket specific tags from the generated markup getMarkupSettings().setStripWicketTags(true); //Don't add any extra tags around a disabled link (default is <em></em>) getMarkupSettings().setDefaultBeforeDisabledLink(null); getMarkupSettings().setDefaultAfterDisabledLink(null); // On Wicket session timeout, redirect to main page getApplicationSettings().setPageExpiredErrorPage(Overview.class); getApplicationSettings().setAccessDeniedPage(Overview.class); getRequestCycleListeners().add(new IRequestCycleListener() { public void onBeginRequest() { // optionally do something at the beginning of the request } public void onEndRequest() { // optionally do something at the end of the request } public IRequestHandler onException(RequestCycle cycle, Exception ex) { // optionally do something here when there's an exception // then, return the appropriate IRequestHandler, or "null" // to let another listener handle the exception ex.printStackTrace(); return null; } @Override public void onBeginRequest(RequestCycle arg0) { // TODO Auto-generated method stub } @Override public void onDetach(RequestCycle arg0) { // TODO Auto-generated method stub } @Override public void onEndRequest(RequestCycle arg0) { // TODO Auto-generated method stub } @Override public void onExceptionRequestHandlerResolved(RequestCycle arg0, IRequestHandler arg1, Exception arg2) { // TODO Auto-generated method stub } @Override public void onRequestHandlerExecuted(RequestCycle arg0, IRequestHandler arg1) { // TODO Auto-generated method stub } @Override public void onRequestHandlerResolved(RequestCycle arg0, IRequestHandler arg1) { // TODO Auto-generated method stub } @Override public void onRequestHandlerScheduled(RequestCycle arg0, IRequestHandler arg1) { // TODO Auto-generated method stub } @Override public void onUrlMapped(RequestCycle arg0, IRequestHandler arg1, Url arg2) { // TODO Auto-generated method stub } }); //to put this app into deployment mode, see web.xml }
From source file:org.sakaiproject.ddo.tool.DDOApplication.java
License:Educational Community License
/** * Configure your app here/*from w w w . ja v a 2 s . c o m*/ */ @Override protected void init() { //Configure for Spring injection getComponentInstantiationListeners().add(new SpringComponentInjector(this)); //Don't throw an exception if we are missing a property, just fallback getResourceSettings().setThrowExceptionOnMissingResource(false); //Remove the wicket specific tags from the generated markup getMarkupSettings().setStripWicketTags(true); //Don't add any extra tags around a disabled link (default is <em></em>) getMarkupSettings().setDefaultBeforeDisabledLink(null); getMarkupSettings().setDefaultAfterDisabledLink(null); // On Wicket session timeout, redirect to main page getApplicationSettings().setPageExpiredErrorPage(StudentOverview.class); getApplicationSettings().setAccessDeniedPage(StudentOverview.class); getRequestCycleListeners().add(new IRequestCycleListener() { public void onBeginRequest() { // optionally do something at the beginning of the request } public void onEndRequest() { // optionally do something at the end of the request } public IRequestHandler onException(RequestCycle cycle, Exception ex) { // optionally do something here when there's an exception // then, return the appropriate IRequestHandler, or "null" // to let another listener handle the exception ex.printStackTrace(); return null; } @Override public void onBeginRequest(RequestCycle arg0) { // TODO Auto-generated method stub } @Override public void onDetach(RequestCycle arg0) { // TODO Auto-generated method stub } @Override public void onEndRequest(RequestCycle arg0) { // TODO Auto-generated method stub } @Override public void onExceptionRequestHandlerResolved(RequestCycle arg0, IRequestHandler arg1, Exception arg2) { // TODO Auto-generated method stub } @Override public void onRequestHandlerExecuted(RequestCycle arg0, IRequestHandler arg1) { // TODO Auto-generated method stub } @Override public void onRequestHandlerResolved(RequestCycle arg0, IRequestHandler arg1) { // TODO Auto-generated method stub } @Override public void onRequestHandlerScheduled(RequestCycle arg0, IRequestHandler arg1) { // TODO Auto-generated method stub } @Override public void onUrlMapped(RequestCycle arg0, IRequestHandler arg1, Url arg2) { // TODO Auto-generated method stub } }); //to put this app into deployment mode, see web.xml }
From source file:org.sakaiproject.rubrics.tool.MyApplication.java
License:Educational Community License
/** * Configure app here//from w w w . j a v a 2 s . c o m */ @Override protected void init() { //Configure for Spring injection getComponentInstantiationListeners().add(new SpringComponentInjector(this)); //Don't throw an exception if we are missing a property, just fallback getResourceSettings().setThrowExceptionOnMissingResource(false); //Remove the wicket specific tags from the generated markup getMarkupSettings().setStripWicketTags(true); //Don't add any extra tags around a disabled link (default is <em></em>) getMarkupSettings().setDefaultBeforeDisabledLink(null); getMarkupSettings().setDefaultAfterDisabledLink(null); // On Wicket session timeout, redirect to main page getApplicationSettings().setPageExpiredErrorPage(FirstPage.class); getApplicationSettings().setAccessDeniedPage(FirstPage.class); getRequestCycleListeners().add(new IRequestCycleListener() { public void onBeginRequest() { // optionally do something at the beginning of the request } public void onEndRequest() { // optionally do something at the end of the request } public IRequestHandler onException(RequestCycle cycle, Exception ex) { // optionally do something here when there's an exception // then, return the appropriate IRequestHandler, or "null" // to let another listener handle the exception log.info(ex.getMessage()); return null; } @Override public void onBeginRequest(RequestCycle arg0) { // TODO Auto-generated method stub } @Override public void onDetach(RequestCycle arg0) { // TODO Auto-generated method stub } @Override public void onEndRequest(RequestCycle arg0) { // TODO Auto-generated method stub } @Override public void onExceptionRequestHandlerResolved(RequestCycle arg0, IRequestHandler arg1, Exception arg2) { // TODO Auto-generated method stub } @Override public void onRequestHandlerExecuted(RequestCycle arg0, IRequestHandler arg1) { // TODO Auto-generated method stub } @Override public void onRequestHandlerResolved(RequestCycle arg0, IRequestHandler arg1) { // TODO Auto-generated method stub } @Override public void onRequestHandlerScheduled(RequestCycle arg0, IRequestHandler arg1) { // TODO Auto-generated method stub } @Override public void onUrlMapped(RequestCycle arg0, IRequestHandler arg1, Url arg2) { // TODO Auto-generated method stub } }); }