You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@wicket.apache.org by Boris Goldowsky <bg...@cast.org> on 2010/03/19 17:17:55 UTC

Responding to JSON request

I'm trying to make the spellcheck part of the wicketstuff tinymce module 
work.  I think the protocol used by the spellchecking plugin may have 
changed since this module was written.

TinyMCE sends a POST request to the server; the post data looks 
something like this (this is JSON format, right?)

|{"id":"c0","method":"checkWords","params":["en",["text","to","check"||]]}|


a Resource is trying to respond to this, but how does it get access to 
the post data?  The previous version used getParameters(), but 
getParamters() does not seem to see this post data.

Bng


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
For additional commands, e-mail: users-help@wicket.apache.org


Re: Responding to JSON request

Posted by Igor Vaynberg <ig...@gmail.com>.
sounds weird. you will have to pull out httpservletrequest out of
webrequest and see how to get that info.

-igor

On Fri, Mar 19, 2010 at 10:09 AM, Boris Goldowsky <bg...@cast.org> wrote:
> It doesn't seem to have any parameter name - I'm looking at the request in
> Firebug and it had just that string.  In the getResourceStream() method
> getParameters().entrySet() always appears to be empty.
>
> The PHP backend that they provide goes through some shenanigans to get the
> raw POST data and parse it.  So perhaps TinyMCE is doing this in a
> non-standard way?
>
> Bng
>
>
> Igor Vaynberg wrote:
>>
>> there is no parameter name that it sends it under? the {} string has
>> to be assigned to something....
>>
>> -igor
>>
>> On Fri, Mar 19, 2010 at 9:17 AM, Boris Goldowsky <bg...@cast.org>
>> wrote:
>>
>>>
>>> I'm trying to make the spellcheck part of the wicketstuff tinymce module
>>> work.  I think the protocol used by the spellchecking plugin may have
>>> changed since this module was written.
>>>
>>> TinyMCE sends a POST request to the server; the post data looks something
>>> like this (this is JSON format, right?)
>>>
>>>
>>> |{"id":"c0","method":"checkWords","params":["en",["text","to","check"||]]}|
>>>
>>>
>>> a Resource is trying to respond to this, but how does it get access to
>>> the
>>> post data?  The previous version used getParameters(), but getParamters()
>>> does not seem to see this post data.
>>>
>>> Bng
>>>
>>>
>>> ---------------------------------------------------------------------
>>> To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
>>> For additional commands, e-mail: users-help@wicket.apache.org
>>>
>>>
>>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
>> For additional commands, e-mail: users-help@wicket.apache.org
>>
>>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
> For additional commands, e-mail: users-help@wicket.apache.org
>
>

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
For additional commands, e-mail: users-help@wicket.apache.org


Re: Responding to JSON request

Posted by Boris Goldowsky <bg...@cast.org>.
It doesn't seem to have any parameter name - I'm looking at the request 
in Firebug and it had just that string.  In the getResourceStream() 
method getParameters().entrySet() always appears to be empty.

The PHP backend that they provide goes through some shenanigans to get 
the raw POST data and parse it.  So perhaps TinyMCE is doing this in a 
non-standard way?

Bng


Igor Vaynberg wrote:
> there is no parameter name that it sends it under? the {} string has
> to be assigned to something....
>
> -igor
>
> On Fri, Mar 19, 2010 at 9:17 AM, Boris Goldowsky <bg...@cast.org> wrote:
>   
>> I'm trying to make the spellcheck part of the wicketstuff tinymce module
>> work.  I think the protocol used by the spellchecking plugin may have
>> changed since this module was written.
>>
>> TinyMCE sends a POST request to the server; the post data looks something
>> like this (this is JSON format, right?)
>>
>> |{"id":"c0","method":"checkWords","params":["en",["text","to","check"||]]}|
>>
>>
>> a Resource is trying to respond to this, but how does it get access to the
>> post data?  The previous version used getParameters(), but getParamters()
>> does not seem to see this post data.
>>
>> Bng
>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
>> For additional commands, e-mail: users-help@wicket.apache.org
>>
>>
>>     
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
> For additional commands, e-mail: users-help@wicket.apache.org
>
>   

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
For additional commands, e-mail: users-help@wicket.apache.org


Re: Responding to JSON request

Posted by Igor Vaynberg <ig...@gmail.com>.
there is no parameter name that it sends it under? the {} string has
to be assigned to something....

-igor

On Fri, Mar 19, 2010 at 9:17 AM, Boris Goldowsky <bg...@cast.org> wrote:
> I'm trying to make the spellcheck part of the wicketstuff tinymce module
> work.  I think the protocol used by the spellchecking plugin may have
> changed since this module was written.
>
> TinyMCE sends a POST request to the server; the post data looks something
> like this (this is JSON format, right?)
>
> |{"id":"c0","method":"checkWords","params":["en",["text","to","check"||]]}|
>
>
> a Resource is trying to respond to this, but how does it get access to the
> post data?  The previous version used getParameters(), but getParamters()
> does not seem to see this post data.
>
> Bng
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
> For additional commands, e-mail: users-help@wicket.apache.org
>
>

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
For additional commands, e-mail: users-help@wicket.apache.org