File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes JSF and the fly likes for attribute of h:message Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » JSF
Bookmark "for attribute of h:message" Watch "for attribute of h:message" New topic

for attribute of h:message

Julien Martin
Ranch Hand

Joined: Apr 24, 2004
Posts: 384

Suppose I have two h:forms each with one h:command button, all of which are on a jsf page. I would like to find a way to display error messages with two h:message components each working for a given h:command button but it seems that the for attribute of a h:message can't point to a h:command button. What is the best way of achieving the desired behavior?

Mark Spritzler

Joined: Feb 05, 2001
Posts: 17276

What form button can have an error message?

error messages can occur from validation and conversion, which don't occur on buttons. There is nothing to validate or convert, so therefore no error messages. If you want your general all error messages for the form to be near the button, you can do that, but it doesn't change the button tag or uses the "for" attribute.


Perfect World Programming, LLC - iOS Apps
How to Ask Questions the Smart Way FAQ
I agree. Here's the link:
subject: for attribute of h:message
It's not a secret anymore!