aspose file tools*
The moose likes JSF and the fly likes visual jsf is about to kill me Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Java 8 in Action this week in the Java 8 forum!
JavaRanch » Java Forums » Java » JSF
Bookmark "visual jsf is about to kill me" Watch "visual jsf is about to kill me" New topic
Author

visual jsf is about to kill me

Jorge Bendahan
Ranch Hand

Joined: Apr 11, 2008
Posts: 82
I never want to work again with visual jsf , Here is my problem: I have 2 pages, Client and Client_update. In the Client page, when I select a client from a table the selected client get's stored in the sessionBean and it gets redirected to Client_update and all the client attributes are displayed in this new page, the user can change some of these values and finally press a button to save those changes, but when i debbug, the fields always contain empty values. i noticed that the pre-render method get's called several times, so i setted up a flag to get the values only once, but still it doesnt work, what can i do?
Tim Holloway
Saloon Keeper

Joined: Jun 25, 2001
Posts: 15661
    
  15

I'll admit that when WYSIWYG designers for JSF become common, I'll have a much easier time of things, but you're giving a classic illustration of why IDEs are dangerous. They let you think you can do something even when you don't actually know what you're doing. I've dug myself into some pretty deep holes that way.

Your problem isn't in the IDE, it's in uderstanding JSF itself. One of the peculiarities of JSF is that in a request/response cycle, both the setter and getter methods for backing bean properties can end up getting called multiple times and at times and in ways that aren't easily predictable. For this reason, the mutator methods should not have side-effects. In particular, avoid database services (not only do you risk data corruption, the performance hits can be considerable).

From your particular complaint, however, I think you're using the wrong scope. Unfortunately, JSF tends to require a lot more in the way of session scope objects than most other platforms, mostly because of its extensive use of postback. Since request-scope objects get created from scratch at the beginning of every request/response cycle that needs them, stuff that doesn't get posted back and forth evaporates quickly.


Customer surveys are for companies who didn't pay proper attention to begin with.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: visual jsf is about to kill me
 
Similar Threads
Method in Backing bean doesn't work
visual jsf
About Netbeans Visual JSF Framework
need help in visual jsf calendar component
Netbeans VWP File Upload component problem