There are 2 things about outcome
that you need to know:
- You cannot use a full page name with
.xhtml
as a value foroutcome
. For example, if the page name isExample.xhtml
, the proper way isoutcome="Example"
. - Suppose at the moment you're at this page
http://yourdomain.com/app/folder/Page1.xhtml
, if you click on a button withoutcome="Page2"
, you will arrive athttp://yourdomain.com/app/folder/Page2.xhtml
. You cannot use../
in theoutcome
to navigate to the parent folder.
Try this:
<p:button value="Go back" href="../../index.xhtml" />
If it doesn't work, put an absolute path in the href
should do the job.