File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes JSF and the fly likes control does not goes to another page Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » JSF
Bookmark "control does not goes to another page" Watch "control does not goes to another page" New topic
Author

control does not goes to another page

pallavi chaudhari
Ranch Hand

Joined: Jul 02, 2008
Posts: 54
hello all,
i am new to JSF today i tried sample JSF tutorial but enable to find out why transfer does not goes to another page.

there are two jsp pages

1)display.jsp


2] index.jsp

3] IndexBean.java


pallavi chaudhari
Ranch Hand

Joined: Jul 02, 2008
Posts: 54
please help...me
pallavi chaudhari
Ranch Hand

Joined: Jul 02, 2008
Posts: 54
Hello,


now i have added method getName() in managed bean and called it from action but there is exception method not found.

do not know what is the problem....?
below is code snippet of bean class-------
Tim Holloway
Saloon Keeper

Joined: Jun 25, 2001
Posts: 16065
    
  21

Patience, grasshopper. We're volunteers here, and we visit when we can. We don't get paid to sit and answer questions as fast as they come in.

First of all, I want to caution you about using capital letters. In Java, package names should not begin with capital letters (in fact, I don't recommend capital letters at all in package names). Similarly, the name of a bean instance should not begin with a capital letter. In Java, an initial capital letter indicates a class name, not an object name or package name. Failure to observe this convention may cause program development tools to object, and in a few cases, some very puzzling runtime failures.

The reason you're not advancing to the new page is because your action processor didn't tell JSF to navigate to the new page. JSF works on a series of post-back conversations with a page, not a single page visit. That's how it manages things like validation and correction of inputs. So the action processor is required to explicitly tell JSF when to leave the current page and where to go from there.

Actually, you didn't even provide an action processor, so nothing could be indicated at all.

What you need is something like this:


Plus this:


Actually, my action processors mostly return strings like "success", "failure", "forbidden", and stuff like that, but you'd coded your faces-config to look for "result", so that's what I returned.


Customer surveys are for companies who didn't pay proper attention to begin with.
pallavi chaudhari
Ranch Hand

Joined: Jul 02, 2008
Posts: 54
Dear Tim,

thanks for reply...


still does not working....
 
It is sorta covered in the JavaRanch Style Guide.
 
subject: control does not goes to another page