faces-config.xml 5.36 KB
<?xml version="1.0" encoding="UTF-8"?>
<faces-config xmlns="http://xmlns.jcp.org/xml/ns/javaee"
	xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
	xsi:schemaLocation="http://xmlns.jcp.org/xml/ns/javaee http://xmlns.jcp.org/xml/ns/javaee/web-facesconfig_2_2.xsd"
	version="2.2">
	<application>
		<resource-bundle>
			<base-name>fi.codecrew.moya.resources.i18n</base-name>
			<var>i18n</var>
		</resource-bundle>
		<message-bundle>fi.codecrew.moya.resources.i18n</message-bundle>
		<locale-config>
			<default-locale>fi</default-locale>
			<supported-locale>en</supported-locale>
		</locale-config>
		
		<action-listener>org.primefaces.application.DialogActionListener</action-listener>
		<navigation-handler>org.primefaces.application.DialogNavigationHandler</navigation-handler>
		<view-handler>org.primefaces.application.DialogViewHandler</view-handler>
	</application>

	<!-- <navigation-rule> -->
	<!-- <from-view-id>/user/list.xhtml</from-view-id> -->
	<!-- <navigation-case> -->
	<!-- <from-outcome>userEdit</from-outcome> -->
	<!-- <to-view-id>/user/edit.xhtml</to-view-id> -->
	<!-- </navigation-case> -->
	<!-- </navigation-rule> -->
	<!-- <navigation-rule> -->
	<!-- <from-view-id>/user/edit.xhtml</from-view-id> -->
	<!-- <navigation-case> -->
	<!-- <from-outcome>userSave</from-outcome> -->
	<!-- <to-view-id>/user/edit.xhtml</to-view-id> -->
	<!-- </navigation-case> -->
	<!-- </navigation-rule> -->
	<!-- <navigation-rule> -->
	<!-- <from-view-id>/role/list.xhtml</from-view-id> -->
	<!-- <navigation-case> -->
	<!-- <from-outcome>roleEdit</from-outcome> -->
	<!-- <to-view-id>/role/edit.xhtml</to-view-id> -->
	<!-- </navigation-case> -->
	<!-- </navigation-rule> -->

	<!-- <navigation-rule> -->
	<!-- <from-view-id>*</from-view-id> -->
	<!-- <navigation-case> -->
	<!-- <from-outcome>shopToUser</from-outcome> -->
	<!-- <to-view-id>/shop/shopToUser</to-view-id> -->
	<!-- <redirect /> -->
	<!-- </navigation-case> -->
	<!-- <navigation-case> -->
	<!-- <from-outcome>logoutDone</from-outcome> -->
	<!-- <to-view-id>/auth/logoutResponse</to-view-id> -->
	<!-- <redirect /> -->
	<!-- </navigation-case> -->

	<!-- <navigation-case> -->
	<!-- <from-outcome>redirBillList</from-outcome> -->
	<!-- <to-view-id>/bill/list</to-view-id> -->
	<!-- <redirect /> -->
	<!-- </navigation-case> -->
	<!-- </navigation-rule> -->


	<!-- <navigation-rule> -->
	<!-- <from-view-id>/news/editNews</from-view-id> -->
	<!-- <navigation-case> -->
	<!-- <from-outcome>news/listAll</from-outcome> -->
	<!-- <to-view-id>/news/listAll</to-view-id> -->
	<!-- <redirect /> -->
	<!-- </navigation-case> -->
	<!-- </navigation-rule> -->


	<!-- </navigation-rule> -->
	<!-- <navigation-rule> -->
	<!-- <from-view-id>/role/edit.xhtml</from-view-id> -->
	<!-- <navigation-case> -->
	<!-- <from-outcome>roleSaved</from-outcome> -->
	<!-- <to-view-id>/role/edit.xhtml</to-view-id> -->
	<!-- </navigation-case> -->
	<!-- </navigation-rule> -->
	<!-- <navigation-rule> -->
	<!-- <from-view-id>/shop/createBill</from-view-id> -->
	<!-- <navigation-case> -->
	<!-- <from-outcome>bill_list</from-outcome> -->
	<!-- <to-view-id>/bill/list</to-view-id> -->
	<!-- <redirect /> -->
	<!-- </navigation-case> -->
	<!-- </navigation-rule> -->
	<factory>
		<exception-handler-factory>fi.codecrew.moya.exceptions.BortalExceptionHandlerFactory</exception-handler-factory>
	</factory>
	<navigation-rule>
		<display-name>place/placemap</display-name>
		<from-view-id>/place/placemap</from-view-id>
		<navigation-case>
			<from-outcome>placesReserved</from-outcome>
			<to-view-id>/place/placemap</to-view-id>
			<redirect />
		</navigation-case>
	</navigation-rule>
	<navigation-rule>
		<display-name>actionlog/index</display-name>
		<from-view-id>/actionlog/index.xhtml</from-view-id>
		<navigation-case>
			<from-outcome>success</from-outcome>
			<to-view-id>/actionlog/index.xhtml</to-view-id>
			<redirect />
		</navigation-case>
	</navigation-rule>
	<navigation-rule>
		<display-name>card/massprint</display-name>
		<from-view-id>/card/massprint.xhtml</from-view-id>
		<navigation-case>
			<from-outcome>accepted</from-outcome>
			<to-view-id>/useradmin/list.xhtml</to-view-id>
			<redirect />
		</navigation-case>
	</navigation-rule>
	<navigation-rule>
		<display-name>useradmin/sendPicture</display-name>
		<from-view-id>/useradmin/sendPicture.xhtml</from-view-id>
		<navigation-case>
			<from-outcome>accepted</from-outcome>
			<to-view-id>/useradmin/edit.xhtml</to-view-id>
			<redirect />
		</navigation-case>
	</navigation-rule>
	<navigation-rule>
		<display-name>voting/create</display-name>
		<from-view-id>/voting/create.xhtml</from-view-id>
		<navigation-case>
			<from-outcome>success</from-outcome>
			<to-view-id>/voting/compolist.xhtml</to-view-id>
			<redirect />
		</navigation-case>
	</navigation-rule>
	<navigation-rule>
		<display-name>tournaments/admin/move-to-creation-screen</display-name>
		<from-view-id>/tournaments/admin/index.xhtml</from-view-id>
		<navigation-case>
			<from-outcome>create</from-outcome>
			<to-view-id>/tournaments/admin/createwizard.xhtml</to-view-id>
			<redirect />
		</navigation-case>
	</navigation-rule>
	<navigation-rule>
		<display-name>tournaments/admin/tournament-created</display-name>
		<from-view-id>/tournaments/admin/createwizard.xhtml</from-view-id>
		<navigation-case>
			<from-outcome>success</from-outcome>
			<to-view-id>/tournaments/admin/index.xhtml</to-view-id>
			<redirect />
		</navigation-case>
	</navigation-rule>
</faces-config>