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?
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.
"privilege" comes from the Latin words for "private" and "law" (legal) and dates to feudal times. To "claim privilege" meant that you were above the laws that applied to the common people.
Of course, I found a very beautiful couch. Definitely. And this tiny ad: