Package org.apache.tapestry5.json

Examples of org.apache.tapestry5.json.JSONObject


                message);
    }

    public JSONObject toJSON()
    {
        JSONObject result = new JSONObject("message", message, "class", severity.cssClass);

        if (duration == Duration.TRANSIENT)
        {
            result.put("transient", true);
        }

        if (duration.persistent)
        {
            result.put("id", id);
        }

        return result;
    }
View Full Code Here


        if (wasInvoked) { return; }

        // Send an empty JSON reply if no value was returned from the component event handler method.
        // This is the typical behavior when an Ajax component event handler returns null.

        JSONObject reply = new JSONObject();

        resultProcessor.processResultValue(reply);
    }
View Full Code Here

        writer.element("div", "id", clientId);
        resources.renderInformalParameters(writer);
        writer.end();

        JSONObject spec = new JSONObject("id", clientId,
                "dismissURL", resources.createEventLink("dismiss").toURI(),
                "dismissText", dismissText);

        javaScriptSupport.addInitializerCall(InitializationPriority.EARLY, "alertManager", spec);
View Full Code Here

            {
                storage.dismissAll();
            }
        }

        return new JSONObject();
    }
View Full Code Here

    Object doMarkExpanded(String nodeId)
    {
        expansionModel.markExpanded(model.getById(nodeId));

        return new JSONObject();
    }
View Full Code Here

    Object doMarkCollapsed(String nodeId)
    {
        expansionModel.markCollapsed(model.getById(nodeId));

        return new JSONObject();
    }
View Full Code Here

        if (result != null)
        {
            return result;
        }

        return new JSONObject();
    }
View Full Code Here

        if (!request.isXHR())
        {
            return true;
        }

        return new JSONObject();
    }
View Full Code Here

        syncValue(encodedValue);

        resources.triggerEvent(EventConstants.REMOVE_ROW, new Object[]
                {value}, null);

        return new JSONObject();
    }
View Full Code Here

        insideForm = formSupport != null;

        if (insideForm)
        {
            JSONObject parameters = new JSONObject(RequestConstants.FORM_CLIENTID_PARAMETER, formSupport.getClientId(),
                    RequestConstants.FORM_COMPONENTID_PARAMETER, formSupport.getFormComponentId());

            e.attribute("data-zone-parameters",
                    parameters.toString(compactJSON));

            hiddenFieldPositioner = new HiddenFieldPositioner(writer, rules);

            actionSink = new ComponentActionSink(logger, clientDataEncoder);
View Full Code Here

TOP

Related Classes of org.apache.tapestry5.json.JSONObject

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.