3 Replies Latest reply on Jun 10, 2009 8:03 PM by braldo

    Validation with rich:inplaceInput

    gallaghd

      I am trying to do simple Hibernate validation of a rich:inplaceInput element, with the support of a template, using the following code:



             <s:decorate id="phone" template="layout/edit.xhtml">
                  <ui:define name="label">Phone</ui:define>
                  <rich:inplaceInput value="#{selectedContact.phone}">
                       <a:support event="onblur" reRender="phonePanel"
                                 ajaxSingle="true" bypassUpdates="true"/>
                  </rich:inplaceInput>
              </s:decorate>



      The inplaceInput detects the invalid format, and flags the error.  However, if I enter a correctly formatted phone number, the new value is immediately replaced by the previous value, and the validation error remains.


      If I replace the rich:inplaceInput with a h:inputText, the code works fine.  I'm new to Seam and RichFaces, so I'm sure it's something simple I'm missing.  Ideas?  Thanks!


      I've also tried surrounding the s:decorate with an a:outputPanel, but it doesn't help.



           <a:outputPanel id="phonePanel">
              <s:decorate id="phone" template="layout/edit.xhtml">
                  <ui:define name="label">Phone</ui:define>
                  <h:inputText value="#{selectedContact.phone}">
                       <a:support event="onblur" reRender="phonePanel"
                                 ajaxSingle="true" bypassUpdates="true"/>
                  </h:inputText>
              </s:decorate>
              </a:outputPanel>