dev@javaserverfaces.java.net

Re: javax.faces.component.MessageFactory.getLabel(FacesContext,UIComponent)

From: Mark Collette <mark.collette_at_icesoft.com>
Date: Tue, 30 Oct 2007 12:22:21 -0600

Ryan Lubke wrote:

> Ok, as odd as it looks, the code as it exist now is correct.
> Consider a simple page using f:loadBundle for a custom resource.
> We've initiated a post-back, and a conversion error has occurred.
>
> At the time that the conversion error is being processed, the bundle
> from loadBundle hasn't been pushed into the request scope,
> so component.getAttributes().get("label") returns an empty String.
>
> So the logic returns a the ValueExpression itself to be evaluated
> when the page renders (after the bundle has been pushed into scope).


That makes sense. By the way, why is that whole MessageFactory mechanism
hidden, instead of accessible to developers? Is it not in the spec? Is
there some way of adding it?

- Mark Collette