GeeCON Prague 2014*
The moose likes JSF and the fly likes Problem with Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


JavaRanch » Java Forums » Java » JSF
Bookmark "Problem with "rendered" Flag" Watch "Problem with "rendered" Flag" New topic
Author

Problem with "rendered" Flag

Maryam Nouhnejad
Ranch Hand

Joined: Oct 04, 2006
Posts: 39
I want to show a list of data to the user. My problem is that if I set the 'rendered' flag of <h utputText> to 'false' just the header of the table appears (not the whole information) ... and if I set it to 'true', the page throws an exception.

Here are the codes I have written so far :

This is a part of my jsp code:

Here is the source code of TableData.java :

This part has been taken from faces-config.xml :

& this is my bean class :



please kindly help me,
Thank you,
Maryam
[ June 10, 2007: Message edited by: Maryam Nouhnejad ]
[ June 10, 2007: Message edited by: Maryam Nouhnejad ]
Gabriel Claramunt
Ranch Hand

Joined: May 26, 2007
Posts: 375
You're getting an exception with the rendered attribute because when you set it to true, it actually executes the methods of the bean, and there you have the problem.
I didn't look closely at your code, can you post the exception?
Setting rendered =true for the different components will help you to isolate where the problem lies


Gabriel
Software Surgeon
Maryam Nouhnejad
Ranch Hand

Joined: Oct 04, 2006
Posts: 39
These are the exceptions printed in the log console :






Thank you,
Maryam
Maryam Nouhnejad
Ranch Hand

Joined: Oct 04, 2006
Posts: 39
My problem is over now...
I changed the first code to the second (look at the names of the setters and getters) :

Gabriel Claramunt
Ranch Hand

Joined: May 26, 2007
Posts: 375
Yep, the exception message tells everything:
"Error getting property 'userlog' from bean of type beanPack.UserLogs"
"userlogs" in bean notation is "getUserlogs" and in your bean you had "getUserLogs"
Glad you had it working now
 
GeeCON Prague 2014
 
subject: Problem with "rendered" Flag