Package org.apache.wicket.request.handler

Examples of org.apache.wicket.request.handler.TextRequestHandler


    EventSource source = getCalendar().getEventManager().getEventSource(sid);
    EventProvider provider = source.getEventProvider();
    String response = getCalendar().toJson(provider.getEvents(start, end));

    getCalendar().getRequestCycle().scheduleRequestHandlerAfterCurrent(
      new TextRequestHandler("application/json", "UTF-8", response));

  }
View Full Code Here


        {
          throw new WicketRuntimeException(e);
        }

        RequestCycle.get().scheduleRequestHandlerAfterCurrent(
          new TextRequestHandler("application/json", "utf-8", sw.toString()));
      }
    }
View Full Code Here

    T object = ((Form<T>) form).getModelObject();

    String json = asJson(object).toString();

    // schedule a request handler that will serve the JSON response
    TextRequestHandler jsonHandler = new TextRequestHandler("application/json", "UTF-8", json);

    // replace AjaxRequestHandler with the JSON one
    getRequestCycle().replaceAllRequestHandlers(jsonHandler);

  }
View Full Code Here

                buf.append("[").append(Utils.quote(validateId));
                buf.append(",").append(Utils.quote(validateError));
                buf.append(",").append(Utils.quote(String.valueOf(result)));
                buf.append("]}");
                RequestCycle.get().scheduleRequestHandlerAfterCurrent(
                        new TextRequestHandler(buf.toString()));
            }
        };
    }
View Full Code Here

          } catch (JSONException e) {
            e.printStackTrace();
          }
        }
              getRequestCycle().scheduleRequestHandlerAfterCurrent(
                new TextRequestHandler("application/json", "UTF-8", events.toString()));
      }
    });
    //dropEvent
    add(new DropResizeBehavior(true, "dropEventFunc"));
    //resizeEvent
View Full Code Here

        final Iterable<T> choices = getChoices(input.toString(""));

        String jsonArray = createJson(choices);

        requestCycle.scheduleRequestHandlerAfterCurrent(
            new TextRequestHandler("application/json", "UTF-8", jsonArray));

    }
View Full Code Here

        final Iterable<T> choices = getChoices(input.toString(""));

        String jsonArray = createJson(choices);

        requestCycle.scheduleRequestHandlerAfterCurrent(new TextRequestHandler("application/json", "UTF-8", jsonArray));
    }
View Full Code Here

  {
    // final PageParameters pageParameters = new PageParameters(requestCycle.getRequest().getParameterMap());
    final List<T> choices = getChoices(val);
    final MyJsonBuilder builder = new MyJsonBuilder();
    final String json = builder.append(choices).getAsString();
    requestCycle.scheduleRequestHandlerAfterCurrent(new TextRequestHandler("application/json", "utf-8", json));

    /*
     * IRequestTarget target = new IRequestTarget() {
     *
     * public void respond(RequestCycle requestCycle) {
View Full Code Here

    final Iterable<T> choices = getChoices(input.toString(""));

    String jsonArray = createJson(choices);

    requestCycle.scheduleRequestHandlerAfterCurrent(new TextRequestHandler("application/json",
      "UTF-8", jsonArray));
  }
View Full Code Here

TOP

Related Classes of org.apache.wicket.request.handler.TextRequestHandler

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.