Navigating between views and xhtml files.

UI Components for JSF
Post Reply
bjoice
Posts: 13
Joined: 20 Jan 2011, 13:10

20 Jan 2011, 18:13

1. I have a commandlink/commandbutton and need to go to second.xhtml

But it does not go from action=/second.xhtml

2. there are multiple views and I want to switch from one view to other. On one of the view I have the google map to be loaded with the javascript. hence what will be the suggested button/link which will change the view and also execute the javascript function to load the map on that view.

Thanks.

Franke
Posts: 49
Joined: 12 Oct 2010, 08:41

21 Jan 2011, 14:04

1. Views are refered to as .jsf, not .xhtml. Sometimes you can omit the .xxx altogether (i.e action="/second" or action="/second.jsf")

2. Buttons/links can't execute script on another view, you need to make a normal button/link and them put the script in a place where it's executed when the view loads.
Using PF 3.0 with default JSF implementation of JBoss 6

bjoice
Posts: 13
Joined: 20 Jan 2011, 13:10

25 Jan 2011, 08:51

I have 2 jsf page, with 2 views in it.
from the index page view I can go to page2, but from page2, how can I display view2 of index page.
No actionListener is needed, just need to go to the back index view page.
What will be the best option in this case.

Thanks.

Post Reply

Return to “PrimeFaces”

  • Information
  • Who is online

    Users browsing this forum: No registered users and 57 guests