3 Replies Latest reply on Jul 21, 2008 11:27 AM by Tony Herstell

    Seam Text

    Tony Herstell Master

      I am trying to validate some Seam Text myself (So I can pop out useful error messages).


      I notice the message appearing in seamWiki and have tried to look at what the code is doing in the example area.


      All I want to do is:


      valitorResults = validate(message);
      if (valitorResults.hasError) {
         forEachError ... {
           compoundErrorMessageToReturn = compoundErrorMessageToReturn  + error.getMessage()
         }
         facesMessages.add(FacesMessage.SEVERITY_INFO, compoundErrorMessageToReturn);
      }
      



      closest I could discover was in class FormattedTextValidator... but I find it hard to follow whats going on.


      Any suggestions?

        • 1. Re: Seam Text
          Tony Herstell Master

          Basically the same error(s) that pop out in the console...


          18:31:18,291 WARN  [UIFormattedText] Seam Text parse error: unexpected token: &



          • 2. Re: Seam Text
            Tony Herstell Master
            try {
                           renderer.render("/WEB-INF/pages/mailingList/emailWrapper.xhtml");
                      } catch (Exception e) {
                           log.info("An Error Occured...");
                      }
                      return null;



            I tried this in my preview code; hoping that somethign woudl allow me to see any errors; but to no avail.


            :/


            This appeared in log file; but nothing passed back to me (and the email was still sent)



            01:29:31,197 WARN  [UIFormattedText] Seam Text parse error: unexpected token: #
            01:30:56,416 WARN  [UIFormattedText] Seam Text parse error: unexpected token: #
            01:31:08,197 WARN  [UIFormattedText] Seam Text parse error: unexpected token: #

            • 3. Re: Seam Text
              Tony Herstell Master

              FIXED

              Aha!



              Who added this?



              29.1.4. Seam Text
              29.1.4.1. <s:validateFormattedText>
              Description
              Checks that the submitted value is valid Seam Text
              Attributes
              None.