Hi.

No, I mean no std. Validation Error messages. These work fine.
I mean custom Messages that you add with
FacesContext.addMessage(ClientId, FacesMessage). This will be printed
"as-is" with no field label attached to it (as {0} or similar).

I've used some workaround that is used internally by myfaces. Iterate
over all UIComponents on the page, find the OutputLabels, look at the
"for" Attribute and get its Component. If it's the label of the given
field, extract the label value - which is not very nice. All you get is
the EL expression - you have to parse and I18N it by yourself :(.

But works for me.

regards,
Veit


Mike Kienenberger schrieb:
> If you've set everything else up, it should be automatic:
> 
> http://www.mail-archive.com/users%40myfaces.apache.org/msg15110.html
> 
> On 1/16/06, Veit Guna <[EMAIL PROTECTED]> wrote:
>> Hi.
>>
>> How can I get the label (outputLabel) for a specific component? I need
>> this, to add the label text to a custom validation message. It seems
>> that {0} isn't filled automatically with the label when I add a custom
>> message with addMessage to the clientId (field).
>>
>> regards,
>> Veit
>>
> 
> 

Reply via email to