Package org.apache.pivot.web

Examples of org.apache.pivot.web.GetQuery


                return false;
            }
        });

        GetQuery getQuery = new GetQuery("feeds.dzone.com", "/javalobby/frontpage");
        getQuery.setSerializer(new XMLSerializer());
        getQuery.getParameters().put("format", "xml");

        getQuery.execute(new TaskAdapter<Object>(new TaskListener<Object>() {
            @Override
            public void taskExecuted(Task<Object> task) {
                Element root = (Element)task.getResult();
                feedListView.setListData(XMLSerializer.getElements(root, "channel", "item"));
                cardPane.setSelectedIndex(1);
View Full Code Here


    public void resume() {
    }

    @SuppressWarnings("unchecked")
    private void refreshTable() {
        getQuery = new GetQuery(SERVICE_HOSTNAME, SERVICE_PATH);

        StringBuilder symbolsArgumentBuilder = new StringBuilder();
        for (int i = 0, n = symbols.getLength(); i < n; i++) {
            if (i > 0) {
                symbolsArgumentBuilder.append(",");
View Full Code Here

        listView = (ListView)wtkxSerializer.get("listView");
        loadingLabel = (Label)wtkxSerializer.get("loadingLabel");

        // Execute the query:
        // http://pipes.yahoo.com/pipes/pipe.run?_id=43115761f2da5af5341ae2e56a93d646&_render=json
        GetQuery getQuery = new GetQuery("pipes.yahoo.com", "/pipes/pipe.run");
        getQuery.getParameters().put("_id", "43115761f2da5af5341ae2e56a93d646");
        getQuery.getParameters().put("_render", "json");

        getQuery.execute(new TaskAdapter<Object>(new TaskListener<Object>() {
            @Override
            public void taskExecuted(Task<Object> task) {
                listView.setListData(JSONSerializer.getList(task.getResult(), "value.items"));
                loadingLabel.setVisible(false);
            }
View Full Code Here

            }
        }

        // Execute the query
        if (symbols.getLength() > 0) {
            getQuery = new GetQuery(SERVICE_HOSTNAME, SERVICE_PATH);

            StringBuilder symbolsParameterBuilder = new StringBuilder();
            for (int i = 0, n = symbols.getLength(); i < n; i++) {
                if (i > 0) {
                    symbolsParameterBuilder.append(",");
View Full Code Here

            throw new IllegalStateException();
        }

        String country = Locale.getDefault().getCountry().toLowerCase();

        getQuery = new GetQuery(QUERY_HOSTNAME, BASE_QUERY_PATH);
        getQuery.getParameters().put("term", term);
        getQuery.getParameters().put("country", country);
        getQuery.getParameters().put("media", MEDIA);
        getQuery.getParameters().put("limit", Integer.toString(LIMIT));
        getQuery.getParameters().put("output", "json");
View Full Code Here

        refreshExpenseList();
    }

    private void refreshExpenseList() {
        Expenses expensesApplicationLocal = getExpensesApplication();
        GetQuery expenseListQuery = new GetQuery(expensesApplicationLocal.getHostname(),
            expensesApplicationLocal.getPort(), "/pivot-tutorials/expenses",
            expensesApplicationLocal.isSecure()
        );

        activityIndicatorBoxPane.setVisible(true);
        activityIndicator.setActive(true);

        expenseListQuery.execute(new TaskAdapter<Object>(new TaskListener<Object>() {
            @Override
            public void taskExecuted(Task<Object> task) {
                activityIndicatorBoxPane.setVisible(false);
                activityIndicator.setActive(false);
View Full Code Here

        listView = (ListView)bxmlSerializer.getNamespace().get("listView");
        loadingLabel = (Label)bxmlSerializer.getNamespace().get("loadingLabel");

        // Execute the query:
        // http://pipes.yahoo.com/pipes/pipe.run?_id=43115761f2da5af5341ae2e56a93d646&_render=json
        GetQuery getQuery = new GetQuery("pipes.yahoo.com", "/pipes/pipe.run");
        getQuery.getParameters().put("_id", "43115761f2da5af5341ae2e56a93d646");
        getQuery.getParameters().put("_render", "json");

        getQuery.execute(new TaskAdapter<Object>(new TaskListener<Object>() {
            @Override
            public void taskExecuted(Task<Object> task) {
                List<?> items = (List<?>)JSON.get(task.getResult(), "value.items");
                if (items.getLength() > 0) {
                    listView.setListData(items);
View Full Code Here

        } catch (UnsupportedEncodingException exception) {
            throw new RuntimeException(exception);
        }

        // Create query
        suggestionQuery = new GetQuery("search.yahooapis.com", "/WebSearchService/V1/relatedSuggestion");
        suggestionQuery.getParameters().put("appid", getClass().getName());
        suggestionQuery.getParameters().put("query", text);
        suggestionQuery.getParameters().put("output", "json");

        suggestionQuery.execute(new TaskAdapter<Object>(new TaskListener<Object>() {
View Full Code Here

        refreshExpenseList();
    }

    private void refreshExpenseList() {
        Expenses expensesApplication = Expenses.getInstance();
        GetQuery expenseListQuery = new GetQuery(expensesApplication.getHostname(),
            expensesApplication.getPort(), "/pivot-tutorials/expenses",
            expensesApplication.isSecure());

        activityIndicatorBoxPane.setVisible(true);
        activityIndicator.setActive(true);

        expenseListQuery.execute(new TaskAdapter<Object>(new TaskListener<Object>() {
            @Override
            public void taskExecuted(Task<Object> task) {
                activityIndicatorBoxPane.setVisible(false);
                activityIndicator.setActive(false);
View Full Code Here

            }
        }

        // Execute the query
        if (symbols.getLength() > 0) {
            getQuery = new GetQuery(SERVICE_HOSTNAME, SERVICE_PATH);

            StringBuilder symbolsParameterBuilder = new StringBuilder();
            for (int i = 0, n = symbols.getLength(); i < n; i++) {
                if (i > 0) {
                    symbolsParameterBuilder.append(",");
View Full Code Here

TOP

Related Classes of org.apache.pivot.web.GetQuery

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.