@Override public Object createMap() { return new JSONObject(); }
@Override public Object parse(final String json) throws InvalidJsonException { return new JSONObject(json); }
@Override public Object createMap() { return new JSONObject(); }
@Override public Object parse(final String json) throws InvalidJsonException { return new JSONObject(json); }
/** * Returns a new JSONObject that is a shallow copy of this JSONObject. * * @since 5.4 */ public JSONObject copy() { JSONObject dupe = new JSONObject(); dupe.nameValuePairs.putAll(nameValuePairs); return dupe; }
@AfterRender public void afterRender() { if(params == null) params = new JSONObject(); JSONObject opt = new JSONObject(); opt.put("id", id); opt.put("params", params); javaScriptSupport.require("tjq/flexslider").with(opt); }
@AfterRender public void afterRender() { if(parameters == null) parameters = new JSONObject(); JSONObject opt = new JSONObject(); opt.put("id", id); opt.put("params", parameters); //javaScriptSupport.importJavaScriptLibrary("http://maps.google.com/maps/api/js?sensor=false"); javaScriptSupport.require("tjq/GMap").with(opt); }
protected JSONObject overrideParams(){ if ( options == null ) { options = new JSONObject(); } JSONObject params = new JSONObject(); if(widgetParams.paramsForWidget(widgetName())!=null){ params=widgetParams.paramsForWidget(widgetName()); JQueryUtils.merge(params, options); return params; } return options; }
@Benchmark @Override public Object tapestry() throws Exception { org.apache.tapestry5.json.JSONObject node = new org.apache.tapestry5.json.JSONObject(JSON_SOURCE().nextString()); return node; }
@PublishEvent JSONObject onAction() { return new JSONObject("origin", "componentAction"); }
public void afterRender(){ JSONObject json = new JSONObject(); json.put("id", element.getClientId()); js.require("tjq/placeholder").with(json); } }
@Override public org.apache.tapestry5.json.JSONObject tapestry(final Users obj) throws IOException { org.apache.tapestry5.json.JSONObject jso = new org.apache.tapestry5.json.JSONObject(); if (obj.users != null) { org.apache.tapestry5.json.JSONArray jsarr = new org.apache.tapestry5.json.JSONArray(); for (User u : obj.users) { jsarr.put(tapestry(u)); } jso.put("users", jsarr); } return jso; }
void afterRender() { JSONObject data = new JSONObject(); data.put("id", getClientId()); javaScriptSupport.require("tjq/checkbox").with(data); }
@Import(stylesheet="typeahead-bootstrap3.css") void afterRender() { Link link = resources.createEventLink(EVENT_NAME, context); JSONObject spec = new JSONObject("id", field.getClientId(), "url", link.toString()).put("minChars", minChars).put("limit", maxSuggestions); jsSupport.require("t5/core/autocomplete").with(spec); }
@OnEvent("answer") @PublishEvent JSONObject answer() { return new JSONObject("origin", "componentAnswer"); }
@AfterRender() public void finish(MarkupWriter w){ JSONObject jso = new JSONObject(); jso.put("id", clientId); jso.put("params", params); javaScriptSupport.require("tjq/carousel").with(jso); }
@AfterRender public void initJs(){ if(options == null) options = new JSONObject(); JSONObject opt = new JSONObject(); opt.put("id", clientElement.getClientId()); opt.put("url" , resources.createEventLink("sortable", (Object[]) null).toAbsoluteURI()); opt.put("params", options); javaScriptSupport.require("tjq/ui").invoke("sortable").with(opt); }
public void afterRender() { final JSONObject params = new JSONObject(); params.put("id", getClientId()); params.put("lang", getLanguage()); params.put("beginLine", beginLine); JQueryUtils.merge(defaultSpecs, specs); params.put("options", defaultSpecs); support.require("tjq/source").with(params); }
@AfterRender() public void finish(MarkupWriter w){ w.end(); JSONObject jso = new JSONObject(); jso.put("id", getClientId()); jso.put("classe", classe); jso.put("params", params); jso.put("supersubs", supersubs); jso.put("supersubsParams", supersubsParams); javaScriptSupport.require("tjq/mySuperfish").with(jso); }
@AfterRender void initJavaScript() { String url = resources.createEventLink(event, context).toAbsoluteURI(); String elementId = element.getClientId(); JSONObject spec = new JSONObject(); spec.put("url", url); spec.put("elementId", elementId); spec.put("event", clientEvent); spec.put("zone", zone); jsSupport.require("tjq/zoneupdater").with(spec); //jsSupport.addScript("%sZoneUpdater = new T5JQZoneUpdater(%s)", prefix, spec.toString()); }