Examples of ObjectRegistry


Examples of org.crank.core.ObjectRegistry

   *
   * @return
   */
  private FieldValidator lookupValidatorInRegistry(
      String validationMetaDataName) {
    ObjectRegistry applicationContext = CrankContext.getObjectRegistry();

    FieldValidator validator = (FieldValidator) applicationContext
        .getObject(CrankConstants.FRAMEWORK_PREFIX
            + CrankConstants.FRAMEWORK_DELIM + "validator"
            + CrankConstants.FRAMEWORK_DELIM
            + validationMetaDataName, FieldValidator.class);
    return validator;
View Full Code Here

Examples of org.crank.core.ObjectRegistry

        FacesContext facesContext, UIComponent component,
        String [] fieldName) {
        /* Try to read the validator out of the Spring context.
         * First lookup with id, if you don't find it with component id, use the client id.
         */
      ObjectRegistry applicationContext = CrankContext.getObjectRegistry();
        String componentId = component.getId();
        FieldValidator validator;
       
        try {
          /* Look up the more specific validator, e.g., EmployeeForm.age. */
            String clientId = component.getClientId(facesContext);
            validator = (FieldValidator) applicationContext.getObject(clientId);
        } catch (ObjectNotFound oe) {
          /* Look up the less specific validator, e.g., age. */
            validator = (FieldValidator) applicationContext.getObject(componentId);
        }
        return validator;
    }
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.