users@javaserverfaces.java.net

JSF 1.2_07 and abstract beans

From: Yann Simon <yann.simon.fr_at_gmail.com>
Date: Thu, 24 Jan 2008 10:19:33 +0100

Hi!

I tried to update from JSF 1.2_04 to JSF 1.2_07 and I got an error.
I use abstract beans sometimes and the JSF 1.2_07 validate that the beans
are not abstract.

The error message was hidden in the stack trace because JSF tried to give me
a localized error message and cannot find a bundle in my locale.
(com.sun.faces.config.ConfigurationException: CONFIGURATION FAILED! Can't
find bundle for base name ApplicationResources, locale de_DE)
(Why does JSF need a bundle in my locale to get me a validation error? )

OK, back to my abtract beans.

I use abstract bean, because it is very convenient.
I can write my xhtml with #{TheAbstractBean.xyz}.

To go to this page, I just use a sort of "bean injection" like this one:
<h:commandLink action="#{TheBean.init}">
  <f:setPropertyActionListener value="#{TheBean}"
target="#{TheAbstractBean}" />
</h:commandLink>

With TheBean extends TheAbstractBean.

I can also re-use the same xhtml with different implementations of the
abstract bean.
That works great.
But as the validation with JSF 1.2_07 failed, i cannot upgrade... :(

Any reason to validate that? Part of specifications?

Yann