Package org.directwebremoting

Examples of org.directwebremoting.ScriptBuffer.appendScript()


     * @see <a href="http://getahead.org/dwr/browser/engine/options">Options documentation</a>
     */
    public static void setAsync(boolean async)
    {
        ScriptBuffer script = new ScriptBuffer();
        script.appendScript("dwr.engine.setAsync(")
              .appendData(async)
              .appendScript(");");
        ScriptSessions.addScript(script);
    }

View Full Code Here


     * @see <a href="http://getahead.org/dwr/browser/engine/options">Options documentation</a>
     */
    public static void setActiveReverseAjax(boolean activeReverseAjax)
    {
        ScriptBuffer script = new ScriptBuffer();
        script.appendScript("dwr.engine.setActiveReverseAjax(")
              .appendData(activeReverseAjax)
              .appendScript(");");
        ScriptSessions.addScript(script);
    }

View Full Code Here

     * @see <a href="http://getahead.org/dwr/browser/engine/options">Options documentation</a>
     */
    public static void setPollUsingComet(boolean pollComet)
    {
        ScriptBuffer script = new ScriptBuffer();
        script.appendScript("dwr.engine.setPollUsingComet(")
              .appendData(pollComet)
              .appendScript(");");
        ScriptSessions.addScript(script);
    }

View Full Code Here

     * @see <a href="http://getahead.org/dwr/browser/engine/options">Options documentation</a>
     */
    public static void setPollType(int newPollType)
    {
        ScriptBuffer script = new ScriptBuffer();
        script.appendScript("dwr.engine.setPollUsingComet(")
              .appendData(newPollType)
              .appendScript(");");
        ScriptSessions.addScript(script);
    }
}
View Full Code Here

     * This is a bit of a nasty hack that I hope we can get rid of
     */
    public void ignoreReturn()
    {
        ScriptBuffer script = new ScriptBuffer();
        script.appendScript(getContextPath().replaceFirst(".$", ";"));
        ScriptSessions.addScript(script);
    }
}
View Full Code Here

     * Eg: "<referenceName>.<operationName>(arg1, arg2,...);"
     */
    protected ScriptBuffer getInvokeFragment(Object[] args, WebContext wctx) {

        ScriptBuffer sb = new ScriptBuffer();
        sb.appendScript(referenceFunction);
        sb.appendScript("(");
        if (args != null) {
            for (int i = 0; i < args.length; i++) {
                sb.appendData(args[i]);
                if (i < (args.length - 1)) {
View Full Code Here

     */
    protected ScriptBuffer getInvokeFragment(Object[] args, WebContext wctx) {

        ScriptBuffer sb = new ScriptBuffer();
        sb.appendScript(referenceFunction);
        sb.appendScript("(");
        if (args != null) {
            for (int i = 0; i < args.length; i++) {
                sb.appendData(args[i]);
                if (i < (args.length - 1)) {
                    sb.appendScript(", ");
View Full Code Here

        sb.appendScript("(");
        if (args != null) {
            for (int i = 0; i < args.length; i++) {
                sb.appendData(args[i]);
                if (i < (args.length - 1)) {
                    sb.appendScript(", ");
                }
            }
        }
        sb.appendScript(");");
View Full Code Here

                if (i < (args.length - 1)) {
                    sb.appendScript(", ");
                }
            }
        }
        sb.appendScript(");");

        return sb;
    }

}
View Full Code Here

  @Deprecated
  public String openURL(String url) {
    _logger.debug("openurl called with        "+ url ); //$NON-NLS-1$
    WebContext wctx = WebContextFactory.get();
        ScriptBuffer script = new ScriptBuffer();
        script.appendScript("window.open(") //$NON-NLS-1$
        .appendData(url)
        .appendScript(");");        //$NON-NLS-1$
        wctx.getScriptSession().addScript(script);
        return ""; //$NON-NLS-1$
  }
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.