Package javax.faces.application

Examples of javax.faces.application.Application.createConverter()


        FacesContext facesContext = FacesContext.getCurrentInstance();
        Application application = facesContext.getApplication();
        if (UIComponentTag.isValueReference(_converterId))
        {
            ValueBinding vb = facesContext.getApplication().createValueBinding(_converterId);
            return application.createConverter((String)vb.getValue(facesContext));
        }
        else
        {
            return application.createConverter(_converterId);
        }
View Full Code Here


            ValueBinding vb = facesContext.getApplication().createValueBinding(_converterId);
            return application.createConverter((String)vb.getValue(facesContext));
        }
        else
        {
            return application.createConverter(_converterId);
        }
    }

}
View Full Code Here

      final Application application = facesContext.getApplication();
      if (UIComponentTag.isValueReference(value)) {
        ValueBinding valueBinding = application.createValueBinding(value);
        component.setValueBinding(name, valueBinding);
      } else {
        Converter converter = application.createConverter(value);
        ((ValueHolder) component).setConverter(converter);
      }
    }
  }
View Full Code Here

        FacesContext facesContext = FacesContext.getCurrentInstance();
        Application application = facesContext.getApplication();
        if (UIComponentTag.isValueReference(_converterId))
        {
            ValueBinding vb = facesContext.getApplication().createValueBinding(_converterId);
            return application.createConverter((String)vb.getValue(facesContext));
        }
        else
        {
            return application.createConverter(_converterId);
        }
View Full Code Here

            ValueBinding vb = facesContext.getApplication().createValueBinding(_converterId);
            return application.createConverter((String)vb.getValue(facesContext));
        }
        else
        {
            return application.createConverter(_converterId);
        }
    }

}
View Full Code Here

      final Application application = facesContext.getApplication();
      if (UIComponentTag.isValueReference(value)) {
        ValueBinding valueBinding = application.createValueBinding(value);
        component.setValueBinding(name, valueBinding);
      } else {
        Converter converter = application.createConverter(value);
        ((ValueHolder) component).setConverter(converter);
      }
    }
  }
View Full Code Here

    if (converter == null) {
      // setting required default converter
      Application application
          = FacesContext.getCurrentInstance().getApplication();
      DateTimeConverter dateTimeConverter
          = (DateTimeConverter) application.createConverter(DateTimeConverter.CONVERTER_ID);
      dateTimeConverter.setPattern("HH:mm");
      dateTimeConverter.setTimeZone(TimeZone.getDefault());
      setConverter(dateTimeConverter);
    }
    return converter;
View Full Code Here

    // if getType returns a type for which we support a default
    // conversion, acquire an appropriate converter instance.
    try
    {
      Application application = context.getApplication();
      return application.createConverter(converterType);
    }
    catch (Exception e)
    {
      return null;
    }
View Full Code Here

            return null;
        }

        try {           
            Application application = context.getApplication();
            return (application.createConverter(converterClass));
        } catch (Exception e) {
            log.warn(e.getLocalizedMessage(), e);
      return null;
        }
    }
View Full Code Here

                if(converter != null) {
                    return getAsDate(converter.getAsString(context, this, date));
                }
               
            Application application = context.getApplication();
            converter = application.createConverter(date.getClass());
            if (null != converter) {
              return getAsDate(converter.getAsString(context,  this, date));
            } else {
              throw new FacesException("Wrong attibute type or there is no converter for custom attibute type");
            }
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.