File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
Win a copy of Clojure in Action this week in the Clojure forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

control does not goes to another page

 
pallavi chaudhari
Ranch Hand
Posts: 54
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 54
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
please help...me
 
pallavi chaudhari
Ranch Hand
Posts: 54
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Pie
Posts: 17620
39
Android Eclipse IDE Linux
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
 
pallavi chaudhari
Ranch Hand
Posts: 54
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Dear Tim,

thanks for reply...


still does not working....
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic