As I said earlier in this thread: set an explicit requiredMessage string.

IMO, expecting component ids to be meaningful as part of error messages
is wrong. They (a) are names chosen by a programmer for coding purposes
not ui purposes, and (b) are not localisable. The default behaviour of
inserting the id/clientId into the message should be just a last fallback.

The code that actually handles this is
    UIInput.validateValue
which invokes
   _MessageUtils.getLabel
which returns component.getClientId by default.

It is interesting that myfaces 1.1.x inserts just the component id by
default, while myfaces 1.2 inserts the component clientId. Catagay
Civici made these changes in r518079 and r518084 but there is no hint
there why he made it use the full clientId instead of just id.

Interestingly, _MessageUtils.getLabel (myfaces 1.2.x) does also look for
an attribute or valueExpression called "label", and returns that if
present. I wonder what that is for...

Have you tried Sun Mojarra? If that outputs ids rather than client-ids
then there is a reasonable chance that myfaces would be changed to
match. But IMO it would *still* be wrong to rely on ids to create
meaningful error messages for users.

Regards,
Simon

j.palleschitz schrieb:
> could someone tell me what the problem could be? please  ;o)
>
> i get following message:  contentView:Username: required field!
>
> and this looks not really nice.
>
>
>
>
> j.palleschitz wrote:
>   
>> hi, 
>>
>> now i have another problem like this.
>> the id of the subview is rendered before den Message.
>>
>> any idea?
>>
>> thanks
>>
>>     
>
>   


-- 
-- Emails in "mixed" posting style will be ignored
-- (http://en.wikipedia.org/wiki/Posting_style)

Reply via email to