This week's book giveaway is in the Agile and other Processes forum.
We're giving away four copies of The Mikado Method and have Ola Ellnestam and Daniel Brolund on-line!
See this thread for details.
The moose likes JSF and the fly likes JSF Navigation issue Big Moose Saloon
  Search | Java FAQ | Recent Topics
Register / Login


Win a copy of The Mikado Method this week in the Agile and other Processes forum!
JavaRanch » Java Forums » Java » JSF
Reply Bookmark "JSF Navigation issue" Watch "JSF Navigation issue" New topic
Author

JSF Navigation issue

Viswanath Sriram
Greenhorn

Joined: Jul 20, 2006
Posts: 12
can we do Page navigation in JSF with out action attribute in CommandButton tag

Other than like this:
<h:commandButton value="Click" action="redirect"/>
Mike Dingham
Greenhorn

Joined: Oct 06, 2006
Posts: 8
One way I am aware is from Java Code use following code
(RAD - PageCodeBase)

protected void gotoPage(String pageName)
{
if (pageName != null)
{
UIViewRoot newView = facesContext.getApplication().getViewHandler()
.createView(facesContext, pageName);
facesContext.setViewRoot(newView);
}
}


So you can define a actionListener for commandButton and call this
method from actionLister

Thanks,
Mike
Bauke Scholtz
Ranch Hand

Joined: Oct 08, 2006
Posts: 2458
If you don't care about using ordinary links, then do:


Code depot of a Java EE / JSF developer | JSF / Eclipse / Tomcat kickoff tutorial | DAO kickoff tutorial | I ♥ Unicode
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: JSF Navigation issue
 
Similar Threads
JSP vs JSF ?!!
Using redirect from backing bean and getting IllegalStateException error
JSF <h:commandButton action> not working
<navigation-rule>
Problem with navigation rule!