Re: JSON Plugin to Include Parent Action's Properties

2011-11-03 Thread Chris Pratt
Then create an inner class within your Action that contains just the information youbwant to include in the JSON and set it as the base object to marshal. (*Chris*) On Nov 3, 2011 12:59 PM, "Daniel Ruan" wrote: > Thanks, everybody. > > I tried ignoreHierarchy, but got a Java reflection excepti

Re: JSON Plugin to Include Parent Action's Properties

2011-11-03 Thread jlmagc
List" Subject: Re: JSON Plugin to Include Parent Action's Properties Thanks, everybody. I tried ignoreHierarchy, but got a Java reflection exception. Even if it worked, it would have include too many things I don't want. According to the documentation, it "... serialize prope

Re: JSON Plugin to Include Parent Action's Properties

2011-11-03 Thread Daniel Ruan
Thanks, everybody. I tried ignoreHierarchy, but got a Java reflection exception. Even if it worked, it would have include too many things I don't want. According to the documentation, it "... serialize properties in all base classes (up to Object) ". I could try to use the excludeProperties para

Re: JSON Plugin to Include Parent Action's Properties

2011-11-03 Thread Maurizio Cucchiara
Take a look at http://struts.apache.org/2.2.3/docs/json-plugin.html#JSONPlugin-BaseClasses Twitter     :http://www.twitter.com/m_cucchiara G+          :https://plus.google.com/107903711540963855921 Linkedin    :http://www.linkedin.com/in/mauriziocucchiara Maurizio Cucchiara On 3 November 2011

Re: JSON Plugin to Include Parent Action's Properties

2011-11-03 Thread Nelio Souza Santos Filho
It's a property on action definition. For the example: statusDocumento/list.jsp false dao Abraços, Nelio Souza Santos Filh

Re: JSON Plugin to Include Parent Action's Properties

2011-11-03 Thread jlmagc
There is a property called ignorehierarchy which takes care of that. --Mensaje original-- De: Daniel Ruan Para: Struts Users Mailing List Responder a: Struts Users Mailing List Asunto: JSON Plugin to Include Parent Action's Properties Enviado: 3 Nov, 2011 11:56 Hey, How do I include

JSON Plugin to Include Parent Action's Properties

2011-11-03 Thread Daniel Ruan
Hey, How do I include some of a parent action's properties in the JSON result of an action? In the following example, I'd like MyAction2's JSON result includes name1 and name2 from MyAction1 too. public abstraction class MyAction1 extends ActionSupport { protected String name1; protected