Package org.spiffyui.client.rest

Examples of org.spiffyui.client.rest.RESTCallback


       
    }
   
    private static void notFoundUrlTests()
    {
        RESTility.callREST("invalidurl", new RESTCallback() {
                @Override
                public void onSuccess(JSONValue val)
                {
                    ok(false, "The REST call to the invalid url should have returned a 404");
                    invalidHostTests();
View Full Code Here


            });
    }
   
    private static void invalidHostTests()
    {
        RESTility.callREST("http://www.google.com", new RESTCallback() {
                @Override
                public void onSuccess(JSONValue val)
                {
                    ok(false, "The REST call to the invalid url should not have returned success");
                    invalidFileFormatTest();
View Full Code Here

            });
    }
   
    private static void invalidFileFormatTest()
    {
        RESTility.callREST("spsample.css", new RESTCallback() {
                @Override
                public void onSuccess(JSONValue val)
                {
                    ok(false, "The REST call to an invalid protocol should have failed");
                    restart();
View Full Code Here

        if (q.equals("")) {
            MessageUtil.showWarning("Enter your name in the text field.", false);
            return;
        }
       
        RESTility.callREST("simple/" + URL.encode(q), new RESTCallback() {
           
            @Override
            public void onSuccess(JSONValue val)
            {
                showSuccessMessage(val);
View Full Code Here

        String q = m_text.getValue().trim();
        if (q.equals("")) {
            MessageUtil.showWarning("Please enter your name in the text field.", false);
            return;
        }
        RESTility.callREST("/api/hello?user=" + q, new RESTCallback() {
           
            @Override
            public void onSuccess(JSONValue val)
            {
                showSuccessMessage(val);
View Full Code Here

             */
            callback.success(g_versionInfo);
            return;
        }

        RESTility.callREST("version", new RESTCallback() {
                @Override
                public void onSuccess(JSONValue val)
                {
                    createVersionInfo(val, callback);
                }
View Full Code Here

     *
     * @param callback the REST callback
     */
    public static void getSampleAuthData(final RESTObjectCallBack<SampleAuthBean> callback)
    {
        RESTility.callREST("authdata", new RESTCallback() {
                @Override
                public void onSuccess(JSONValue val)
                {
                    createSampleAuthBean(val, callback);
                }
View Full Code Here

     * @param callback - the RESTObjectCallBack to handle the response
     */
    protected void queryOptions(final String query, final int from, final int to, final RESTObjectCallBack<OptionResultSet> callback)
    {
        String url = ((MultivalueSuggestRESTHelper) getHelper()).buildUrl(query, from, to);
        RESTility.callREST(url, null, RESTility.GET, new RESTCallback() {

            @Override
            public void onSuccess(JSONValue val)
            {
                handleQueryResponse(callback, val);
View Full Code Here

        String q = m_text.getValue().trim();
        if (q.equals("")) {
            MessageUtil.showWarning("Please enter your name in the text field.", false);
            return;
        }
        RESTility.callREST("simple/" + q, new RESTCallback() {
           
            @Override
            public void onSuccess(JSONValue val)
            {
                showSuccessMessage(val);
View Full Code Here

TOP

Related Classes of org.spiffyui.client.rest.RESTCallback

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.