That works out for this case Freddy. Thanks for the suggestion.
If I have cause to read the body directly ... is there a mechanism to do
that from within Stripes? Unless I'm missing something, it appears as if
Stripes is scrubbing the body of the post.
Thanks again for your help Freddy.
-Luther
Freddy D. wrote:
>
> Hi Luther,
>
> How about just binding to a property?
>
> Javascript (jQuery):
> $.post(url, {jsonString: '[[0,"2"],["2",-1]]'});
>
> Java:
> public String jsonString;
> // could also use private field with public getter and setter if you
> prefer
>
> @HandlesEvent("update")
> @DefaultHandler
> public Resolution updateState()
> {
> try
> {
> StateBeanAction.LOG.info("StateBeanAction.updateState: " +
> jsonString;
> return new StreamingResolution(MimeTypes.JSON, "");
> } catch (final IOException e) {
> final String msg = "Error tring to parse JSON state string. "
> + e.getMessage();
> StateBeanAction.LOG.error(msg, e);
> }
> return null;
> }
>
> Let me know if that helps.
>
> Cheers,
> Freddy
>
--
View this message in context:
http://old.nabble.com/Reading-JSON-in-an-ActionBean-tp27749822p27752316.html
Sent from the stripes-users mailing list archive at Nabble.com.
------------------------------------------------------------------------------
Download Intel® Parallel Studio Eval
Try the new software tools for yourself. Speed compiling, find bugs
proactively, and fine-tune applications for parallel performance.
See why Intel Parallel Studio got high marks during beta.
http://p.sf.net/sfu/intel-sw-dev
_______________________________________________
Stripes-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/stripes-users