1 Reply Latest reply on Jul 23, 2009 4:04 PM by Juan Pablo Gardella

    Exception Handling Problem (2.0.1.SP1) and a:commandLink

    Juan Pablo Gardella Newbie
      Hi

      I have a problem with exception handling.


      If I call an action from a a:commandLink and inside the action method throw an exception, the message doesn't show, but if I replace with a s:link work fine.

      Ex:


      for (int i=0; i<100; i++) {
         log.info("Hello world!");
      }

      <a:commandLink value=".." action="{#foo.action}" />

      public String action(){
      throw new foo.AnException();
      }

      <exception class="foo.AnException">
                <redirect view-id="/error.xhtml">
                     <message severity="ERROR">
      A message!!               </message>
                </redirect>
           </exception>



      A message!! doesn't show.

      But replace a:commandLink with

      <s:link value=".." action="{#foo.action}" />

      Work.

      How can I solve this problem?

      Thanks


      PD: Sorry my english

        • 1. Re: Exception Handling Problem (2.0.1.SP1) and a:commandLink
          Juan Pablo Gardella Newbie
          <blockquote>
          _Juan Pablo Gardella wrote on Jul 23, 2009 16:03:_<br/>

          Hi

          I have a problem with exception handling.


          If I call an action from a a:commandLink and inside the action method throw an exception, the message doesn't show, but if I replace with a s:link work fine.

          Ex:

          <a:commandLink value=".." action="{#foo.action}" />

          public String action(){
          throw new foo.AnException();
          }

          <exception class="foo.AnException">
                          <redirect view-id="/error.xhtml">
                                  <message severity="ERROR">
          A message!!                     </message>
                          </redirect>
                  </exception>



          A message!! doesn't show.

          But replace a:commandLink with

          <s:link value=".." action="{#foo.action}" />

          Work.

          How can I solve this problem?

          Thanks


          PD: Sorry my english


          </blockquote>

          Click HELP for text formatting instructions. Then edit this text and check the preview.