Package javax.faces

Examples of javax.faces.FacesException


                    validatorState.setActive(true);
                    GraphValidatorState.setState(context, value, validatorState);
                } catch (NoSuchMethodException e) {
                    // do nothing, that is really not possible - clone() impemented in Object.
                } catch (InvocationTargetException e) {
                    throw new FacesException(e);
                } catch (IllegalArgumentException e) {
                    // do nothing, that is really not possible - method has no arguments.
                } catch (IllegalAccessException e) {
                    throw new FacesException(e);
                }
            }
        }
        super.processDecodes(context);
        if (null != validatorState) {
View Full Code Here


            if (child instanceof UIHashParameter) {
                UIHashParameter hashParameter = (UIHashParameter) child;
                String name = hashParameter.getName();
                Map<String, Object> value = hashParameter.getValue();
                if (name == null) {
                    throw new FacesException("attribute 'name' for the nested " + UIHashParameter.class.getName()
                            + " component (id = '" + hashParameter.getClientId() + "') should not be 'null'");
                } else {
                    parameters.put(name, value);
                }
            }
View Full Code Here

    private LibraryFunction getFromLoadingCache(LoadingCache<Class<?>, LibraryFunction> cache, Class<?> clazz) {
        try {
            return cache.get(clazz);
        } catch (ExecutionException e) {
            Throwable cause = e.getCause();
            throw new FacesException(cause);
        }
    }
View Full Code Here

    public ResourceLibrary getResourceLibrary(String name, String library) {
        ResourceKey resourceKey = new ResourceKey(name, library);
        try {
            return instances.get(resourceKey);
        } catch (ExecutionException e) {
            throw new FacesException(String.format("Can't resolve resource library %s", resourceKey), e);
        }
    }
View Full Code Here

            // Map and ResourceBundle have special resolvers that we doesn't support
            if (!Map.class.isAssignableFrom(beanClass) && !ResourceBundle.class.isAssignableFrom(beanClass)) {
                try {
                    return cache.get(beanClass).getContainerClass(propertyName);
                } catch (ExecutionException e) {
                    throw new FacesException(String.format("Can't resolve the beanClass '%s' from propertyName '%s'", beanClass, propertyName), e);
                }
            }
        }

        return genericPropertyClass;
View Full Code Here

        private PropertyDescriptor getPropertyDescriptor(String propertyName) {
            BeanInfo beanInfo = null;
            try {
                beanInfo = Introspector.getBeanInfo(beanClass);
            } catch (IntrospectionException e) {
                throw new FacesException(e.getMessage(), e);
            } finally {
                Introspector.flushFromCaches(beanClass);
            }

            if (beanInfo == null) {
View Full Code Here

                    LOG.warn("Found JavaScript function definition for class " + component.getType()
                        + ", but that class is not presented");
                }
            }
        } catch (Exception e) {
            throw new FacesException("Error parsing config file " + url, e);
        }
        return result;
    }
View Full Code Here

      } else {
        writer.writeAttribute("href", "javascript:void(0)", null);
       
        UIComponent form = ComponentUtils.findParentForm(facesContext, menuItem);
        if(form == null) {
          throw new FacesException("Menubar must be inside a form element");
        }
       
        String formClientId = form.getClientId(facesContext);
        String command = menuItem.isAjax() ? buildAjaxRequest(facesContext, menuItem, formClientId, clientId) : buildNonAjaxRequest(facesContext, menuItem, formClientId, clientId);
       
View Full Code Here

      SimpleDateFormat dateFormat = new SimpleDateFormat(calendar.getPattern(), calendar.calculateLocale(FacesContext.getCurrentInstance()));
      dateFormat.setTimeZone(calendar.calculateTimeZone());
     
      return dateFormat.format((Date) date);
    } else {
      throw new FacesException("Date could be either String or java.util.Date");
    }
  }
View Full Code Here

    }
   
    if(calendar.getSelectListener() != null) {
      UIComponent form = ComponentUtils.findParentForm(facesContext, calendar);
      if(form == null)
        throw new FacesException("Calendar \"" + calendar.getClientId(facesContext) + "\" must be enclosed with a form when using ajax selection.");
     
      writer.write(",formId:'" + form.getClientId(facesContext) + "'");
      writer.write(",url:'" + getActionURL(facesContext) + "'");
      writer.write(",hasSelectListener:true");
     
View Full Code Here

TOP

Related Classes of javax.faces.FacesException

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.