This week's book giveaway is in the Design forum.
We're giving away four copies of Building Microservices and have Sam Newman on-line!
See this thread for details.
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


Win a copy of Building Microservices this week in the Design forum!
JavaRanch » Java Forums » Java » JSF
Bookmark "for attribute of h:message" Watch "for attribute of h:message" New topic
Author

for attribute of h:message

Julien Martin
Ranch Hand

Joined: Apr 24, 2004
Posts: 384
Hello,

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?
Julien.

Mark Spritzler
ranger
Sheriff

Joined: Feb 05, 2001
Posts: 17271
    
    6

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.

Mark


Perfect World Programming, LLC - Two Laptop Bag - Tube Organizer
How to Ask Questions the Smart Way FAQ
 
I’ve looked at a lot of different solutions, and in my humble opinion Aspose is the way to go. Here’s the link: http://aspose.com
 
subject: for attribute of h:message
 
It's not a secret anymore!