Examples of ValueConverter


Examples of org.apache.tapestry.coerce.ValueConverter

        ExpressionEvaluator ev = newMock(ExpressionEvaluator.class);
        ExpressionCache ec = newMock(ExpressionCache.class);
        Location l = fabricateLocation(1);
       
        IComponent component = newComponent();
        ValueConverter vc = newValueConverter();

        Throwable innerException = new RuntimeException("Failure");

        expect(ec.getCompiledExpression("exp")).andThrow(innerException);
View Full Code Here

Examples of org.apache.tapestry.coerce.ValueConverter

        ExpressionCache ec = newMock(ExpressionCache.class);
        Location l = fabricateLocation(1);
       
        IComponent component = newComponent();
        Node compiled = newMock(Node.class);
        ValueConverter vc = newValueConverter();

        expect(ec.getCompiledExpression("exp")).andReturn(compiled);
       
        expect(ev.isConstant("exp")).andReturn(false);
View Full Code Here

Examples of org.apache.tapestry.coerce.ValueConverter

{
    /** @since 3.0 * */

    public void testListenerBindingObject()
    {
        ValueConverter vc = newValueConverter();

        IComponent c = newComponent();

        BSFManagerFactory mf = (BSFManagerFactory) newMock(BSFManagerFactory.class);

View Full Code Here

Examples of org.araneaframework.backend.list.helper.builder.ValueConverter

          return "AGENT.KILLER";
        }
        return null;
      }
    });
    builder.setConverter(new ValueConverter() {
      public Object convert(Value value) {
        if ("licenseToKill".equals(value.getName())) {
          return new BooleanToStringConverter("Y", "N")
              .convert(value.getValue());
        }
View Full Code Here

Examples of org.araneaframework.backend.list.helper.builder.ValueConverter

          return "AGENT.KILLER";
        }
        return null;
      }
    });
    builder.setConverter(new ValueConverter() {
      public Object convert(Value value) {
        if ("licenseToKill".equals(value.getName())) {
          return new BooleanToStringConverter("Y", "N")
              .convert(value.getValue());
        }
View Full Code Here

Examples of org.infoglue.cms.applications.common.ValueConverter

          context.put("ui", LabelController.getController(session.getLocale()));
        //context.put("ui", getStringManagerChain(session.getLocale()));
        }
       
    context.put("formatter", new VisualFormatter());
    context.put("converter", new ValueConverter());

    request.setCharacterEncoding("UTF-8");
    response.setContentType("text/html; charset=UTF-8");

    return super.handleRequest(request, response, context);
View Full Code Here

Examples of org.pentaho.reporting.engine.classic.core.util.beans.ValueConverter

          element.setAttribute(namespace, name, propertyEditor.getValue());
        }
        else
        {
          final ConverterRegistry instance = ConverterRegistry.getInstance();
          final ValueConverter valueConverter = instance.getValueConverter(type);
          if (valueConverter != null)
          {
            final Object o = ConverterRegistry.toPropertyValue(attributeValue, type);
            element.setAttribute(namespace, name, o);
          }
View Full Code Here

Examples of org.pentaho.reporting.engine.classic.core.util.beans.ValueConverter

      // This way, a mandatory parameter will not continue in case of eval-errors.
      return null;
    }
    else
    {
      final ValueConverter valueConverter = ConverterRegistry.getInstance().getValueConverter(entry.getValueType());
      if (valueConverter != null)
      {
        // try to convert it; if this conversion fails we resort to String.valueOf,
        // but it will take care of converting dates and number subtypes correctly  ..
        String textValue;
View Full Code Here

Examples of org.pentaho.reporting.engine.classic.core.util.beans.ValueConverter

        {
          style.setStyleProperty(key, null);
        }
        else
        {
          final ValueConverter valueConverter = ConverterRegistry.getInstance().getValueConverter(key.getValueType());
          if (valueConverter != null)
          {
            // try to convert it ..
            final Object o = ConverterRegistry.toPropertyValue(String.valueOf(value), key.getValueType());
            style.setStyleProperty(key, o);
View Full Code Here

Examples of org.pentaho.reporting.engine.classic.core.util.beans.ValueConverter

              }
              else
              {
                try
                {
                  final ValueConverter valueConverter = instance.getValueConverter(type);
                  if (type.isAssignableFrom(String.class))
                  {
                    // the attribute would allow raw-string values, so copy the element ..
                    e.setAttribute(namespace, name, value);
                  }
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.