PrimeFaces Mobile redirect not working

UI Components for JSF
Post Reply
damm
Posts: 27
Joined: 27 Apr 2011, 13:55
Location: Cordoba, Argentina

16 Jun 2011, 14:43

Hello, there's a big problem with navigation in PrimeFaces mobile. I'll show it with an example. This is my command button:

Code: Select all

<pm:commandButton value="Submit" action="otherpage.xhtml" ajax="false" />
after clickinh that button, I can see otherpage.xhtml but the URL looks like this:

Code: Select all

http://localhost:8080/Test/faces/welcome.xhtml#/Test/faces/welcome.xhtml
instead of

Code: Select all

http://localhost:8080/Test/faces/otherpage.xhtml
And I cant access to any other view of that page, I get "Error loading page" because of the wrong URL.
I also tried doing a redirect like

resp.sendRedirect("url here");

but that doesn't work neither. Is this going to be fixed soon? My app has a login page, and if redirect doesn't work then I can't use Primefaces Mobile..

Thanks in advance.

negstek
Posts: 3
Joined: 19 Feb 2013, 21:40

19 Feb 2013, 22:03

Perhaps you could try without ".xhtml" in action's attribute of your tag...

ibrahims88
Posts: 2
Joined: 28 Feb 2013, 19:37

01 Mar 2013, 12:59

Try redirection with FacesConfig.xml

balmerhevi
Posts: 1
Joined: 10 Nov 2016, 09:55

10 Nov 2016, 09:57

The following Javascript code will help you to redirect to your mobile version.

<script type="text/javascript">
if (screen.width <= 699) {
document.location = "mobile/mobilepage.html";
}
</script>

More...Mobile Redirect

Hevi

Post Reply

Return to “PrimeFaces”

  • Information
  • Who is online

    Users browsing this forum: Google [Bot] and 28 guests