• Post Reply Bookmark Topic Watch Topic
  • New Topic

JSF Navigation issue

 
Viswanath Sriram
Greenhorn
Posts: 12
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 8
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 2458
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
If you don't care about using ordinary links, then do:
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!