The "obvious" place to me would seem to be the Struts 2 JSON Plug-in, since it handles all the other JSON duties for Struts 2. (*Chris*)
On Tue, Jan 4, 2011 at 10:32 AM, Jim Talbut <jim.tal...@groupgti.com> wrote: > I could do that (as Aaron Brown suggested on Monday) but I don't already > have actions that spit out the right JSON. > Creating more actions would be more work than creating JSON getters. > Creating either actions or special getters also seems wrong to me - it's > the JSP that needs JSON and it should only be the JSP that knows that it > needs JSON. > Obviously if one is dealing with AJAX one has no choice but to have JSON > actions, but I'm not. > > I've now written a JSON tag, but given that Steven Yang and I have now > written something to do the same job it seems to me that there ought to be > some common entity for providing it (i.e. I think it should be in > struts-json-tags). > > Jim > > -----Original Message----- > From: Chris Pratt [mailto:thechrispr...@gmail.com] > Sent: 04 January 2011 15:54 > To: Struts Users Mailing List > Subject: Re: JSON Property > > You might also need the executeResult="true" attribute on the <s:action> > tag. > (*Chris*) > > On Tue, Jan 4, 2011 at 7:06 AM, Biesbrock, Kevin > <biesbrock.ke...@aoins.com>wrote: > > > > I don't want to use a separate roundtrip for loading the jqGrid for > > two reasons: > > > 1. I want to handle the contents of the grid, and additional fields, > > in a single transaction. > > > 2. It's inefficient and unnecessary. > > > Obviously the first is the more important :) > > > > > > I think you could do something like this in your jsp: > > > > <input type="hidden" name="jgrid-json-data" value="<s:action > > name="myJsonAction" namespace="/json"/>"/> > > > > This would allow you to use the already-in-place json result type and > > save you a lot of extra work. > > > > > > -Beez > > > > > > --------------------------------------------------------------------- > > To unsubscribe, e-mail: user-unsubscr...@struts.apache.org > > For additional commands, e-mail: user-h...@struts.apache.org > > > > > > --------------------------------------------------------------------- > To unsubscribe, e-mail: user-unsubscr...@struts.apache.org > For additional commands, e-mail: user-h...@struts.apache.org > >