ok...you  made my day....!!!

now I can get rid of all streaming stuff from my action and struts.xml

ok...I admit it pays off to read docs :-)

THANKS!!!

----- Original Message ----
From: Musachy Barroso <[EMAIL PROTECTED]>
To: Struts Users Mailing List <user@struts.apache.org>
Sent: Thursday, December 20, 2007 4:27:24 PM
Subject: Re: JSON and ExtJS

yes indeed.

http://cwiki.apache.org/S2PLUGINS/json-plugin.html

musachy

On Dec 20, 2007 4:23 PM, Peter Bliznak <[EMAIL PROTECTED]> wrote:
> hm..so you are saying
>
> putting things into MAP like this:
>
> MAP entry 1 : success      true
>             entry 2 : rotalCount 20000
>             entry 3 : root            List<Authors>
> is going to create this:
>
> { 'success': true,  'totalCount':'20000',
 
'root':[{'description':'desc0','id':0,'name':'name0','value':'value0'},.......................................................
>
> if so...then you are making my day
>
>
> ----- Original Message ----
> From: Musachy Barroso <[EMAIL PROTECTED]>
> To: Struts Users Mailing List <user@struts.apache.org>
>
> Sent: Thursday, December 20, 2007 3:54:22 PM
> Subject: Re: JSON and ExtJS
>
> just add fields to your action with those names and values, or return
> a map with all those value as the root object to be serialized.
>
> musachy
>
> On Dec 20, 2007 3:49 PM, Peter Bliznak <[EMAIL PROTECTED]> wrote:
> > We are using EXTJS and Struts2 + Hibernate Search and JPA and here
>  are no problems.
> >
> > As for JSON plugin mentioned below.
> > I was using it for old dojo before we gave up on it and switched to
>   beatifull  EXTJS.
> > But I dont think I can use this JSON plugin since there is no way -
>  or let me put it this way -
> > I don't know how to get structure EXTJS data stores are expecting.
> > Say I have list to load table store which is just list of my
>  hibernate VOs.
> > But expected structure must include at the beginning couple of
>  parameters and I see no way
> > how to get them there without changes initial collection.
> >  this is what is required.....:
> > "{ 'success': true,  'totalCount':'20000', 'root':["FROM HERE IT IS
>  JUST
>
  
COLLECTION"{'description':'desc0','id':0,'name':'name0','value':'value0'},{'description':'desc1','id':1,'name':'name1','value':'value1'}
> >  how to add those at the beginning " 'success': true,
>   'totalCount':'20000', " ?
> >
> > Peter.
> > ----- Original Message ----
> > From: Musachy Barroso <[EMAIL PROTECTED]>
> > To: Struts Users Mailing List <user@struts.apache.org>
> > Sent: Thursday, December 20, 2007 3:16:51 PM
> > Subject: Re: JSON and ExtJS
> >
> >
> > You might also want to take a look at the JSON plugin, to decouple
> > your action from JSON at all.
> >
> > musachy
> >
> > On Dec 20, 2007 12:28 PM, Gary Affonso <[EMAIL PROTECTED]>
>  wrote:
> > > Rick Reumann wrote:
> > > > On Dec 20, 2007 10:54 AM, Martin Gainty <[EMAIL PROTECTED]>
> >  wrote:
> > > >
> > > >> JavaDoc mentions that shallow serialization will take place
 with
> >  the
> > > >> include
> > > >> being arbiter of which collection classes
> > > >> may be serialized..
> > > >> hibernate has a similar situation where lazy_init="true" but I
>  can
> >  request
> > > >> hibernate to instantiate parent and child classes via
> > > >> lazy_init="false"..
> > > >> is there any capability for lazy_init="false" i.e. serialize
> >  everything as
> > > >> default behaviour considered for JSONSerializer ?
> > >
> > > I'm getting in late on this thread, please forgive me if I
 mention
> > > something already discussed.
> > >
> > > Have you taken a look at DWR?  It has several mechanisms by which
>  you
> > > can deep-serialize your domain objects and it explicitly knows
>  about
> > > hibernate domain objects..
> > >
> > > I did only a minimal amount of DWR and ExtJS integration but my
> >  memory
> > > is that they can be tweaked to work together in a pretty
> >  straightforward
> > > manner.
> > >
> > > - Gary
> > >
> > >
> > >
>
  ---------------------------------------------------------------------
> > > To unsubscribe, e-mail: [EMAIL PROTECTED]
> > > For additional commands, e-mail: [EMAIL PROTECTED]
> > >
> > >
> >
> >
> >
> > --
> > "Hey you! Would you help me to carry the stone?" Pink Floyd
> >
> >
 ---------------------------------------------------------------------
> > To unsubscribe, e-mail: [EMAIL PROTECTED]
> > For additional commands, e-mail: [EMAIL PROTECTED]
> >
> >
> >
> >
> >
>
>
>
> --
> "Hey you! Would you help me to carry the stone?" Pink Floyd
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>
>
>
>



-- 
"Hey you! Would you help me to carry the stone?" Pink Floyd

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




Reply via email to