Package com.ocpsoft.pretty.faces.util

Examples of com.ocpsoft.pretty.faces.util.NullComponent


                  currentPathValidator = pv;
                  for (String id : pv.getValidatorIdList())
                  {
                     currentValidatorId = id;
                     Validator validator = context.getApplication().createValidator(id);
                     validator.validate(context, new NullComponent(), coerced);
                  }
                  if (pv.getValidatorExpression() != null)
                  {
                     elUtils.invokeMethod(context, pv.getValidatorExpression().getELExpression(),
                              new Class<?>[] { FacesContext.class, UIComponent.class, Object.class },
                              new Object[] { context, new NullComponent(), coerced });
                  }
               }
            }
         }
      }
View Full Code Here


                     Object coerced = elUtils.coerceToType(context, el, values);
                     for (String id : param.getValidatorIdList())
                     {
                        currentValidatorId = id;
                        Validator validator = context.getApplication().createValidator(id);
                        validator.validate(context, new NullComponent(), coerced);
                     }
                     if (param.getValidatorExpression() != null)
                     {
                        elUtils.invokeMethod(context, param.getValidatorExpression().getELExpression(),
                                 new Class<?>[] { FacesContext.class, UIComponent.class, Object.class },
                                 new Object[] { context, new NullComponent(), coerced });
                     }
                  }
               }
               else
               {
                  String value = context.getExternalContext().getRequestParameterMap().get(name);
                  if (value != null)
                  {
                     Object coerced = elUtils.coerceToType(context, el, value);
                     for (String id : param.getValidatorIdList())
                     {
                        currentValidatorId = id;
                        Validator validator = context.getApplication().createValidator(id);
                        validator.validate(context, new NullComponent(), coerced);
                     }
                     if (param.getValidatorExpression() != null)
                     {
                        elUtils.invokeMethod(context, param.getValidatorExpression().getELExpression(),
                                 new Class<?>[] { FacesContext.class, UIComponent.class, Object.class },
                                 new Object[] { context, new NullComponent(), coerced });
                     }
                  }
               }
            }
         }
View Full Code Here

               Converter converter = context.getApplication().createConverter(expectedType);

               // Use the convert to create the correct type
               if (converter != null)
               {
                  Object convertedValue = converter.getAsObject(context, new NullComponent(), valueAsString);
                  elUtils.setValue(context, el, convertedValue);
               }
               else
               {
                  elUtils.setValue(context, el, valueAsString);
View Full Code Here

                     Converter converter = context.getApplication().createConverter(expectedType);

                     // Use the convert to create the correct type
                     if (converter != null)
                     {
                        Object convertedValue = converter.getAsObject(context, new NullComponent(), valueAsString);
                        elUtils.setValue(context, el, convertedValue);
                     }
                     else
                     {
                        elUtils.setValue(context, el, valueAsString);
View Full Code Here

            // convert the value to a string using the correct converter
            Converter converter = context.getApplication().createConverter(value.getClass());
            if (converter != null)
            {
               String convertedValue = converter.getAsString(context, new NullComponent(), value);
               if (convertedValue == null)
               {
                  throw new PrettyException("PrettyFaces: The converter <" + converter.getClass().getName()
                           + "> returned null while converting the object <" + value.toString() + ">!");
               }
View Full Code Here

               Converter converter = context.getApplication().createConverter(expectedType);

               // Use the convert to create the correct type
               if (converter != null)
               {
                  Object convertedValue = converter.getAsObject(context, new NullComponent(), valueAsString);
                  elUtils.setValue(context, el, convertedValue);
               }
               else
               {
                  elUtils.setValue(context, el, valueAsString);
View Full Code Here

                     Converter converter = context.getApplication().createConverter(expectedType);

                     // Use the convert to create the correct type
                     if (converter != null)
                     {
                        Object convertedValue = converter.getAsObject(context, new NullComponent(), valueAsString);
                        elUtils.setValue(context, el, convertedValue);
                     }
                     else
                     {
                        elUtils.setValue(context, el, valueAsString);
View Full Code Here

            // convert the value to a string using the correct converter
            Converter converter = context.getApplication().createConverter(value.getClass());
            if (converter != null)
            {
               String valueAsString = converter.getAsString(context, new NullComponent(), value);
               if (valueAsString == null)
               {
                  throw new PrettyException("PrettyFaces: The converter <" + converter.getClass().getName()
                        + "> returned null while converting the object <" + value.toString() + ">!");
               }
View Full Code Here

                  currentPathValidator = pv;
                  for (String id : pv.getValidatorIdList())
                  {
                     currentValidatorId = id;
                     Validator validator = context.getApplication().createValidator(id);
                     validator.validate(context, new NullComponent(), coerced);
                  }
                  if (pv.getValidatorExpression() != null)
                  {
                     elUtils.invokeMethod(context, pv.getValidatorExpression().getELExpression(),
                              new Class<?>[] { FacesContext.class, UIComponent.class, Object.class },
                              new Object[] { context, new NullComponent(), coerced });
                  }
               }
            }
         }
      }
View Full Code Here

                     Object coerced = elUtils.coerceToType(context, el, values);
                     for (String id : param.getValidatorIdList())
                     {
                        currentValidatorId = id;
                        Validator validator = context.getApplication().createValidator(id);
                        validator.validate(context, new NullComponent(), coerced);
                     }
                     if (param.getValidatorExpression() != null)
                     {
                        elUtils.invokeMethod(context, param.getValidatorExpression().getELExpression(),
                                 new Class<?>[] { FacesContext.class, UIComponent.class, Object.class },
                                 new Object[] { context, new NullComponent(), coerced });
                     }
                  }
               }
               else
               {
                  String value = context.getExternalContext().getRequestParameterMap().get(name);
                  if (value != null)
                  {
                     Object coerced = elUtils.coerceToType(context, el, value);
                     for (String id : param.getValidatorIdList())
                     {
                        currentValidatorId = id;
                        Validator validator = context.getApplication().createValidator(id);
                        validator.validate(context, new NullComponent(), coerced);
                     }
                     if (param.getValidatorExpression() != null)
                     {
                        elUtils.invokeMethod(context, param.getValidatorExpression().getELExpression(),
                                 new Class<?>[] { FacesContext.class, UIComponent.class, Object.class },
                                 new Object[] { context, new NullComponent(), coerced });
                     }
                  }
               }
            }
         }
View Full Code Here

TOP

Related Classes of com.ocpsoft.pretty.faces.util.NullComponent

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.