Package org.directwebremoting.extend

Examples of org.directwebremoting.extend.NonNestedOutboundVariable


    /* (non-Javadoc)
     * @see org.directwebremoting.Converter#convertOutbound(java.lang.Object, org.directwebremoting.OutboundContext)
     */
    public OutboundVariable convertOutbound(Object data, OutboundContext outctx)
    {
        return new NonNestedOutboundVariable("null");
    }
View Full Code Here


            CdfDocument document = (CdfDocument) data;
            String xmlout = JavascriptUtil.escapeJavaScript(document.toXml());

            String script = "dwr.gi._loadXml(\"" + xmlout + "\")";
            OutboundVariable ov = new NonNestedOutboundVariable(script);

            outctx.put(data, ov);

            return ov;
        }
View Full Code Here

     * @see org.directwebremoting.extend.Converter#convertOutbound(java.lang.Object, org.directwebremoting.extend.OutboundContext)
     */
    public OutboundVariable convertOutbound(Object data, OutboundContext outctx) throws ConversionException
    {
        URIResolver resolver = (URIResolver) data;
        return new NonNestedOutboundVariable(resolver.constant);
    }
View Full Code Here

     */
    public OutboundVariable convertOutbound(Object data, OutboundContext outctx) throws ConversionException
    {
        URL url = (URL) data;
        String escaped = JavascriptUtil.escapeJavaScript(url.toExternalForm());
        return new NonNestedOutboundVariable('\"' + escaped + '\"');
    }
View Full Code Here

    /* (non-Javadoc)
     * @see org.directwebremoting.Converter#convertOutbound(java.lang.Object, org.directwebremoting.OutboundContext)
     */
    public OutboundVariable convertOutbound(Object data, OutboundContext outctx) throws ConversionException
    {
        return new NonNestedOutboundVariable(data.toString());
    }
View Full Code Here

    {
        Class<?> paramType = data.getClass();

        if (data.equals(Boolean.TRUE))
        {
            return new NonNestedOutboundVariable("true");
        }
        else if (data.equals(Boolean.FALSE))
        {
            return new NonNestedOutboundVariable("false");
        }
        else if (paramType == Character.class)
        {
            // Treat characters as strings
            return new NonNestedOutboundVariable('\"' + JavascriptUtil.escapeJavaScript(data.toString()) + '\"');
        }
        else
        {
            // We just use the default toString for all numbers
            return new NonNestedOutboundVariable(data.toString());
        }
    }
View Full Code Here

    /* (non-Javadoc)
   * @see org.directwebremoting.Converter#convertOutbound(java.lang.Object, org.directwebremoting.OutboundContext)
   */
    public OutboundVariable convertOutbound(Object data, OutboundContext outctx) throws ConversionException
    {
        return new NonNestedOutboundVariable('\"' + ((Currency) data).getCurrencyCode() + '\"');
    }
View Full Code Here

     */
    public OutboundVariable convertOutbound(Object data, OutboundContext outctx)
    {
        if (data == null)
        {
            return new NonNestedOutboundVariable("null");
        }

        return new NonNestedOutboundVariable(data.toString());
    }
View Full Code Here

    public OutboundVariable convertOutbound(Object data, OutboundContext outctx) throws ConversionException
    {
        // We don't actually need to cast to RawData, but we want to make sure
        // that that's was we've really been given
        RawData raw = (RawData) data;
        return new NonNestedOutboundVariable(raw.toString());
    }
View Full Code Here

            else
            {
                script = EnginePrivate.xmlStringToJavascriptDomDocument(xml.toString());
            }

            OutboundVariable ov = new NonNestedOutboundVariable(script);
            outctx.put(data, ov);

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

TOP

Related Classes of org.directwebremoting.extend.NonNestedOutboundVariable

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.