-
1. Re: RF 3 - rich:messages decorations?
richyclarke Jul 20, 2011 1:52 PM (in response to robertgary1)Hi,
facesContext.maximumSeverity can be used to determine if any messages are present.
You could try rendering a panel with a border using rendered="#{facesContext.maximumSeverity ne null}".
Alternatively check (facesContext.maximumSeverity==null) in a backing bean and set a styleClass property to a named CSS style. Then use styleClass="#{bean.getStyleClass}" on your page.
Haven't tried it but should work.
Rich
-
2. Re: RF 3 - rich:messages decorations?
robertgary1 Jul 20, 2011 2:13 PM (in response to richyclarke)Richard,
The only issue with that is that it requires a trip to the backing bean. I'm using clientside and server side validations. However, I think I've found a clientside solution.
.simpleSection {
border-style: solid;
border-width: thin;
border-color: gray;
}
<rich:messages styleClass="simpleSection" style="width:70%;border-spacing:5px;" errorClass="errorText" ajaxRendered="true" showSummary="false" showDetail="true" layout="table" id="messages"> <f:facet name="errorMarker"> <h:graphicImage url="/images/Status_red.gif"/> </f:facet> <f:facet name="infoMarker"> <h:graphicImage url="/images/Status_green.gif"/> </f:facet> </rich:messages> The border is then only rendered when there is a message.
-Robert