struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jim Talbut <Jim.Tal...@groupgti.com>
Subject RE: JSON Property
Date Tue, 04 Jan 2011 18:32:23 GMT
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:thechrispratt@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.Kevin@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-unsubscribe@struts.apache.org
> For additional commands, e-mail: user-help@struts.apache.org
>
>

---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org


Mime
View raw message