I am a Greenhorn to JSF and have been battling my way through learning how to use it and produce a Production product at the same time. I have been using JavaServerFaces IN Action by Kito D. Mann. Apparently I cannot right off find anything with more explanation than is found on page 148 (4.2 Common Component properties). Also, Google and Bing searchs bring up some information, but does not seem to addres my particular concern.
I am working with a series of comments of which I can have up to ten levels. The first level (0 based) is always displayed, but the other nine levels (1-9) I want to not be rendered as visible until that level is reached. The following is a snippet of code reflecting what I am attempting. The example has backing bean: level. The 'comment1' and 'name1' fields both have getters and setters in the 'level' backing bean.
This works great for not displaying this particular panelGrid when the level is 0. And the readonly works great for levels above 1 in this example. But when the level is 1 and the screen is submitted whatever has been entered on the screen in the 'comment1' and 'name1' fields is returned as 'null' instead of what has been entered for the comment and name.
What am I missing? What have I not learned yet? Can someone point me to an explanation on how to use this?
Richard Blaha wrote:Thanks for your direction so far. Where do I go from here? Sounds like a sticky wicket right now.
For that you might want to talk to some local experts. Sometimes it's easier to tell when you can go "hands-on".
Joined: Dec 13, 2007
The answer lies somewhere in my production code. I just wrote a quick webapp to test using a tutorial database table and the rendered parameter appears to work as described. Now to find the difference between my test code and my production code. Not sure where to look or what to look for.
subject: Using the rendered attribute nulls my value related backing bean variable.