Package org.directwebremoting.extend

Examples of org.directwebremoting.extend.Property


                data.getContext().addConverted(data, instanceType, user);
                Map<String, Property> properties = getPropertyMapFromObject(user, false, true);
                for (Entry<String, String> entry : extractInboundTokens(paramType, value).entrySet()) {
                    String key = entry.getKey();
                    if (!key.startsWith("%24dwr") && !"salt".equals(key)) {
                        Property property = properties.get(key);
                        Object output = convert(entry.getValue(), property.getPropertyType(), data.getContext(), property);
                        property.setValue(user, output);
                    }
                }
                return user;
            }
      }
View Full Code Here


        Object[] params = new Object[method.getParameterTypes().length];
        for (int j = 0; j < method.getParameterTypes().length; j++)
        {
            Class<?> paramType = method.getParameterTypes()[j];
            InboundVariable param = inboundContext.getParameter(0, j);
            Property property = new ParameterProperty(method, j);

            try
            {
                params[j] = converterManager.convertInbound(paramType, param, property);
            }
View Full Code Here

                    else
                    {
                        param = inctx.getParameter(callNum, inboundArgIndex);
                    }

                    Property property = new ParameterProperty(method, outboundArgIndex);

                    // TODO: Having just got a property, shouldn't we call property.getPropertyType() in place of this?
                    Class<?> paramType = method.getParameterTypes()[outboundArgIndex];
                    try
                    {
View Full Code Here

            // Generate (2): <indent>  this.myProp = <initial value>;
            Map<String, Property> properties = namedConv.getPropertyMapFromClass(namedConv.getInstanceType(), true, true);
            for (Entry<String, Property> entry : properties.entrySet())
            {
                String name = entry.getKey();
                Property property = entry.getValue();
                Class<?> propType = property.getPropertyType();

                // Property name
                buf.append(indent + "  this.");
                buf.append(name);
                buf.append(" = ");
View Full Code Here

        try
        {
            Method method = Callback.class.getMethod("dataReturned", type);

            Property property = new ParameterProperty(new MethodDeclaration(method), 0);
            InboundVariable iv = data.getInboundVariable();
            Object callbackData  = converterManager.convertInbound(type, iv, property);

            Map<String, Callback<T>> callbackMap = (Map<String, Callback<T>>) session.getAttribute(KEY_TYPE);
            Callback<T> callback = callbackMap.remove(key);
View Full Code Here

                String key = entry.getKey();
                String val = entry.getValue();

                log.debug("token entry (" + key + ") with value (" + val + ")");

                Property property = properties.get(key);
                if (property == null)
                {
                    log.warn("Missing java bean property to match javascript property: " + key + ". For causes see debug level logs:");

                    log.debug("- The javascript may be refer to a property that does not exist");
                    log.debug("- You may be missing the correct setter: set" + Character.toTitleCase(key.charAt(0)) + key.substring(1) + "()");
                    log.debug("- The property may be excluded using include or exclude rules.");

                    StringBuffer all = new StringBuffer();
                    for (Iterator<String> pit = properties.keySet().iterator(); pit.hasNext();)
                    {
                        all.append(pit.next());
                        if (pit.hasNext())
                        {
                            all.append(',');
                        }
                    }
                    log.debug("Fields exist for (" + all + ").");
                    continue;
                }

                Class<?> propType = property.getPropertyType();

                Object output = convert(val, propType, data.getContext(), property);
                property.setValue(bean, output);
            }

            return bean;
        }
        catch (ConversionException ex)
View Full Code Here

        String splitValue = split[ConvertUtil.INBOUND_INDEX_VALUE];
        String splitType = split[ConvertUtil.INBOUND_INDEX_TYPE];

        InboundVariable nested = new InboundVariable(inboundContext, null, splitType, splitValue);
        nested.dereference();
        Property incc = createTypeHintContext(inboundContext, property);

        return converterManager.convertInbound(propType, nested, incc);
    }
View Full Code Here

        {
            Map<String, Property> properties = getPropertyMapFromObject(data, true, false);
            for (Entry<String, Property> entry : properties.entrySet())
            {
                String name = entry.getKey();
                Property property = entry.getValue();

                Object value = property.getValue(data);
                OutboundVariable nested = getConverterManager().convertOutbound(value, outctx);

                ovs.put(name, nested);
            }
        }
View Full Code Here

            while (st.hasMoreTokens())
            {
                String type = st.nextToken();
                Class<?> clazz = LocalUtil.classForName(type.trim());
                ParameterProperty parentProperty = new ParameterProperty(new MethodDeclaration(method), paramNo);
                Property child = parentProperty.createChild(j);
                child = converterManager.checkOverride(child);
                Property replacement = new OverrideProperty(clazz);
                converterManager.setOverrideProperty(child, replacement);
                j++;
            }
        }
    }
View Full Code Here

            {
                map = new HashMap<Object, Object>();
            }

            // Get the extra type info
            Property parent = data.getContext().getCurrentProperty();

            Property keyProp = parent.createChild(0);
            keyProp = converterManager.checkOverride(keyProp);
            Class<?> keyType = keyProp.getPropertyType();

            Property valProp = parent.createChild(1);
            valProp = converterManager.checkOverride(valProp);
            Class<?> valType = valProp.getPropertyType();

            // We should put the new object into the working map in case it
            // is referenced later nested down in the conversion process.
            data.getContext().addConverted(data, paramType, map);
            InboundContext incx = data.getContext();
View Full Code Here

TOP

Related Classes of org.directwebremoting.extend.Property

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.