• Post Reply Bookmark Topic Watch Topic
  • New Topic

JSF does NOT error!?  RSS feed

 
Rory Evans
Greenhorn
Posts: 18
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi all,

Wondering if somebody can shed some light on the following behaviour:

In my xhtml page, if the value attribute of a component attempts to reference a bean name that has not been declared as a managed bean in faces-config, JSF does not error when rendering the page.

For example, if I have the following component: <h:inputText id="id" value="#{BeanThatDoesntExist.someMethod}" />

JSF happily carries on without telling me that i've done something stupid. This can be very frustrating when trying to track down bugs.

On the other hand, if the bean HAS been declared as a managed bean in faces-config but I attempt to call a method that doesn't exist on that bean, JSF will rightly tell me that i'm being stupid.

So my qusetion is this: why does JSF let you attempt to reference a bean that doesn't exist but not a method?
 
Tim Holloway
Bartender
Posts: 18662
71
Android Eclipse IDE Linux
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Actually, I think that you do get an error message in the server log. But JSF operates in terms of postback operations, so whenever no explicit navigation instructions are given, JSF simply redisplays the page.
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!