Package javax.faces

Examples of javax.faces.FacesException


        Class validatorClass = _validatorClassMap.get(validatorId);
        if (validatorClass == null)
        {
            String message = "Unknown validator id '" + validatorId + "'.";
            log.error(message);
            throw new FacesException(message);
        }

        try
        {
            return (Validator) validatorClass.newInstance();
        }
        catch (Exception e)
        {
            log.error("Could not instantiate validator " + validatorClass, e);
            throw new FacesException("Could not instantiate validator: " + validatorClass, e);
        }
    }
View Full Code Here


            // Prepare the parameters to the cipthers
            // AlgorithmParameterSpec paramSpec = new IvParameterSpec(s);
            e.init(Cipher.ENCRYPT_MODE, key);
            d.init(Cipher.DECRYPT_MODE, key);
        } catch (Exception e) {
            throw new FacesException("Error set encryption key", e);
        }
    }
View Full Code Here

                        partialStart(context, ((UIComponent) item).getClientId(context));
                        ((UIComponent) item).encodeAll(context);
                        partialEnd(context);
                        addOnCompleteParam(context, itemName, panel.getClientId(context));
                    } catch (IOException e) {
                        throw new FacesException(e);
                    }
                    return VisitResult.COMPLETE;
                } else {
                    return VisitResult.ACCEPT;
                }
View Full Code Here

            }
        }

        if (panel.getMinHeight() != -1) {
            if (panel.getMinHeight() < SIZE) {
                throw new FacesException("Attribbute minWidth should be greater then 10px");
            }
        }

        if (panel.getMinWidth() != -1) {
            if (panel.getMinWidth() < SIZE) {
                throw new FacesException("Attribbute minHeight should be greater then 10px");
            }
        }
    }
View Full Code Here

                s = "{" + s + "}";
            }
            try {
                return new HashMap<String, Object>(new JSONMap(s));
            } catch (JSONException e) {
                throw new FacesException(e);
            }
        } else {
            throw new FacesException("Attribute visualOptions of component ["
                + panel.getClientId(FacesContext.getCurrentInstance())
                + "] must be instance of Map or String, but its type is " + value.getClass().getSimpleName());
        }
    }
View Full Code Here

        buffer = null;

        try {
            value = (encoding != null) ? new String(bytes, encoding) : new String(bytes);
        } catch (UnsupportedEncodingException e) {
            throw new FacesException(e.getMessage(), e);
        }
    }
View Full Code Here

        try {
            ResponseWriter writer = facesContext.getResponseWriter();
            encodeRow(writer, facesContext, holder);
        } catch (IOException e) {
            throw new FacesException(e);
        }

        holder.nextCell();
        return DataVisitResult.CONTINUE;
    }
View Full Code Here

                                formattedSummary, formattedMessage));
                        }
                    }
                }
            } catch (ELException e) {
                throw new FacesException(e);
            }
        }
    }
View Full Code Here

    public Collection<String> validateExpression(FacesContext context, ValueExpression expression, Object newValue,
        Class<?>... groups) {

        if (null == context) {
            throw new FacesException(INPUT_PARAMETERS_IS_NOT_CORRECT);
        }

        Collection<String> validationMessages = null;
        if (null != expression) {
            ValueDescriptor valueDescriptor;
            try {
                valueDescriptor = analayser.updateValueAndGetPropertyDescriptor(context, expression, newValue);
            } catch (ELException e) {
                throw new FacesException(e);
            }

            if (valueDescriptor != null) {
                validationMessages = validate(context, valueDescriptor.getBeanType(), valueDescriptor.getName(), newValue,
                    groups);
View Full Code Here

                return null;
            } else {
                return buildAndStoreValidatorScript(behaviorContext, clientValidator);
            }
        } else {
            throw new FacesException(
                    "ClientBehavior for ClientValidatorRenderer does not implement ClientValidatorBehavior interface");
        }
    }
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.