Package com.webobjects.foundation

Examples of com.webobjects.foundation.NSSelector.invoke()


                    for(Enumeration e = additionalValidationKeys.objectEnumerator(); e.hasMoreElements();) {
                        String key = (String)e.nextElement();
                        NSSelector selector = new NSSelector(key);
                        if(selector.implementedByObject(obj)) {
                            try {
                                selector.invoke(obj);
                            } catch (Exception ex) {
                                if(ex instanceof NSValidation.ValidationException)
                                    throw (NSValidation.ValidationException)ex;
                                log.error(ex);
                            }
View Full Code Here


        NSSelector d2wSelector = new NSSelector("d2wContext");
        if (d2wSelector.implementedByObject(context.page())) {
          try {
            Class erDirectToWebClazz = Class.forName("er.directtoweb.ERDirectToWeb");
            NSSelector infoSelector = new NSSelector("informationForContext", new Class [] {WOContext.class});
            NSDictionary d2wExtraInfo = (NSDictionary)infoSelector.invoke(erDirectToWebClazz, context);
            extraInfo.addEntriesFromDictionary(d2wExtraInfo);
          } catch (Exception e) {
          }
        }
      }
View Full Code Here

    NSSelector conversionMethod = adaptorValueConversionMethod();
    Class conversionClass = adaptorValueConversionClass();
    if (conversionMethod != null)
      try {
        if (conversionClass != null) {
          convertedValue = conversionMethod.invoke(conversionClass,new Object[]{value});
        } else {
          convertedValue = conversionMethod.invoke(value);
        }
      } catch (NoSuchMethodException e) {
        throw NSForwardException._runtimeExceptionForThrowable(e);
View Full Code Here

    if (conversionMethod != null)
      try {
        if (conversionClass != null) {
          convertedValue = conversionMethod.invoke(conversionClass,new Object[]{value});
        } else {
          convertedValue = conversionMethod.invoke(value);
        }
      } catch (NoSuchMethodException e) {
        throw NSForwardException._runtimeExceptionForThrowable(e);
      } catch (InvocationTargetException e) {
        throw NSForwardException._runtimeExceptionForThrowable(e);
View Full Code Here

            }
            sourceCode = writer.toString();
            try {
                Class JavaCCtoHTML = Class.forName("JavaCCtoHTML");
                NSSelector prettyString = new NSSelector("prettyString", new Class [] {String.class});
                prettyString.invoke(JavaCCtoHTML, sourceCode);
                // sourceCode = JavaCCtoHTML.prettyString(sourceCode);
            } catch (Exception ex) {
                log.error(ex);
            }
            sourceCode = ERXStringUtilities.replaceStringByStringInString("\n\n", "<br>", sourceCode);
View Full Code Here

      }
    }

    if (qualifierSetter != null) {
      try {
        qualifierSetter.invoke(_dataSource, qualifierFromQueryValues());
      } catch (Exception e) {
        throw NSForwardException._runtimeExceptionForThrowable(e);
      }
    }
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.