Package org.directwebremoting

Examples of org.directwebremoting.ScriptBuffer


     * @param newType One of dwr.engine.XMLHttpRequest or dwr.engine.IFrame or dwr.engine.ScriptTag
     * @see <a href="http://getahead.org/dwr/browser/engine/options">Options documentation</a>
     */
    public void setRpcType(int newType)
    {
        ScriptBuffer script = new ScriptBuffer();
        script.appendScript("dwr.engine.setRpcType(")
              .appendData(newType)
              .appendScript(");");
        addScript(script);
    }
View Full Code Here


     * @param httpMethod One of {@link #XMLHttpRequest}, {@link #IFrame} or {@link #ScriptTag}
     * @see <a href="http://getahead.org/dwr/browser/engine/options">Options documentation</a>
     */
    public void setHttpMethod(String httpMethod)
    {
        ScriptBuffer script = new ScriptBuffer();
        script.appendScript("dwr.engine.setHttpMethod(")
              .appendData(httpMethod)
              .appendScript(");");
        addScript(script);
    }
View Full Code Here

     * @param ordered True to set call ordering.
     * @see <a href="http://getahead.org/dwr/browser/engine/ordering">Ordering documentation</a>
     */
    public void setOrdered(boolean ordered)
    {
        ScriptBuffer script = new ScriptBuffer();
        script.appendScript("dwr.engine.setOrdered(")
              .appendData(ordered)
              .appendScript(");");
        addScript(script);
    }
View Full Code Here

     * @param async False to become synchronous (not recommended)
     * @see <a href="http://getahead.org/dwr/browser/engine/options">Options documentation</a>
     */
    public void setAsync(boolean async)
    {
        ScriptBuffer script = new ScriptBuffer();
        script.appendScript("dwr.engine.setAsync(")
              .appendData(async)
              .appendScript(");");
        addScript(script);
    }
View Full Code Here

     * @param activeReverseAjax True/False to turn RA on/off
     * @see <a href="http://getahead.org/dwr/browser/engine/options">Options documentation</a>
     */
    public void setActiveReverseAjax(boolean activeReverseAjax)
    {
        ScriptBuffer script = new ScriptBuffer();
        script.appendScript("dwr.engine.setActiveReverseAjax(")
              .appendData(activeReverseAjax)
              .appendScript(");");
        addScript(script);
    }
View Full Code Here

     * @param pollComet True/False to use Comet where supported
     * @see <a href="http://getahead.org/dwr/browser/engine/options">Options documentation</a>
     */
    public void setPollUsingComet(boolean pollComet)
    {
        ScriptBuffer script = new ScriptBuffer();
        script.appendScript("dwr.engine.setPollUsingComet(")
              .appendData(pollComet)
              .appendScript(");");
        addScript(script);
    }
View Full Code Here

     * @param newPollType One of {@link #XMLHttpRequest}, {@link #IFrame} or {@link #ScriptTag}
     * @see <a href="http://getahead.org/dwr/browser/engine/options">Options documentation</a>
     */
    public void setPollType(int newPollType)
    {
        ScriptBuffer script = new ScriptBuffer();
        script.appendScript("dwr.engine.setPollUsingComet(")
              .appendData(newPollType)
              .appendScript(");");
        addScript(script);
    }
View Full Code Here

        if (lastAccess != null)
        {
            long now = System.currentTimeMillis();
            if (now > lastAccess + actionTimeoutMillis)
            {
                session.addScript(new ScriptBuffer(onTimeout));
                session.invalidate();
                throw new DwrConvertedException("Your session has timed out");
            }
        }
View Full Code Here

     * @param data The data to pass to the callback function
     * @return The script to send to the browser
     */
    public static ScriptBuffer getRemoteHandleCallbackScript(String batchId, String callId, Object data)
    {
        ScriptBuffer script = new ScriptBuffer();
        script.appendCall("r.handleCallback", batchId, callId, data);
        return script;
    }
View Full Code Here

     * @param ex The exception to throw on the remote end
     * @return The script to send to the browser
     */
    public static ScriptBuffer getRemoteHandleExceptionScript(String batchId, String callId, Throwable ex)
    {
        ScriptBuffer script = new ScriptBuffer();
        script.appendCall("r.handleException", batchId, callId, ex);
        return script;
    }
View Full Code Here

TOP

Related Classes of org.directwebremoting.ScriptBuffer

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.