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 Refactor Managed Bean Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » JSF
Bookmark "Refactor Managed Bean" Watch "Refactor Managed Bean" New topic
Author

Refactor Managed Bean

Gallen Thomas
Greenhorn

Joined: Aug 15, 2010
Posts: 13
Hi Everyone,

I am new at JSF and I am puzzled as to why when I refactor my backing bean, my JSF doesn't work anymore. Let me explain with code.


Everything works fine. When I run it, my browser displays "Hello World!" The minute I refactor (rename) Hello class to HelloTest and change hello.world (in my beanhello.xhtml) to hellotest.world, it doesn't work when I run it again. My browser display a blank page. I stopped and started the server, rebuild, redeploy and nothing works.

What am I doing incorrectly?

Thank you in advance.

Gregg
Daniel Del Moral
Ranch Hand

Joined: May 24, 2008
Posts: 32
If the new refactored Managed Bean name is HelloTest, you should call it from helloTest from the page, not hellotest. That should work.


SCJP 5, SCWCD 5
Gallen Thomas
Greenhorn

Joined: Aug 15, 2010
Posts: 13
Daniel Del Moral wrote:If the new refactored Managed Bean name is HelloTest, you should call it from helloTest from the page, not hellotest. That should work.


Ah yes, thank you Daniel! It works.
 
jQuery in Action, 2nd edition
 
subject: Refactor Managed Bean
 
Similar Threads
Primefaces setup causing problems JSF 2.0
Error with JBoss and JSF(My Page does not work)
No nothing works
Starting a JSF 2.0 project with PrimeFaces 2.2. M1 and Glassfish 3.0
Don't work any jfs scripts