Examples of ConverterException


Examples of javax.faces.convert.ConverterException

        {
            converter = findUIOutputConverter(facesContext, output);
        }
        catch (FacesException e)
        {
            throw new ConverterException(e);
        }

        return converter == null ? submittedValue : converter
                .getAsObject(facesContext, output, (String) submittedValue);
    }
View Full Code Here

Examples of javax.faces.convert.ConverterException

            return null;
        }

        if (!(submittedValue instanceof String[]))
        {
            throw new ConverterException("Submitted value of type String[] for component : "
                    + getPathToComponent(selectMany) + "expected");
        }

        return org.apache.myfaces.shared_impl.renderkit._SharedRendererUtils.getConvertedUISelectManyValue(facesContext,
                selectMany, (String[]) submittedValue);
View Full Code Here

Examples of javax.faces.convert.ConverterException

                {
                    return Boolean.valueOf(value.equals(trueValue));
                }
                catch (Exception e)
                {
                    throw new ConverterException(e);
                }
            }
        }
        return null;
    }
View Full Code Here

Examples of javax.faces.convert.ConverterException

        {
            return ((Boolean) value).booleanValue() ? trueValue : falseValue;
        }
        catch (Exception e)
        {
            throw new ConverterException(e);
        }
    }
View Full Code Here

Examples of javax.faces.convert.ConverterException

                catch (ParseException e)
                {
                    FacesMessage message = MessageUtils.getMessage(facesContext, CONVERSION_MESSAGE_ID, new Object[]{uiComponent.getId(),value});
                    message.setSeverity(FacesMessage.SEVERITY_ERROR);
                   
                    throw new ConverterException(message, e);
                }
            }
        }
        return null;
    }
View Full Code Here

Examples of javax.faces.convert.ConverterException

        {
            return format.format(value);
        }
        catch (Exception e)
        {
            throw new ConverterException("Cannot convert value '" + value + "'");
        }
    }
View Full Code Here

Examples of javax.faces.convert.ConverterException

    {
        Locale lokale = _locale != null ? _locale : facesContext.getViewRoot().getLocale();

        if (_pattern == null && _type == null)
        {
            throw new ConverterException("Cannot get NumberFormat, either type or pattern needed.");
        }

        // pattern
        if (_pattern != null)
        {
            return new DecimalFormat(_pattern, new DecimalFormatSymbols(lokale));
        }

        // type
        if (_type.equals("number"))
        {
            return NumberFormat.getNumberInstance(lokale);
        }
        else if (_type.equals("currency"))
        {
            return NumberFormat.getCurrencyInstance(lokale);
        }
        else if (_type.equals("percent"))
        {
            return NumberFormat.getPercentInstance(lokale);
        }
        throw new ConverterException("Cannot get NumberFormat, illegal type " + _type);
    }
View Full Code Here

Examples of org.apache.flex.utilities.converter.exceptions.ConverterException

     * @throws ConverterException
     */
    @Override
    protected void processDirectory() throws ConverterException {
        if(!rootSourceDirectory.exists() || !rootSourceDirectory.isDirectory()) {
            throw new ConverterException("Flash SDK directory '" + rootSourceDirectory.getPath() + "' is invalid.");
        }

        generateRuntimeArtifacts();
        generateFrameworkArtifacts();
    }
View Full Code Here

Examples of org.grails.web.converters.exceptions.ConverterException

        response.setContentType(GrailsWebUtil.getContentType(contentType, encoding));
        try {
            render(response.getWriter());
        }
        catch (IOException e) {
            throw new ConverterException(e);
        }
    }
View Full Code Here

Examples of org.sql2o.converters.ConverterException

        if (val instanceof Datum){
            try {
                return new LocalDate (((Datum)val).dateValue());
            } catch (SQLException e) {
                throw new ConverterException(String.format("Error trying to convert oracle date to %s", LocalDate.class.getName()), e);
            }

        }

        return super.convert(val);
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.