Hi everybody,
I have read http://wiki.orbeon.com/forms/doc/developer-guide/error-page-and-error-dialog and http://doc.orbeon.com/xml-platform/controller/other.html#error-handling-and-the-error-handler-element. If I simply place my custom error.xpl in webapps\webapp1\WEB-INF\resources\config, then it gets used via the standard orbeon error handling definitions, but then it is used for all "orbeon applications" within the same webapp, which is not what I need. I was hoping to be able to do this in the page-flow.xml on "orbeon application" level (i.e. in "webapps\webapp1\WEB-INF\resources\apps\orbeonapp1\page-flow.xml") in order to be able to do different error handling on an "orbeon application" level. So I added below definition to my page-flow.xml in "orbeonapp1" and provided the customized error.xpl at the referenced location.
Unfortunately I got the following error 2016-06-14 10:07:36,225 ERROR ProcessorService - Exception at line 10, column 31 of oxf:/apps/orbeonapp1/page-flow.xml org.orbeon.oxf.common.ValidationException: line 10, column 31 of oxf:/apps/orbeonapp1/page-flow.xml: Error tag name "error-handler" is not allowed. Possible tag names are: <epilogue>,<not-found-handler>,<page>(schema: http://www.orbeon.com/oxf/controller) oxf:/apps/orbeonapp1/page-flow.xml, line 10, column 31: Error tag name "error-handler" is not allowed. Possible tag names are: <epilogue>,<not-found-handler>,<page>(schema: http://www.orbeon.com/oxf/controller) at org.orbeon.oxf.processor.validation.MSVValidationProcessor$3$2.error(MSVValidationProcessor.java:206) at com.sun.msv.verifier.Verifier.onError(Verifier.java:371) There is a link to http://wiki.orbeon.com/forms/doc/developer-guide/integration-packaging in the above two referenced pages I have read, which is unfortunately broken, so no help there. Is what I described above supported at all or is this only possible on the webapplication level ? Any pointers are welcome. kind regards René -- You received this message because you are subscribed to the Google Groups "Orbeon Forms" group. To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email]. To post to this group, send email to [hidden email]. |
Administrator
|
Hi René,
You can have a custom error page for an "app" which has it own page-flow.xml. For instance, if I change the resources/apps/xforms-hello/page-flow.xml to be: <controller xmlns="http://www.orbeon.com/oxf/controller"> <page path="*" view="view.xhtmlx"/> <page id="error" path="/error" view="view.xhtml"/> <error-handler page="error"/> <epilogue url="oxf:/config/epilogue.xpl"/> </controller> If I go to http://localhost:8080/orbeon/xforms-hello/, there will be an error, as view.xhtmlx doesn't exist (note the added "x" at the end of the name), and it will show view.xhtml as the error page. OK, this is a bit silly ;), but just to show that an app can have its own error page. Are you doing something different in your case, or did I misunderstand your situation? Alex
--
Follow Orbeon on Twitter: @orbeon Follow me on Twitter: @avernet |
Hi Alessandro,
thanks for jumping in. What you describe is exactly what I'm trying to do. I forgot to mention that I'm still on Orbeon 3.9.0, so there actually is no <controller> element yet. So maybe that is already the issue here ? In case it helps my page-flow.xml in resources\apps\orbeonapp1 looks like this: <config xmlns="http://www.orbeon.com/oxf/controller" xmlns:oxf="http://www.orbeon.com/oxf/processors"> <page path-info="/orbeonapp1/" model="Main_Start_Pipeline.xpl"/> <page path-info="/orbeonapp1/p2/" model="Main_Start_Pipeline2.xpl"/> <page id="error" path="/error" model="errorhandling/error.xpl"/> <error-handler page="error"/> </config> And with that I get the mentioned Error tag name "error-handler" is not allowed. Possible tag names are: <epilogue>,<not-found-handler>,<page> (schema: http://www.orbeon.com/oxf/controller) René Am 15.06.2016 06:54, schrieb Alessandro
Vernet:
Hi René, You can have a custom error page for an "app" which has it own page-flow.xml. For instance, if I change the resources/apps/xforms-hello/page-flow.xml to be: <controller xmlns="http://www.orbeon.com/oxf/controller"> <page path="*" view="view.xhtmlx"/> <page id="error" path="/error" view="view.xhtml"/> <error-handler page="error"/> <epilogue url="oxf:/config/epilogue.xpl"/> </controller> If I go to http://localhost:8080/orbeon/xforms-hello/, there will be an error, as view.xhtmlx doesn't exist (note the added "x" at the end of the name), and it will show view.xhtml as the error page. OK, this is a bit silly ;), but just to show that an app can have its own error page. Are you doing something different in your case, or did I misunderstand your situation? Alex -----
Mit freundlichen Grüßen aus Lindau
-- René Single Dipl.-Ing. (BA) Automatisierung & Integration -- ---------------------------------------------------- TANNER AG Kemptener Straße 99 88131 Lindau, Germany tel +49 8382 272-199 fax +49 8382 272-900 [hidden email] http://www.tanner.de Vorsitzender des Aufsichtsrats: Helmut Tanner Vorstand: Stefan Kuegel (Vorsitzender), Georg-Friedrich Blocher Aktiengesellschaft, Lindau (B) Registergericht Kempten, HRB 7199 ---------------------------------------------------- You received this message because you are subscribed to the Google Groups "Orbeon Forms" group. To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email]. To post to this group, send email to [hidden email]. |
Administrator
|
Hi René,
Right: it looks the page flow controller didn't support the <error-handler> element in 3.9. https://github.com/orbeon/orbeon-forms/blob/tag-release-3.9.0-ce/src/java/org/orbeon/oxf/xml/schemas/page-flow-controller.xsd I'm not entirely sure as it's been a while, but it's possible that with 3.9, you only had a top level error pipeline setup in the web.xml, as a parameter to the Orbeon main servlet: https://github.com/orbeon/orbeon-forms/blob/tag-release-3.9.0-ce/descriptors/orbeon-war-web.xsl#L245 So… maybe time to upgrade? ;) Alex
--
Follow Orbeon on Twitter: @orbeon Follow me on Twitter: @avernet |
Free forum by Nabble | Edit this page |