4 Replies Latest reply on Apr 16, 2012 6:24 AM by Timo Hahn

    customize af:message err shown by entity level validation

    SantoshVaza
      Hi,

      I have some entity validation and attr validation, that works fine,
      I have some requirement to customize the default af:message(validation error) shown due to validation error in adf..
      Like
      1. change error icon
      2. change title
      3. change some content styling like if message is
      "Attr in Customer Details is required"
      then it should be displayed as
      "Attr in <blue color and some extra css>Customer Details</blue color and some extra css> is required"

      Can any expert help me pleaseeee.... :-)

      Regards,
      Santosh
      jdeveloper 11.1.1.5.0 + adf bc + adf faces

      Edited by: Santosh Vaza on Apr 11, 2012 4:32 PM
        • 2. Re: customize af:message err shown by entity level validation
          Timo Hahn
          You can skin the component
          /** ***************************************************** **/
          /** Komponente: Messages                                  **/
          /** ***************************************************** **/
          af|messages 
          {
               color: blue;
              background-color: #ffffff;
          }
          
          af|messages::error-icon  {
              content: 'Your_Url_Error';
              width: 0px;
              height: 0px;
          }
          
          af|messages::header-text {
              font-size: 14px;
              font-weight: bold;
          }
          
          af|messages::message-group-title {
              font-size: 14px;
              font-weight: bold;
              padding-top: 4px;
          }
          
          af|messages::component-link {
              font-size: 12px;
              font-weight: bold;
               color: blue;
          }
          
          /* The title for the combined messages */
          af|messages::intro {
              background-color: white;
              padding-top: 3px;
          }
          
          af|messages::info-icon {
              content: 'Your_Url_Info';
              width: 16px;
              height: 16px;
          }
          
          af|messages::confirmation-icon {
              content: 'Your_Url_Confimation';
              width: 16px;
              height: 16px;
          }
          
          af|messages::fatal-icon {
              content: ' Your_Url_Fatal';
              width: 16px;
              height: 16px;
          }
          
          af|messages::warning-icon {
              content: 'Your_Url_Warning';
              width: 16px;
              height: 16px;
          }
          Timo
          • 3. Re: customize af:message err shown by entity level validation
            SantoshVaza
            Hi Timo,
            but this will affect the messages globally, any way to do it particularly for validation messages...?
            • 4. Re: customize af:message err shown by entity level validation
              Timo Hahn
              For this you need your own error handler where you need to apply a style to the message on the fly. The problem I see is to distinguish the validation error from the 'other' errors at this stage as you only get an error...

              Timo