invalid from "old" edit.xhtml with richfaces.
tony.herstell1 Jul 20, 2008 2:06 PMUsing the non richFaces way of doing things we were able to automagically get access to the invalid variable; in this case to set the border round the component red...
However moving to a Rich way of working:
specifically not using
<s:message styleClass="edit_template_error error" />
as used in
<ui:composition xmlns="http://www.w3.org/1999/xhtml" xmlns:ui="http://java.sun.com/jsf/facelets"
        xmlns:h="http://java.sun.com/jsf/html" xmlns:f="http://java.sun.com/jsf/core"
        xmlns:s="http://jboss.com/products/seam/taglib">
        <div class="edit_template_area">
                <span class="edit_template_non_hint_area">
                        <span class="edit_template_non_error_area">
                                <span class="edit_template_label_area">
                                        <s:label styleClass="#{invalid?'error':''}">
                                                <ui:insert name="label" />
                                        </s:label>
                                </span>
                                <span class="edit_template_hint_area">
                                        <ui:insert name="hint"/>
                                </span>   
                                <span class="edit_template_content_area #{invalid?'errorblock':'noerrorblock'}">
                                        <s:validateAll>
                                                <ui:insert name="content" />
                                        </s:validateAll>
                                </span>
        
                                <span class="edit_template_tag_area">
                                        <h:outputText styleClass="mandatory" value="#{messages.general_mandatory_tag}" rendered="#{required}"/>
                                </span>
                        </span>
                        <span class="edit_template_error_area">
                                <center>
                                        <s:message styleClass="edit_template_error error" />
                                </center>
                        </span>
                </span>
        </div>
</ui:composition> but instead using
<rich:message id="messageTextErrorMessages" errorClass="error" warnClass="warn" infoClass="info" for="messageText"/>
 it appears that the invalid variable is not automagically set.
How has this been done now?
<a4j:outputPanel id="messageTextInputPanel">
        <div>
                <span>
                        <h:inputTextarea class="#{invalid?'errorblock':'noerrorblock'}" id="messageText" value="#{messageText}" cols="68" rows="30" required="true"/>
                </span>
                <span>
                        <rich:message id="messageTextErrorMessages" errorClass="error" warnClass="warn" infoClass="info" for="messageText"/> 
                </span>
        </div>
</a4j:outputPanel>
class="#{invalid?'errorblock':'noerrorblock'}"invalid is not being set now!
 
    