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.
A friendly place for programming greenhorns!
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
Author
JSF Navigation issue
Viswanath Sriram
Greenhorn
Joined: Jul 20, 2006
Posts: 12
posted
Oct 20, 2006 02:36:00
0
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
posted
Oct 20, 2006 11:32:00
0
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
posted
Oct 23, 2006 00:56:00
0
If you don't care about using ordinary links, then do:
<h:outputLink value="anotherpage.jsp"><h:outputText value="click here" /></h:outputLink>
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!
All times are in JavaRanch time: GMT-6 in summer, GMT-7 in winter