2 Replies Latest reply on Sep 21, 2007 12:27 PM by Anton Belevich

    Problem with inputNumberSlider and Convertor (maximum value

    Pierre De Paepe Newbie

      I wish to allow users to set diskSpace of a compute with the inputNumberSlider.
      Values displayed are in Gb, values stored are in bytes (so i use a convertor.


      public class ByteToGBconverter implements javax.faces.convert.Converter
       public Object getAsObject(FacesContext context, UIComponent component, String value) throws ConverterException
       Long i = new Long(value);
       return new Long(i * 1073741824);
       public String getAsString(FacesContext context, UIComponent component, Object value) throws ConverterException
       return new Long((Long) value / 1073741824).toString();

      But when i set any value, it returns:

      17:45:09,596 INFO [lifecycle] WARNING: FacesMessage(s) have been enqueued, but may not have been displayed.
      sourceId=j_id52:diskSpace[severity=(ERROR 2), summary=(j_id52:diskSpace: input value is more than maximum value!), detail=(j_id52:diskSpace: input value is more than maximum value!)]

      How disable the validator ?