We solved a similar problem using a bean's method

public Map getHasErrorMessagesForChildren()

that returns a Map with key - component id and value - boolean (whether there are any error messages for children of the component).
Then in the jsp we use it:

<h:panelGrid rendered="#{mApplicationData.hasErrorMessagesForChildren['tab4']}" width="100%">
  <h:outputText value="Invalid input in tab4." styleClass="errorText"/>
</h:panelGrid>

As you can see, here the approach is used to check in which tab panels there are errors and to render appropriate message. (It also could be used to change the style of a panel or table that contains errors etc.)
I don't know how good this solution is but it is  at least an idea.

Jana

----- Original Message ----- From: "Dave" <[EMAIL PROTECTED]>
To: <[email protected]>
Sent: Tuesday, March 14, 2006 7:29 AM
Subject: more than one <h:messages>


A page has more than one dataTable, each table has <h:messages> above it so that user can tell which table error messages belong to.

But all <h:messages> display the same messages. Is there a way to scope <h:messages>?

 bigger than components, but less then page, not global.



---------------------------------
Yahoo! Mail
Use Photomail to share photos without annoying attachments.

Reply via email to