You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tapestry.apache.org by Lionell_Hutz <de...@gmx.de> on 2009/09/22 15:28:09 UTC
returning JSONObject always displays the js-code
Hi there.
I'm using some links and a zone component. the EventHandler looks like this
(only some playing around and learning):
public Object onLeague(Object[] in) {
...
JSONObject json = new JSONObject();
json.put("content","");
json.put("script", "alert('hi');");
return json;
}
and I'm alwasy getting an zone-update which shows me the json-onject-literal
and not the wished alertbox with 'hi'.
What's wrong there?
--
View this message in context: http://www.nabble.com/returning-JSONObject-always-displays-the-js-code-tp25530724p25530724.html
Sent from the Tapestry - User mailing list archive at Nabble.com.
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
For additional commands, e-mail: users-help@tapestry.apache.org
Re: returning JSONObject always displays the js-code
Posted by "Thiago H. de Paula Figueiredo" <th...@gmail.com>.
Em Tue, 22 Sep 2009 10:28:09 -0300, Lionell_Hutz <de...@gmx.de>
escreveu:
> Hi there.
Hi!
> I'm using some links and a zone component. the EventHandler looks like
> this (only some playing around and learning):
> and I'm alwasy getting an zone-update which shows me the
> json-onject-literal
> and not the wished alertbox with 'hi'.
> What's wrong there?
The use of JSON with Zones. :) JSONObject is meant to be used when you
write your own JavaScript to request something in your page, component or
mixin class, When using Zones, you shouldn't return JSONObjets, as they
expect a Block or a component.
--
Thiago H. de Paula Figueiredo
Independent Java consultant, developer, and instructor
http://www.arsmachina.com.br/thiago
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
For additional commands, e-mail: users-help@tapestry.apache.org