Comments (4)
I wonder what exactly you'd like to do in resetResponse()
and renderErrorPageView()
instead as changing them would violate the purpose of FullAjaxExceptionHandler
of showing an <error-page>
exactly the same way as during a synchronous request.
Those constants are since OmniFaces 2.0 replaced by Servlet 3.0 ones.
from omnifaces.
I can not remember about resetResponse
(have to look into the project code), but renderErrorPageView
is e.g. needed to be able to show an error on the same page. We only show unexpected errors on a separate page. Business errors are shown on the same page by invoking navigate
in the NavigationHandler
with the outcome null
. Business errors are thrown across the whole web app and we don't need to change the view for them because the user can continue his/her work. I try to summarize: all exceptions should be treated in the same ExceptionHandler
, but the handling differs in exception's type - some exceptions are shown on the current page and some on the separate page.
from omnifaces.
Closing off as this actually defeats purpose of FullAjaxExceptionHandler
.
To implement the desired functionaliry, better override shouldHandleExceptionRootCause()
.
protected boolean shouldHandleExceptionRootCause(FacesContext context, Throwable exception) {
if (isContinuableBusinessException(exception)) {
return true;
}
else {
// Do your specific thing here. Show a faces message?
// ...
return false;
}
}
from omnifaces.
Hi I tried the above logic to show my business exception on the same page but i dont the values that i set in the context in the xhtml. This is the response that i get.
class gov.ms.mdes.access.framework.exception.BaseRunTimeException
Please see the code here
http://stackoverflow.com/questions/34144536/omnifaces-fullajaxexceptionhandler
from omnifaces.
Related Issues (20)
- Incompatibility with MyFaces 4 and CDI HOT 10
- validateUnique - keep specified field valid regardless of input HOT 5
- Components disableInputComponent ... or propose a change to Faces API ? HOT 7
- ValidateMultiple: is it correct to invalidate unrendered fields? HOT 4
- PWAResourceHandler is not aware of VersionedResourceHandler HOT 5
- omnifaces ViewScoped bean not injectable in converter HOT 3
- Faces/FacesLocal: createComponent shortcut HOT 3
- Missing list attribute in converter tag HOT 1
- FullAjaxExceptionHandler => OmniExceptionHandler HOT 20
- Question: A lot of AtomicReference in heapdump HOT 19
- VersionedResourceHandler doesn't support non-String values such as Long timestamp
- idea: why not rename the OmniFaces' @ViewScoped => @PageScoped ? HOT 6
- Feature Request: New component <o:criticalStylesheet> for Critical CSS HOT 1
- Faces.sendFile() inside p:columns logs jakarta.servlet.ServletException HOT 6
- ViewScopeManager - NPE - Weld bug? HOT 2
- LruCache - Lock is null HOT 4
- OnLoadScript: Behavior difference in MyFaces/Mojarra HOT 3
- unload not working after update form HOT 3
- POST-Parameters omitted in AJAX request when using execute with id of parent component HOT 3
- conditionally rendered deferredScript and CombinedResourceHandler bug? HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from omnifaces.