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
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
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
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
It's a property on action definition.
For the example:
statusDocumento/list.jsp
false
dao
Abraços,
Nelio Souza Santos Filh
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
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
7 matches
Mail list logo