explain please more about #{invalid} context variable.
From the Seam Reference Guide:
32.1.3.1. <s:decorate>
Description
"Decorate" a JSF input field when validation fails or when required="true" is set.
Attributes
template: the facelets template to use to decorate the component
#{invalid} and #{required} are available inside s:decorate; #{required} evaluates to true if you have set the input component being decorated as required, and #{invalid} evaluates to true if a validation error occurs.
Usage<s:decorate template="edit.xhtml"> <ui:define name="label">Country:</ui:define> <h:inputText value="#{location.country}" required="true"/> </s:decorate> <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> <s:label styleClass="#{invalid?'error':''}"> <ui:insert name="label"/> <s:span styleClass="required" rendered="#{required}">*</s:span> </s:label> <span class="#{invalid?'error':''}"> <s:validateAll> <ui:insert/> </s:validateAll> </span> <s:message styleClass="error"/> </div> </ui:composition>
#{invalid} and #{required} are available inside s:decorate; #{required} evaluates to true if you have set the input component being decorated as required, and #{invalid} evaluates to true if a validation error occurs.
Hello,
Just make changes in reRender attribute of a4j:support. Set reRender all decorate tag:
<a4j:support id="shortNameCheck" event="onblur" reRender="shortNameField" ajaxSingle="true" bypassUpdates="true" />
Wow, thanks very much. That's exactly what was missing. I went back and checked Seam in Action, and indeed, the reRender attribute is there. I'm not sure how I managed to leave it off.
Guess I feel pretty stupid about now.
Thanks again.