struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Gadbury <gadb...@googlemail.com>
Subject RE: JSON plugin ignoring includeProperties parameter
Date Tue, 01 Sep 2009 15:08:30 GMT

Thank you.  I shall check it out.  I didn't know about it.

Thank you, I shall check it out.  However, I would still be interested to
know if and how I can use includeProperties to specify properties of a bean
in a map using the json plugin.

Kind regards,

James



mgainty wrote:
> 
> 
> did you try ParameterFilterInterceptor for filtering stack of your action
> http://struts.apache.org/2.1.2/docs/parameter-filter-interceptor.html
> 
> ?
> Martin Gainty 
> ______________________________________________ 
> Verzicht und Vertraulichkeitanmerkung/Note de déni et de confidentialité
>  
> Diese Nachricht ist vertraulich. Sollten Sie nicht der vorgesehene
> Empfaenger sein, so bitten wir hoeflich um eine Mitteilung. Jede unbefugte
> Weiterleitung oder Fertigung einer Kopie ist unzulaessig. Diese Nachricht
> dient lediglich dem Austausch von Informationen und entfaltet keine
> rechtliche Bindungswirkung. Aufgrund der leichten Manipulierbarkeit von
> E-Mails koennen wir keine Haftung fuer den Inhalt uebernehmen.
> Ce message est confidentiel et peut être privilégié. Si vous n'êtes pas le
> destinataire prévu, nous te demandons avec bonté que pour satisfaire
> informez l'expéditeur. N'importe quelle diffusion non autorisée ou la
> copie de ceci est interdite. Ce message sert à l'information seulement et
> n'aura pas n'importe quel effet légalement obligatoire. Étant donné que
> les email peuvent facilement être sujets à la manipulation, nous ne
> pouvons accepter aucune responsabilité pour le contenu fourni.
> 
> 
> 
> 
>> Date: Tue, 1 Sep 2009 06:15:59 -0700
>> From: gadbury@googlemail.com
>> To: user@struts.apache.org
>> Subject: Re: JSON plugin ignoring includeProperties parameter
>> 
>> 
>> Hi,
>> 
>> Sorry to jump a (dead?) thread but it's relevant to what I am trying to
>> do
>> and it made sense to put it in the same thread.
>> 
>> I have the following HashMap:
>> 
>> private Map<String, List<Category>> productCategoriesMap;
>> 
>> in my includeProperties, productCategoriesMap.* populates the json with
>> every property of the Category bean.  For example:
>> 
>> 	{
>> 	"productCategoriesMap":{"ac80e9b6-29e6-4f00-9410-1a18a9dfd317":[{
>> 		"UUID":"4bd497a1-bd1b-417b-8d62-e1273fa5e648",
>> 		"name":"Test Sub-Category EDIT",
>> 		"parentCategoryUUID":"65750a38-d596-48d7-a215-56bcb21d8067",
>> 		"providerRepositoryUUID":"69011624-112a-457b-a222-edd3b543e585"
>> 		},{
>> 		"UUID":"65750a38-d596-48d7-a215-56bcb21d8067",
>> 		"name":"Category 4",
>> 		"parentCategoryUUID":"98e4b067-5b6b-4777-a28a-443a77209948",
>> 		"providerRepositoryUUID":"69011624-112a-457b-a222-edd3b543e585"
>> 		}]
>> 	}
>> 
>> However, I would like to only include UUID and name, as an example.  I
>> have
>> tried:
>> 
>> productCategoriesMap.*.name
>> productCategoriesMap.*.*
>> productCategoriesMap[*].name
>> productCategoriesMap.*\.name
>> productCategoriesMap\.*\.name
>> 
>> How do I use includeProperties to filter properties of beans within a
>> map?
>> -- 
>> View this message in context:
>> http://www.nabble.com/JSON-plugin-ignoring-includeProperties-parameter-tp23660860p25240134.html
>> Sent from the Struts - User mailing list archive at Nabble.com.
>> 
>> 
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
>> For additional commands, e-mail: user-help@struts.apache.org
>> 
> 
> _________________________________________________________________
> Windows Live: Keep your friends up to date with what you do online.
> http://windowslive.com/Campaign/SocialNetworking?ocid=PID23285::T:WLMTAGL:ON:WL:en-US:SI_SB_online:082009
> 

-- 
View this message in context: http://www.nabble.com/JSON-plugin-ignoring-includeProperties-parameter-tp23660860p25242034.html
Sent from the Struts - User mailing list archive at Nabble.com.


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


Mime
View raw message