Examples of propertyKey()


Examples of com.webobjects.directtoweb.D2WContext.propertyKey()

     * @return the css classes
     */
    private String _cssClassForTemplateForCurrentPropertyKey(String cssKey) {
        NSMutableArray classes = new NSMutableArray();
        D2WContext d2wContext = d2wContext();
        String propertyKey = d2wContext.propertyKey();
        if (propertyKey != null) {
            classes.addObject(propertyKey.replaceAll("\\.", "_"));

            // Required?
            if (ERXValueUtilities.booleanValue(d2wContext.valueForKey("displayRequiredMarker")) && !"query".equals(task())) {
View Full Code Here

Examples of er.extensions.validation.ERXValidationException.propertyKey()

                  errorMessages.setObjectForKey(erv.getMessage(), d2wContext().displayNameForProperty());
                    // DT: the propertyKey from the validationException is
                    // important because keyPath might only be
                    // saveChangesExceptionKey
                    // which is not enough
                    String key = erv.propertyKey();
                    if (key == null) {
                        key = d2wContext().propertyKey();
                    }
                    keyPathsWithValidationExceptions.addObject(key);
                    if (erv.eoObject() != null && erv.propertyKey() != null && shouldSetFailedValidationValue()) {
View Full Code Here

Examples of er.extensions.validation.ERXValidationException.propertyKey()

                    String key = erv.propertyKey();
                    if (key == null) {
                        key = d2wContext().propertyKey();
                    }
                    keyPathsWithValidationExceptions.addObject(key);
                    if (erv.eoObject() != null && erv.propertyKey() != null && shouldSetFailedValidationValue()) {
                        try {
                            erv.eoObject().takeValueForKeyPath(value, erv.propertyKey());
                        } catch (NSKeyValueCoding.UnknownKeyException ex) {
                            // AK: as we could have custom components that have
                            // non-existant keys
View Full Code Here

Examples of er.extensions.validation.ERXValidationException.propertyKey()

                        key = d2wContext().propertyKey();
                    }
                    keyPathsWithValidationExceptions.addObject(key);
                    if (erv.eoObject() != null && erv.propertyKey() != null && shouldSetFailedValidationValue()) {
                        try {
                            erv.eoObject().takeValueForKeyPath(value, erv.propertyKey());
                        } catch (NSKeyValueCoding.UnknownKeyException ex) {
                            // AK: as we could have custom components that have
                            // non-existant keys
                            // we of course can't push a value, so we discard
                            // the resulting exception
View Full Code Here

Examples of er.extensions.validation.ERXValidationException.propertyKey()

                            // we of course can't push a value, so we discard
                            // the resulting exception
                        }
                    }
                }
                if(("saveChangesExceptionKey".equals(keyPath) || "queryExceptionKey".equals(keyPath)) && erv.propertyKey() != null) {
                  // AK: this is for combined keys like company,taxIdentifier
                  keyPathsWithValidationExceptions.addObjectsFromArray(NSArray.componentsSeparatedByString( erv.propertyKey(), ","));
                }
            } else {
                _temp.removeAllObjects();
View Full Code Here

Examples of er.extensions.validation.ERXValidationException.propertyKey()

                        }
                    }
                }
                if(("saveChangesExceptionKey".equals(keyPath) || "queryExceptionKey".equals(keyPath)) && erv.propertyKey() != null) {
                  // AK: this is for combined keys like company,taxIdentifier
                  keyPathsWithValidationExceptions.addObjectsFromArray(NSArray.componentsSeparatedByString( erv.propertyKey(), ","));
                }
            } else {
                _temp.removeAllObjects();
                ERXValidation.validationFailedWithException(e, value, keyPath, _temp, propertyKey(), ERXLocalizer.currentLocalizer(), d2wContext().entity(),
                        shouldSetFailedValidationValue());
View Full Code Here

Examples of er.extensions.validation.ERXValidationException.propertyKey()

                    Object o = ex.object();

                    if (o instanceof EOEnterpriseObject) {
                        EOEnterpriseObject eo = (EOEnterpriseObject) o;
                        context.takeValueForKey(eo.entityName(), "entityName");
                        context.takeValueForKey(ex.propertyKey(), "propertyKey");
                    }
                    ((ERXValidationException) exception).setContext(context);
                }
                log.info("Validation Exception: " + exception + exception.getMessage());
                editingContext.revert();
View Full Code Here

Examples of er.extensions.validation.ERXValidationException.propertyKey()

                    Object o = ex.object();

                    if (o instanceof EOEnterpriseObject) {
                        EOEnterpriseObject eo = (EOEnterpriseObject) o;
                        context.takeValueForKey(eo.entityName(), "entityName");
                        context.takeValueForKey(ex.propertyKey(), "propertyKey");
                    }
                    ((ERXValidationException) exception).setContext(context);
                   
                    log.info("Validation Exception: " + exception + exception.getMessage());
                    editingContext.revert();
View Full Code Here

Examples of er.extensions.validation.ERXValidationException.propertyKey()

                    Object o = ex.object();

                    if (o instanceof EOEnterpriseObject) {
                        EOEnterpriseObject eo = (EOEnterpriseObject) o;
                        context.takeValueForKey(eo.entityName(), "entityName");
                        context.takeValueForKey(ex.propertyKey(), "propertyKey");
                    }
                    ((ERXValidationException) exception).setContext(context);
                   
                    log.info("Validation Exception: " + exception + exception.getMessage());
                    editingContext.revert();
View Full Code Here

Examples of org.apache.velocity.tools.generic.EscapeTool.propertyKey()

    public @Test void testEscapeTool() {
        EscapeTool escapeTool = (EscapeTool)toolbox.get("esc");
        assertNotNull(escapeTool);
        /* propertyKey */
        assertEquals("\\ C\\:\\\\Program\\ Files",escapeTool.propertyKey(" C:\\Program Files"));
        /* propertyValue */
        assertEquals("\\ C\\:\\\\Program Files",escapeTool.propertyValue(" C:\\Program Files"));
        /* java */
        assertEquals("\\uFFFF\\b\\n\\t\\f\\r\\\"\\\\",escapeTool.java("\uFFFF\b\n\t\f\r\"\\"));
        /* javascript */
 
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.