Package org.jboss.seam.annotations

Examples of org.jboss.seam.annotations.IfInvalid


   public Object aroundInvoke(InvocationContext invocation) throws Exception
   {
      Method method = invocation.getMethod();
      if ( method.isAnnotationPresent(IfInvalid.class) )
      {
         IfInvalid ifInvalid = method.getAnnotation(IfInvalid.class);
         InvalidValue[] invalidValues = getComponent().getValidator()
               .getInvalidValues( invocation.getTarget() );
         if (invalidValues.length==0)
         {
            return invocation.proceed();
         }
         else
         {
            log.debug("invalid component state: " + getComponent().getName());
            for (InvalidValue iv : invalidValues)
            {
               log.debug("invalid value: " + iv);
               if ( ifInvalid.refreshEntities() && iv.getBeanClass().isAnnotationPresent(Entity.class) )
               {
                  refreshInvalidEntity( ifInvalid, iv.getBean() );
               }
               FacesMessages.instance().addToControl(iv);
            }
            String outcome = ifInvalid.outcome();
            return Outcome.REDISPLAY.equals(outcome) ? null : outcome;
         }
      }
      else
      {
View Full Code Here

TOP

Related Classes of org.jboss.seam.annotations.IfInvalid

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.