3 Replies Latest reply on Nov 27, 2012 12:34 PM by Anil Arora

    Hiding rich:messages span when no messages exist

    Anil Arora Newbie

      As part of the migration from RF 3.3.0 to RF 4.2.3.Final, I found an issue with how rich:messages behaves when there are no messages.  It keeps the rendered <span> even when no messages exists.

      This causes a problem because we want to decorate the message box with a background color.

       

      <rich:messages id="errorMessage" styleClass="yx-message" layout="list" />

       

      And what gets rendered is

       

      <span class="rf-msgs yx-message" id="errorMessage"></span>

       

      Unfortunately, this shows up as an empty box with the background color. 

      Any thoughts?  Workarounds?  I wasn't able to find anything to allow me to use the rendered attribute in a <ui:fragment> to hide this span.