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

From: Ryan Lubke <Ryan.Lubke_at_Sun.COM>
Date: Tue, 30 Oct 2007 11:45:38 -0700

Mark Collette wrote:
> 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?
Right, it's an implementation detail.

There is quite a bit of utility code like this that could be useful as
part of the spec.

I'd recommend logging an issue against the spec here:

> - Mark Collette
> ---------------------------------------------------------------------
> To unsubscribe, e-mail:
> For additional commands, e-mail: