Decoration and mesages not beign applied to file (is appearing in global area)
tony.herstell1 Sep 10, 2009 7:39 AMSeam latest, RF latest.
I am decorating a field.
<s:decorate id="entity_user_email_decorator" template="../../WEB-INF/pages/editDecorator.xhtml"> <ui:define name="label"> <h:outputText value="#{messages.entity_user_email_label}" /> </ui:define> <ui:define name="content"> <h:inputText id="registration_email" value="#{risingstars.user.email}" required="true" size="70"> <a4j:support event="onblur" ajaxSingle="true" limitToList="true" reRender="entity_user_email_decorator"/> </h:inputText> </ui:define> <ui:define name="hint"> <s:formattedText value="#{messages.entity_user_email_hint}" /> </ui:define> </s:decorate>
<?xml version="1.0" encoding="UTF-8"?> <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" xmlns:rich="http://richfaces.org/rich"> <div class="edit_decorator_area"> <h:panelGrid columns="3" columnClasses="edit_decorator_label_area, edit_decorator_tag_area, edit_decorator_field_area, edit_decorator_error_area" width="100%"> <h:column> <s:label styleClass="#{invalid?'error':''}"> <ui:insert name="label" /> </s:label> </h:column> <h:column> <h:outputText styleClass="mandatory" value="#{messages.general_mandatory_tag}" rendered="#{required}" /> </h:column> <h:column> <span class="edit_decorator_content_area #{invalid?'errorblock':'noerrorblock'}"> <h:panelGrid columns="1"> <h:column> <s:validateAll> <ui:insert name="content" /> </s:validateAll> </h:column> <h:column> <span class="edit_decorator_hint_area"> <ui:insert name="hint" /> </span> </h:column> </h:panelGrid> </span> </h:column> <h:column /> <h:column /> <h:column> <ui:insert name="error_messages"> <s:message styleClass="error" /> </ui:insert> </h:column> </h:panelGrid> </div> </ui:composition>
Then I raise a message on the field:
statusMessages.addToControlFromResourceBundle("registration_email", Severity.WARN, "user_email_already_exists_in_system");
but it does not appear on the field.
It seems to drop back to appearing at the top of the page in the messages area.
The errors coming through from hiberante annotation errors seem to work fine.
Any ideas?