Refine search
/** * @throws ConverterException {@inheritDoc} * @throws NullPointerException {@inheritDoc} */ public Object getAsObject(FacesContext context, UIComponent component, String value) { if (context == null || component == null) { throw new NullPointerException(); } // If the specified value is null or zero-length, return null if (value == null) { return (null); } value = value.trim(); if (value.length() < 1) { return (null); } try { return (Double.valueOf(value)); } catch (NumberFormatException nfe) { throw new ConverterException(MessageFactory.getMessage( context, DOUBLE_ID, value, "1999999", MessageFactory.getLabel(context, component)), nfe); } catch (Exception e) { throw new ConverterException(e); } }
/** * @throws ConverterException {@inheritDoc} * @throws NullPointerException {@inheritDoc} */ @Override public Object getAsObject(FacesContext context, UIComponent component, String value) { if (context == null || component == null) { throw new NullPointerException(); } // If the specified value is null or zero-length, return null if (value == null) { return (null); } value = value.trim(); if (value.length() < 1) { return (null); } try { return (Long.valueOf(value)); } catch (NumberFormatException nfe) { throw new ConverterException(MessageFactory.getMessage( context, LONG_ID, value, "98765432", MessageFactory.getLabel(context, component)), nfe); } catch (Exception e) { throw new ConverterException(e); } }
/** * @throws ConverterException {@inheritDoc} * @throws NullPointerException {@inheritDoc} */ public Object getAsObject(FacesContext context, UIComponent component, String value) { if (context == null || component == null) { throw new NullPointerException(); } // If the specified value is null or zero-length, return null if (value == null) { return (null); } value = value.trim(); if (value.length() < 1) { return (null); } try { return (Short.valueOf(value)); } catch (NumberFormatException nfe) { throw new ConverterException(MessageFactory.getMessage( context, SHORT_ID, value, "32456", MessageFactory.getLabel(context, component)), nfe); } catch (Exception e) { throw new ConverterException(e); } }
/** * @throws ConverterException {@inheritDoc} * @throws NullPointerException {@inheritDoc} */ public Object getAsObject(FacesContext context, UIComponent component, String value) { if (context == null || component == null) { throw new NullPointerException(); } // If the specified value is null or zero-length, return null if (value == null) { return (null); } value = value.trim(); if (value.length() < 1) { return (null); } try { return (Integer.valueOf(value)); } catch (NumberFormatException nfe) { throw new ConverterException(MessageFactory.getMessage( context, INTEGER_ID, value, "9346", MessageFactory.getLabel(context, component)), nfe); } catch (Exception e) { throw new ConverterException(e); } }
/** * @throws ConverterException {@inheritDoc} * @throws NullPointerException {@inheritDoc} */ public Object getAsObject(FacesContext context, UIComponent component, String value) { if (context == null || component == null) { throw new NullPointerException(); } // If the specified value is null or zero-length, return null if (value == null) { return (null); } value = value.trim(); if (value.length() < 1) { return (null); } try { return (Float.valueOf(value)); } catch (NumberFormatException nfe) { throw new ConverterException(MessageFactory.getMessage( context, FLOAT_ID, value, "2000000000", MessageFactory.getLabel(context, component)), nfe); } catch (Exception e) { throw new ConverterException(e); } }
/** * @throws ConverterException {@inheritDoc} * @throws NullPointerException {@inheritDoc} */ @Override public Object getAsObject(FacesContext context, UIComponent component, String value) { if (context == null || component == null) { throw new NullPointerException(); } // If the specified value is null or zero-length, return null if (value == null) { return (null); } value = value.trim(); if (value.length() < 1) { return (null); } try { return (Float.valueOf(value)); } catch (NumberFormatException nfe) { throw new ConverterException(MessageFactory.getMessage( context, FLOAT_ID, value, "2000000000", MessageFactory.getLabel(context, component)), nfe); } catch (Exception e) { throw new ConverterException(e); } }
/** * @throws ConverterException {@inheritDoc} * @throws NullPointerException {@inheritDoc} */ @Override public Object getAsObject(FacesContext context, UIComponent component, String value) { if (context == null || component == null) { throw new NullPointerException(); } // If the specified value is null or zero-length, return null if (value == null) { return (null); } value = value.trim(); if (value.length() < 1) { return (null); } try { return (Double.valueOf(value)); } catch (NumberFormatException nfe) { throw new ConverterException(MessageFactory.getMessage( context, DOUBLE_ID, value, "1999999", MessageFactory.getLabel(context, component)), nfe); } catch (Exception e) { throw new ConverterException(e); } }
/** * @throws ConverterException {@inheritDoc} * @throws NullPointerException {@inheritDoc} */ @Override public Object getAsObject(FacesContext context, UIComponent component, String value) { if (context == null || component == null) { throw new NullPointerException(); } // If the specified value is null or zero-length, return null if (value == null) { return (null); } value = value.trim(); if (value.length() < 1) { return (null); } try { return (Integer.valueOf(value)); } catch (NumberFormatException nfe) { throw new ConverterException(MessageFactory.getMessage( context, INTEGER_ID, value, "9346", MessageFactory.getLabel(context, component)), nfe); } catch (Exception e) { throw new ConverterException(e); } }
/** * @throws ConverterException {@inheritDoc} * @throws NullPointerException {@inheritDoc} */ @Override public Object getAsObject(FacesContext context, UIComponent component, String value) { if (context == null || component == null) { throw new NullPointerException(); } // If the specified value is null or zero-length, return null if (value == null) { return (null); } value = value.trim(); if (value.length() < 1) { return (null); } try { return (Short.valueOf(value)); } catch (NumberFormatException nfe) { throw new ConverterException(MessageFactory.getMessage( context, SHORT_ID, value, "32456", MessageFactory.getLabel(context, component)), nfe); } catch (Exception e) { throw new ConverterException(e); } }
/** * @throws ConverterException {@inheritDoc} * @throws NullPointerException {@inheritDoc} */ public Object getAsObject(FacesContext context, UIComponent component, String value) { if (context == null || component == null) { throw new NullPointerException(); } // If the specified value is null or zero-length, return null if (value == null) { return (null); } value = value.trim(); if (value.length() < 1) { return (null); } try { return (Long.valueOf(value)); } catch (NumberFormatException nfe) { throw new ConverterException(MessageFactory.getMessage( context, LONG_ID, value, "98765432", MessageFactory.getLabel(context, component)), nfe); } catch (Exception e) { throw new ConverterException(e); } }
/** * @throws ConverterException {@inheritDoc} * @throws NullPointerException {@inheritDoc} */ public Object getAsObject(FacesContext context, UIComponent component, String value) { if (context == null || component == null) { throw new NullPointerException(); } // If the specified value is null or zero-length, return null if (value == null) { return (null); } value = value.trim(); if (value.length() < 1) { return (null); } try { return (Float.valueOf(value)); } catch (NumberFormatException nfe) { throw new ConverterException(MessageFactory.getMessage( context, FLOAT_ID, value, "2000000000", MessageFactory.getLabel(context, component))); } catch (Exception e) { throw new ConverterException(e); } }
/** * @throws ConverterException {@inheritDoc} * @throws NullPointerException {@inheritDoc} */ public Object getAsObject(FacesContext context, UIComponent component, String value) { if (context == null || component == null) { throw new NullPointerException(); } // If the specified value is null or zero-length, return null if (value == null) { return (null); } value = value.trim(); if (value.length() < 1) { return (null); } try { return (Double.valueOf(value)); } catch (NumberFormatException nfe) { throw new ConverterException(MessageFactory.getMessage( context, DOUBLE_ID, value, "1999999", MessageFactory.getLabel(context, component))); } catch (Exception e) { throw new ConverterException(e); } }
/** * @throws ConverterException {@inheritDoc} * @throws NullPointerException {@inheritDoc} */ @Override public Object getAsObject(FacesContext context, UIComponent component, String value) { if (context == null || component == null) { throw new NullPointerException(); } // If the specified value is null or zero-length, return null if (value == null) { return (null); } value = value.trim(); if (value.length() < 1) { return (null); } try { return (Double.valueOf(value)); } catch (NumberFormatException nfe) { throw new ConverterException(MessageFactory.getMessage( context, DOUBLE_ID, value, "1999999", MessageFactory.getLabel(context, component)), nfe); } catch (Exception e) { throw new ConverterException(e); } }
/** * @throws ConverterException {@inheritDoc} * @throws NullPointerException {@inheritDoc} */ public Object getAsObject(FacesContext context, UIComponent component, String value) { if (context == null || component == null) { throw new NullPointerException(); } // If the specified value is null or zero-length, return null if (value == null) { return (null); } value = value.trim(); if (value.length() < 1) { return (null); } try { return (Integer.valueOf(value)); } catch (NumberFormatException nfe) { throw new ConverterException(MessageFactory.getMessage( context, INTEGER_ID, value, "9346", MessageFactory.getLabel(context, component)), nfe); } catch (Exception e) { throw new ConverterException(e); } }
/** * @throws ConverterException {@inheritDoc} * @throws NullPointerException {@inheritDoc} */ public String getAsString(FacesContext context, UIComponent component, Object value) { if (context == null || component == null) { throw new NullPointerException(); } // If the specified value is null, return a zero-length String if (value == null) { return ""; } try { return value.toString(); } catch (Exception e) { throw new ConverterException( MessageFactory.getMessage(context, STRING_ID, value, MessageFactory.getLabel(context, component)), e); } } }
/** * @throws ConverterException {@inheritDoc} * @throws NullPointerException {@inheritDoc} */ public Object getAsObject(FacesContext context, UIComponent component, String value) { if (context == null || component == null) { throw new NullPointerException(); } // If the specified value is null or zero-length, return null if (value == null) { return (null); } value = value.trim(); if (value.length() < 1) { return (null); } try { return (Float.valueOf(value)); } catch (NumberFormatException nfe) { throw new ConverterException(MessageFactory.getMessage( context, FLOAT_ID, value, "2000000000", MessageFactory.getLabel(context, component)), nfe); } catch (Exception e) { throw new ConverterException(e); } }
/** * @throws ConverterException {@inheritDoc} * @throws NullPointerException {@inheritDoc} */ public Object getAsObject(FacesContext context, UIComponent component, String value) { if (context == null || component == null) { throw new NullPointerException(); } // If the specified value is null or zero-length, return null if (value == null) { return (null); } value = value.trim(); if (value.length() < 1) { return (null); } try { return (Long.valueOf(value)); } catch (NumberFormatException nfe) { throw new ConverterException(MessageFactory.getMessage( context, LONG_ID, value, "98765432", MessageFactory.getLabel(context, component)), nfe); } catch (Exception e) { throw new ConverterException(e); } }
/** * @throws ConverterException {@inheritDoc} * @throws NullPointerException {@inheritDoc} */ public Object getAsObject(FacesContext context, UIComponent component, String value) { if (context == null || component == null) { throw new NullPointerException(); } // If the specified value is null or zero-length, return null if (value == null) { return (null); } value = value.trim(); if (value.length() < 1) { return (null); } try { return (Short.valueOf(value)); } catch (NumberFormatException nfe) { throw new ConverterException(MessageFactory.getMessage( context, SHORT_ID, value, "32456", MessageFactory.getLabel(context, component))); } catch (Exception e) { throw new ConverterException(e); } }
/** * @throws ConverterException {@inheritDoc} * @throws NullPointerException {@inheritDoc} */ public Object getAsObject(FacesContext context, UIComponent component, String value) { if (context == null || component == null) { throw new NullPointerException(); } // If the specified value is null or zero-length, return null if (value == null) { return (null); } value = value.trim(); if (value.length() < 1) { return (null); } try { return (Integer.valueOf(value)); } catch (NumberFormatException nfe) { throw new ConverterException(MessageFactory.getMessage( context, INTEGER_ID, value, "9346", MessageFactory.getLabel(context, component))); } catch (Exception e) { throw new ConverterException(e); } }
/** * @throws ConverterException {@inheritDoc} * @throws NullPointerException {@inheritDoc} */ @Override public Object getAsObject(FacesContext context, UIComponent component, String value) { if (context == null || component == null) { throw new NullPointerException(); } // If the specified value is null or zero-length, return null if (value == null) { return (null); } value = value.trim(); if (value.length() < 1) { return (null); } try { return (Integer.valueOf(value)); } catch (NumberFormatException nfe) { throw new ConverterException(MessageFactory.getMessage( context, INTEGER_ID, value, "9346", MessageFactory.getLabel(context, component)), nfe); } catch (Exception e) { throw new ConverterException(e); } }