Re: JSON plugin: filter fields in a Map with Lists

2019-10-02 Thread Micael Carreira
Thanks Yasser, that was exactly what I was looking for. Cheers, Email Signature Micael Carreira Software Developer Logo Rua Augusto Macedo, 12-B 1600-794 Lisbon - Portugal t: +351 21 714 4500 www.itclinica

Re: JSON plugin: filter fields in a Map with Lists

2019-09-27 Thread Yasser Zamani
You're welcome :) Sorry I thought you don't need keys. If you needed them, then following would work: public Map> getResult() { return result; } ^result\.[^\[]+\[\d+\]\.interestingProperty$ Then only limitation of this one is that keys should not

Re: JSON plugin: filter fields in a Map with Lists

2019-09-27 Thread Micael Carreira
Thanks, that indeed works Yasser. However, with that configuration I won't have access to the map keys, which I also need. For now, I created a new getter that retrieves only the keys, but this is a workaround. However from what you said, I guess it is not possible to have both the keys and

Re: JSON plugin: filter fields in a Map with Lists

2019-09-26 Thread Yasser Zamani
Hi Micael, thanks for your report! You're right! I debugged Struts with your model, Map>. I realized with following sample initialization: MyObject mo = new MyObject(); mo.setInterestingProperty("IP"); mo.setNotInterestingProperty("NIP"); ArrayList mol = new ArrayL

Re: JSON plugin: filter fields in a Map with Lists

2019-09-25 Thread Micael Carreira
Hello Yasser, thanks for your reply. It did not work. The configuration you suggested, sends nothing in JSON object. I also tried this configuration:     result\..+,     result,interestingProperty But it sends all properties, including notInterestingProperty. Best regards, Email Signatur

RE: JSON plugin: filter fields in a Map with Lists

2019-09-25 Thread Yasser Zamani
>-Original Message- >From: Micael Carreira >Sent: Tuesday, September 24, 2019 1:30 PM >To: user@struts.apache.org >Subject: JSON plugin: filter fields in a Map with Lists > >Hello, > >In MyAction, I have the following instance variable: > >     Map> result; > >And MyObject has the follow

Re: Json Plugin & Enum type

2011-12-20 Thread Maurizio Cucchiara
http://struts.apache.org/2.3.1/struts2-plugins/struts2-json-plugin/apidocs/org/apache/struts2/json/annotations/JSONFieldBridge.html

Re: Json Plugin & Enum type

2011-12-20 Thread Maurizio Cucchiara
I understand what you mean, furthermore I found a workaround for it: @JSONFieldBridge(impl = StringBridge.class) public ENUM_TYPE getType() { return type; } Twitter :http://www.twitter.com/m_cucchiara G+ :https://plus.google.com/107903711540963855921 Linkedin:http://www.l

Re: Json Plugin & Enum type

2011-12-20 Thread Dave Newton
But some people use `toString()` as a generic "let's make this human-readable" method, so it could return essentially anything. I mean, it'd be escaped, so legal JSON, but I'm not sure that's what would be expected. I'm wary. d. On Tue, Dec 20, 2011 at 11:23 AM, Maurizio Cucchiara wrote: > Hi a

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 some

Re: JSON Plugin - my execute method is being called twice

2011-03-15 Thread Rodrigo Esteban Cares Guarda
Yes, you can try this. Greetings El mar, 15-03-2011 a las 10:16 -0500, Muneer Malik escribió: > You mean have all your action logic in getJSON? > > > > On Tuesday, March 15, 2011, Rodrigo Esteban Cares Guarda > wrote: > > Hi, > > if you have the method "execute" and "getJSON" in your action c

Re: JSON Plugin - my execute method is being called twice

2011-03-15 Thread Muneer Malik
You mean have all your action logic in getJSON? On Tuesday, March 15, 2011, Rodrigo Esteban Cares Guarda wrote: > Hi, > if you have the method "execute" and "getJSON" in your action class, try > comment the "execute" method. > > Greetings > > El mar, 15-03-2011 a las 00:27 -0700, Johannes Geppe

Re: JSON Plugin - my execute method is being called twice

2011-03-15 Thread Rodrigo Esteban Cares Guarda
Hi, if you have the method "execute" and "getJSON" in your action class, try comment the "execute" method. Greetings El mar, 15-03-2011 a las 00:27 -0700, Johannes Geppert escribió: > if you are using validation it is normaly that you get two requests. > the first request is for validation and

Re: JSON Plugin - my execute method is being called twice

2011-03-15 Thread Johannes Geppert
if you are using validation it is normaly that you get two requests. the first request is for validation and the second is the expected request. Johannes -- View this message in context: http://struts.1045723.n5.nabble.com/JSON-Plugin-my-execute-method-is-being-called-twice-tp3635553p3681532.ht

Re: JSON Plugin - my execute method is being called twice

2011-03-14 Thread Muneer Malik
also noticed: 6 times constructor called 2 time execute This is when validation is true DEBUG [http-8080-6] net.xxx.emr.workflow.action.insertHeparinAjax - In the constructor DEBUG [http-8080-6] net.xxx.emr.workflow.action.insertHeparinAjax - In the constructor DEBUG [http-8080-4] net.xxx.emr.wo

Re: JSON Plugin - my execute method is being called twice

2011-03-14 Thread Muneer Malik
If I don't use the sj:dialog (just regular form) and just the form with Ajax - its calling only once. but when validate is true, then the action is called multiple times. So believe something is definitely not right when used with validation and sj:submit being used inside dialog. Thanks On

Re: JSON Plugin - my execute method is being called twice

2011-03-14 Thread Muneer Malik
ok - my observation if I use the sj:submit by itself then the JSON plugin is called only once (confirmed from Chrome developer tool). IF I add the sj:submit inside the sj:dialog - it is called twice IF I add the validation then it is called 6 times it seems like the sj: tags is creating issues

Re: JSON Plugin - my execute method is being called twice

2011-03-14 Thread Muneer Malik
its the same action configured ! Best, Muneer On Mon, Mar 14, 2011 at 8:58 PM, satyanarayana katta wrote: > Check if the action is submitted twice! If you are using js submit of the > form explicitly and form tag also has the same action configured. > > Sent from my iPhone > > On Mar 14,

Re: JSON Plugin - my execute method is being called twice

2011-03-14 Thread satyanarayana katta
Check if the action is submitted twice! If you are using js submit of the form explicitly and form tag also has the same action configured. Sent from my iPhone On Mar 14, 2011, at 6:45 PM, fr...@meruvian.org wrote: > We got current json plugins also have problem parse json > > I think the jso

Re: JSON Plugin - my execute method is being called twice

2011-03-14 Thread frans
We got current json plugins also have problem parse json I think the json jar is the current issue We modify to use jackson Anyone? The actionmapper using jackson we put in github.com/blueoxygen/cimande /m/ -Original Message- From: Muneer Malik Date: Mon, 14 Mar 2011 19:36:33 To: S

Re: JSON Plugin - my execute method is being called twice

2011-03-14 Thread Brian Thompson
On Mon, Mar 14, 2011 at 8:03 PM, Dave Newton wrote: > On Mon, Mar 14, 2011 at 8:36 PM, Muneer Malik wrote: > > Can someone help here? using the JSON plugin - my execute method is being > > called twice. > > So far, it sounds like it's being called twice for some reason. > > Any other information

Re: JSON Plugin - my execute method is being called twice

2011-03-14 Thread Dave Newton
On Mon, Mar 14, 2011 at 8:36 PM, Muneer Malik wrote: > Can someone help here? using the JSON plugin - my execute method is being > called twice. So far, it sounds like it's being called twice for some reason. Any other information available? Dave ---

Re: JSON plugin suggest : parse String value "" to Number with null / 0

2010-11-24 Thread Knight Chen
Does this possible? In source code: Object org.apache.struts2.json.JSONPopulator.convertPrimitive(Class clazz, Object value, Method method) throws JSONException { if (value == null) { if (Short.TYPE.equals(clazz) || Short.class.equals(clazz)) return (short) 0;

Re: JSON plugin suggest : parse String value "" to Number with null / 0

2010-11-24 Thread Maurizio Cucchiara
2010/11/24 Martin Gainty > if the attribute is available in object acquired by > invocation.getAction() then you should see the target > > does this answer your question? > Actually, It doesn't. I meant that conversion methods like convertPrimitive (see the code below) use to take class type a

RE: JSON plugin suggest : parse String value "" to Number with null / 0

2010-11-24 Thread Martin Gainty
t 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: Wed, 24 Nov 2010 20:16:45 +0800 > Subject: Re: JSON plugin s

Re: JSON plugin suggest : parse String value "" to Number with null / 0

2010-11-24 Thread Knight Chen
Thanks,Maurizio, This is not a wrong approach. but can be take a improved for easier use. :P Regards. On Tue, Nov 23, 2010 at 12:10 PM, Maurizio Cucchiara wrote: > Hi Knight, > I take your point, JSONPopulator.convertPrimitive function maybe uses a > wrong approach. > Does anyone know why conv

Re: JSON plugin suggest : parse String value "" to Number with null / 0

2010-11-22 Thread Maurizio Cucchiara
Hi Knight, I take your point, JSONPopulator.convertPrimitive function maybe uses a wrong approach. Does anyone know why convert method process is driven by value and type instead of target type only? 2010/11/23 Knight Chen > Hi All, > Thanks for reply, and sorry for my poor English. > > In this

Re: JSON plugin suggest : parse String value "" to Number with null / 0

2010-11-22 Thread Knight Chen
Hi All, Thanks for reply, and sorry for my poor English. In this case: I have a POJO: public class UserDTO { private int age; ... public void setAge(int age) { this.age = age; } } And Action has a property with this type: public Class UserAction { priv

Re: JSON plugin suggest : parse String value "" to Number with null / 0

2010-11-22 Thread Maurizio Cucchiara
I'm not sure understand what you mean, it could be ognl conversion related. For further details, could you provide the NPE stack? 2010/11/22 Knight Chen > Hi all, > > I often encounter Number format exception when I use JSON plugin to > parse input String "" from AJAX request to Number, > becaus

Re: JSON plugin suggest : parse String value "" to Number with null / 0

2010-11-22 Thread Mead Lai
Hello Knight, I think you can change the Value-Object(Model obj), modify the get method code: if(this.value.equal("")){ this.value=null; or this.value=0 } You can pass a Value-Object to server side, instead of Json-Text formation. Regards, Mead On Mon, Nov 22, 2010 at 8:12 PM, K

Re: JSON Plugin Question

2010-04-27 Thread Ozu Natsu
Thanks for the reply. I thought that the submit might be the problem. I have a regular button doing the submit. I tried just using a with an onClick action that was something like onclick="document.forms[0].submit();" That produced the same result. I also tried calling the JS method that does t

Re: JSON Plugin Question

2010-04-26 Thread Rahul Mohan
Hi, Is your intention to show the message 'success' in the results div? In that case you don't need a JSON response. Also, is jsonData an instance variable of your action class. Otherwise, your json result will simply return an empty json. You can verify the response by opening the response i

Re: JSON plugin ignoring includeProperties parameter

2010-02-09 Thread Gadbury
Hi new2struts, Thank you very much for your time, investigation and explanation. This is very useful to know. All the best, James. -- View this message in context: http://old.nabble.com/JSON-plugin-ignoring-includeProperties-parameter-tp23660860p27511971.html Sent from the Struts - User mail

Re: JSON plugin ignoring includeProperties parameter

2010-02-05 Thread new2struts
Since no one seems to have posted an answer anywhere (and this exact same problem stumped me for a while), I thought I'd share what worked for me. I loaded the jsonplugin code and figured out what I needed to do to use the "includeProperties" param to only serialize a certain property of my list.

Re: JSON plugin ignoring includeProperties parameter

2009-09-01 Thread Gadbury
The first regex returns nothing and the second everything (as before). My regex is pretty poor but if I ignore regex, what would the syntax be for accessing the property of a bean is a list in the map. i.e. given the map: private Map> productCategoriesMap Would it be: myMap['myKey'].beanPrope

Re: JSON plugin ignoring includeProperties parameter

2009-09-01 Thread Musachy Barroso
On Tue, Sep 1, 2009 at 6:40 AM, Martin Gainty wrote: > > did you try ParameterFilterInterceptor for filtering stack of your action > http://struts.apache.org/2.1.2/docs/parameter-filter-interceptor.html > > What in the name of Margawse are you talking about? Would you mind explaining why you think

Re: JSON plugin ignoring includeProperties parameter

2009-09-01 Thread Musachy Barroso
Java regexes are greedy by default if I dont remember wrong, so you should try something like: productCategoriesMap[.*?]\.name or productCategoriesMap\..*?\.name musachy On Tue, Sep 1, 2009 at 6:15 AM, Gadbury wrote: > > Hi, > > Sorry to jump a (dead?) thread but it's relevant to what I am try

RE: JSON plugin ignoring includeProperties parameter

2009-09-01 Thread Gadbury
ue > 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: gadb...@googlemail.com >> To: user@struts.apache.org >> Subject: Re: JS

RE: JSON plugin ignoring includeProperties parameter

2009-09-01 Thread Martin Gainty
esponsabilité pour le contenu fourni. > Date: Tue, 1 Sep 2009 06:15:59 -0700 > From: gadb...@googlemail.com > To: user@struts.apache.org > Subject: Re: JSON plugin ignoring includeProperties parameter > > > Hi, > > Sorry to jump a (dead?) thread but it's relev

Re: JSON plugin ignoring includeProperties parameter

2009-09-01 Thread Gadbury
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> productCategoriesMap; in my includeProperties, productCategoriesMap.* populates the json with every property of the Category

Re: JSON Plugin

2009-08-15 Thread dusty
Nice Musachy! I have several projects I can test it out on. I will let you know if I find anything. -D Musachy Barroso wrote: > > FYI the JSON Plugin(http://code.google.com/p/jsonplugin/) is now part > of Struts and will be released in 2.1.8. The code at Google Code will > not be maintained a

Re: JSON Plugin and S:Action

2009-07-15 Thread Chris Pratt
Yup, I had to change a couple of my helper classes because of that change. (*Chris*) On Wed, Jul 15, 2009 at 9:14 AM, Musachy Barroso wrote: > yeah, something did change and I think ti was some signature from > Map to Map or the other way around. > > On Wed, Jul 15, 2009 at 9:08 AM, Wes Wannem

Re: JSON Plugin and S:Action

2009-07-15 Thread Musachy Barroso
yeah, something did change and I think ti was some signature from Map to Map or the other way around. On Wed, Jul 15, 2009 at 9:08 AM, Wes Wannemacher wrote: > That's weird, now you have me more curious, I don't remember making > changes to get it working in 2.1, other than updating unit tests...

RE: JSON Plugin and S:Action

2009-07-15 Thread Martin Gainty
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: Wed, 15 Jul 2009 12:08:50 -0400 > Subject: Re: JSON Plugin and S:Actio

Re: JSON Plugin and S:Action

2009-07-15 Thread Wes Wannemacher
That's weird, now you have me more curious, I don't remember making changes to get it working in 2.1, other than updating unit tests... Musachy, do you remember that going from 2.1.2 to 2.1.3? I was using it with 2.1.3-SNAPSHOT quite a bit, so it must have been something that changed shortly after

Re: JSON Plugin and S:Action

2009-07-15 Thread Chris Pratt
It was in one of my earlier posts, but I was getting this: java.lang.NoSuchMethodError: com.opensymphony.xwork2.ActionContext.get(Ljava/lang/String;)Ljava/lang/Object; at com.googlecode.jsonplugin.JSONResult.execute(JSONResult.java:157) at com.opensymphony.xwork2.DefaultActionInvoc

Re: JSON Plugin and S:Action

2009-07-15 Thread Wes Wannemacher
On Wed, Jul 15, 2009 at 11:56 AM, Chris Pratt wrote: > Yup, the latest jar file works with 2.1.6 (but not 2.1.2 for the record). >  (*Chris*) What went wrong in 2.1.2? This intrigues me :) -Wes > > On Wed, Jul 15, 2009 at 8:11 AM, Musachy Barroso wrote: > >> I think the last release worked with

Re: JSON Plugin and S:Action

2009-07-15 Thread Chris Pratt
Yup, the latest jar file works with 2.1.6 (but not 2.1.2 for the record). (*Chris*) On Wed, Jul 15, 2009 at 8:11 AM, Musachy Barroso wrote: > I think the last release worked with 2.1 right? > > musachy > > On Wed, Jul 15, 2009 at 5:59 AM, Wes Wannemacher wrote: > > On Wed, Jul 15, 2009 at 3:35

Re: JSON Plugin and S:Action

2009-07-15 Thread Musachy Barroso
I think the last release worked with 2.1 right? musachy On Wed, Jul 15, 2009 at 5:59 AM, Wes Wannemacher wrote: > On Wed, Jul 15, 2009 at 3:35 AM, Chris Pratt wrote: >> Ok, now I'm totally confused.  The documentation at >> http://cwiki.apache.org/S2PLUGINS/json-plugin.html says that the plug-in

Re: JSON Plugin and S:Action

2009-07-15 Thread Wes Wannemacher
On Wed, Jul 15, 2009 at 3:35 AM, Chris Pratt wrote: > Ok, now I'm totally confused.  The documentation at > http://cwiki.apache.org/S2PLUGINS/json-plugin.html says that the plug-in > required 2.0.6 or greater.  It clearly did not support 2.1.2, but it seems > to support 2.1.6.  Is the documentation

Re: JSON Plugin and S:Action

2009-07-15 Thread Chris Pratt
Ok, now I'm totally confused. The documentation at http://cwiki.apache.org/S2PLUGINS/json-plugin.html says that the plug-in required 2.0.6 or greater. It clearly did not support 2.1.2, but it seems to support 2.1.6. Is the documentation wrong, should that say 2.1.6 instead of 2.0.6? (*Chris*)

Re: JSON Plugin and S:Action

2009-07-14 Thread Chris Pratt
Ok, calling it from AJAX, instead of , seems to work, but unfortunately it appears the JSON Plugin isn't compatible with Struts 2.1. I'm currently using 2.1.2, but the documentation says that it works with 2.0.6. Is there any plan to update it to work with 2.1? What I'm seeing is: java.lang.NoSu

Re: JSON Plugin and S:Action

2009-07-14 Thread Chris Pratt
Don't know, I was trying to initialize the variable using the same action that would be used to update it. And, because of this problem, I haven't been able to initialize it. Maybe I'll give it a try later. (*Chris*) On Tue, Jul 14, 2009 at 7:49 AM, Musachy Barroso wrote: > Never thought of

Re: JSON Plugin and S:Action

2009-07-14 Thread Musachy Barroso
Never thought of this use case before. Does it work if you use the action directly, instead of calling from a jsp? musachy On Mon, Jul 13, 2009 at 11:17 PM, Chris Pratt wrote: > I'm having a problem using with an action > whose result type is json.  It doesn't insert the results.  My Action is >

Re: JSON plugin class loading problem? (Part Deux)

2009-05-24 Thread Dave Newton
Martin Gainty wrote: success.jsp jsonResult /**success.jsp would have logic to accept a ajax response from YourAction*/ The "json" result type writes the response--I'm not sure what a JSP parameter would mean here. Do you have working code configured like this? Dave --

Re: JSON plugin class loading problem? (Part Deux)

2009-05-24 Thread Dave Newton
jim_gre...@fws.gov wrote: I've worked around the problem inconsistent JSON results by removing the root parameter from the JSONResult annotations. It appears that at least I'm getting consistent results this way: @Results( { @Result(name = "jsonPopsResult", type = JSONResult.class, va

RE: JSON plugin class loading problem? (Part Deux)

2009-05-24 Thread Martin Gainty
er aucune responsabilité pour le contenu fourni. > To: user@struts.apache.org > Subject: RE: JSON plugin class loading problem? (Part Deux) > From: jim_gre...@fws.gov > Date: Sun, 24 May 2009 11:54:51 -0600 > > I've worked around the problem inconsistent JSON results by remo

RE: JSON plugin class loading problem? (Part Deux)

2009-05-24 Thread Jim_Greuel
I've worked around the problem inconsistent JSON results by removing the root parameter from the JSONResult annotations. It appears that at least I'm getting consistent results this way: @Results( { @Result(name = "jsonPopsResult", type = JSONResult.class, value = "", params = {"noCach

Re: JSON plugin ignoring includeProperties parameter

2009-05-22 Thread Dave Newton
John Cartwright wrote: Thanks for your suggestion Andras. Strangely that approach is not working for me. Ideally, I'd like to have the option of different fields included for different actions w/ in the same package. You can do that by configuring the interceptor on a per-action basis:

Re: JSON plugin ignoring includeProperties parameter

2009-05-22 Thread John Cartwright
Thanks for your suggestion Andras. Strangely that approach is not working for me. Ideally, I'd like to have the option of different fields included for different actions w/ in the same package. --john Andras Balogh wrote: Hi John, I had the same problem with excludeProperties, what worked

Re: JSON plugin ignoring includeProperties parameter

2009-05-22 Thread John Cartwright
Thanks for the suggestion Dale, but removing the whitespace does not seem to make a difference. --john Dale Newfield wrote: john.c.cartwri...@noaa.gov wrote: items.*\.name Can someone please help me w/ what might be wrong? Maybe the whitespace? Doe

Re: JSON plugin ignoring includeProperties parameter

2009-05-22 Thread John Cartwright
Thank you for your suggestion. However, using "features.*\.name" still does not recognize the property - it is not included in the output. Likewise, removing the annotation does not help either. --john Musachy Barroso wrote: exclude/include properties have to match the java name of the pr

Re: JSON plugin ignoring includeProperties parameter

2009-05-22 Thread Musachy Barroso
exclude/include properties have to match the java name of the properties, not the name in the output. Try using "features.*\.name" as the regular expression. musachy On Fri, May 22, 2009 at 10:48 AM, John Cartwright wrote: > Thanks for your reply Musachy. > > I'm using the JSON annotation to mod

Re: JSON plugin ignoring includeProperties parameter

2009-05-22 Thread John Cartwright
Thanks for your reply Musachy. I'm using the JSON annotation to modify the output, e.g. @JSON(name="items") public List getFeatures() { return (features); } Yes, I am getting a result. It's just that all the fields are being output rather than just the ones listed in the includeProperties.

Re: JSON plugin ignoring includeProperties parameter

2009-05-22 Thread Musachy Barroso
ht > 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'ê

Re: JSON plugin ignoring includeProperties parameter

2009-05-22 Thread Andras Balogh
Hi John, I had the same problem with excludeProperties, what worked for me is to add the param to the interceptor-ref tag and NOT to the result: true .*Collection Best regards, Andras. john.c.cartwri...@noaa.gov wrote: Hello All, I'm trying to use jsonplugin 0.32 w/ struts 2.0.14

Re: JSON plugin ignoring includeProperties parameter

2009-05-21 Thread Musachy Barroso
There is a getItems() in your action right? Does anything get generated at all? musachy -- "Hey you! Would you help me to carry the stone?" Pink Floyd - To unsubscribe, e-mail: user-unsubscr...@struts.apache.org For additional

Re: JSON plugin ignoring includeProperties parameter

2009-05-21 Thread Dave Newton
Martin Gainty wrote: Here is the code private List includeProperties; includeProperties is a List of Regular Expression java.util.regex.Patterns javadoc at http://java.sun.com/j2se/1.4.2/docs/api/java/util/regex/Pattern.html try expressing the String as a regex Pattern e.g. [i][t][e][m][s]\p{

RE: JSON plugin ignoring includeProperties parameter

2009-05-21 Thread Martin Gainty
Here is the code private List includeProperties; includeProperties is a List of Regular Expression java.util.regex.Patterns javadoc at http://java.sun.com/j2se/1.4.2/docs/api/java/util/regex/Pattern.html try expressing the String as a regex Pattern e.g. [i][t][e][m][s]\p{.}\p{*}\p{\}\p{.}[n][a]

Re: JSON plugin ignoring includeProperties parameter

2009-05-21 Thread Dale Newfield
john.c.cartwri...@noaa.gov wrote: items.*\.name Can someone please help me w/ what might be wrong? Maybe the whitespace? Does it behave any differently if you do: items.*\.name ? -Dale -

RE: JSON plugin class loading problem? (Part Deux)

2009-05-20 Thread Martin Gainty
;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. > From: mgai...@hotmail.com > To: user@struts.apache.org > Subject: RE: J

Re: JSON plugin class loading problem? (Part Deux)

2009-05-19 Thread Musachy Barroso
risé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 >

RE: JSON plugin class loading problem? (Part Deux)

2009-05-19 Thread Martin Gainty
27;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. From: mgai...@hotmail.com To: user@struts.apache.org Subje

Re: JSON plugin class loading problem?

2009-05-19 Thread Musachy Barroso
Martin, where do you get these random code sections from? Please refrain from posting "answers" that will just confuse users. This is a community and we benefit from the help and collaboration of users, so we encourage everyone to participate, but just throwing random code, from projects that are n

RE: JSON plugin class loading problem?

2009-05-19 Thread Martin Gainty
Jim- /** * Generates the key to store the bean in the session with. */ private void updateBeanKey() { if (this.sessionKey == null) { final StringBuffer buff = new StringBuffer(); buff.append(this.getClass().getName()); //WHAT iS THE CLASSNAME doing

Re: JSON plugin class loading problem?

2009-05-19 Thread Musachy Barroso
That's pretty weird, you could try mapping that action with XML, if the problem goes away, then it is a Codebehind problem, but I can't think of anything causing this. musachy On Tue, May 19, 2009 at 2:26 PM, wrote: > I am using version 0.32 of the JSON plugin with Struts 2.0.11.  It seems > to

Re: JSON plugin class loading problem?

2009-05-19 Thread dusty
I have used the JSON plugin quite a bit and I have not seen the root switching you are describing. The only difference I can see is that I am using xml config for those actions. It seems like your result is not getting the "root" parameter. Could it be an issue with the @Result annotation combi

Re: json-plugin and Annotations (OR, implementations of Result that DO not inherit from StrutsResultSupport)

2008-10-12 Thread Alex Coles
On Sun, Oct 12, 2008 at 5:51 AM, Wes Wannemacher <[EMAIL PROTECTED]> wrote: > On Sun, 2008-10-12 at 05:29 +0200, Alex Coles wrote: >> Hi Wes, >> >> Thanks for your response! >> >> On Sun, Oct 12, 2008 at 5:15 AM, Wes Wannemacher <[EMAIL PROTECTED]> wrote: >> > It's funny that you happened to ask th

Re: json-plugin and Annotations (OR, implementations of Result that DO not inherit from StrutsResultSupport)

2008-10-11 Thread Wes Wannemacher
On Sun, 2008-10-12 at 05:29 +0200, Alex Coles wrote: > Hi Wes, > > Thanks for your response! > > On Sun, Oct 12, 2008 at 5:15 AM, Wes Wannemacher <[EMAIL PROTECTED]> wrote: > > It's funny that you happened to ask this tonight, I am working on a JSON > > result with annotations as I am writing thi

Re: json-plugin and Annotations (OR, implementations of Result that DO not inherit from StrutsResultSupport)

2008-10-11 Thread Alex Coles
Hi Wes, Thanks for your response! On Sun, Oct 12, 2008 at 5:15 AM, Wes Wannemacher <[EMAIL PROTECTED]> wrote: > It's funny that you happened to ask this tonight, I am working on a JSON > result with annotations as I am writing this... > > First off, are you using a plugin to provide the annotatio

Re: json-plugin and Annotations (OR, implementations of Result that DO not inherit from StrutsResultSupport)

2008-10-11 Thread Wes Wannemacher
It's funny that you happened to ask this tonight, I am working on a JSON result with annotations as I am writing this... First off, are you using a plugin to provide the annotations? If so, which one. I am using struts-2.1.3-snapshot (which might make a difference) in conjunction with the conventi

Re: JSON Plugin - excludeProperties Issues

2008-05-08 Thread Musachy Barroso
OTECTED] > Sent: Thursday, May 08, 2008 4:11 PM > To: Struts Users Mailing List > Subject: RE: JSON Plugin - excludeProperties Issues > > I thought that might be the case and tried to reference them that way > (i.e. categoryChildren.createdTs). However, that did not seem to w

RE: JSON Plugin - excludeProperties Issues

2008-05-08 Thread Hoying, Ken
there a release date for update? That would be nice. -Original Message- From: Hoying, Ken [mailto:[EMAIL PROTECTED] Sent: Thursday, May 08, 2008 4:11 PM To: Struts Users Mailing List Subject: RE: JSON Plugin - excludeProperties Issues I thought that might be the case and tried to reference

RE: JSON Plugin - excludeProperties Issues

2008-05-08 Thread Hoying, Ken
Subject: Re: JSON Plugin - excludeProperties Issues The exclude properties are relative to the action, not the root. musachy On Thu, May 8, 2008 at 4:01 PM, Hoying, Ken <[EMAIL PROTECTED]> wrote: > I am trying to specify properties for the JSON plugin to ignore. > However, this does no

Re: JSON Plugin - excludeProperties Issues

2008-05-08 Thread Musachy Barroso
The exclude properties are relative to the action, not the root. musachy On Thu, May 8, 2008 at 4:01 PM, Hoying, Ken <[EMAIL PROTECTED]> wrote: > I am trying to specify properties for the JSON plugin to ignore. > However, this does not seem to be working. Am I specfiying something > incorrectly?

RE: JSON plugin

2008-03-13 Thread Stanley, Eric
PM To: Stanley, Eric Cc: Struts Users Mailing List Subject: Re: JSON plugin Eric- it appears that its up to your action to return proper JSON formatted results here is the doc Autocompleter input format The text to be returned from your action must be a list in JSON (Javascript Object Notation

RE: JSON plugin

2008-03-13 Thread Stanley, Eric
ginal Message- From: Musachy Barroso [mailto:[EMAIL PROTECTED] Sent: Thursday, March 13, 2008 2:36 PM To: Struts Users Mailing List Subject: Re: JSON plugin you don't have a "projectList" field in the response, only an array of objects. If you do: responseObject[0].name it w

RE: JSON plugin

2008-03-13 Thread Stanley, Eric
List Subject: Re: JSON plugin you don't have a "projectList" field in the response, only an array of objects. If you do: responseObject[0].name it will return "Alarming page". musachy On Thu, Mar 13, 2008 at 4:30 PM, Stanley, Eric <[EMAIL PROTECTED]> wrote: > I

Re: JSON plugin

2008-03-13 Thread Musachy Barroso
you don't have a "projectList" field in the response, only an array of objects. If you do: responseObject[0].name it will return "Alarming page". musachy On Thu, Mar 13, 2008 at 4:30 PM, Stanley, Eric <[EMAIL PROTECTED]> wrote: > I am trying to use dojo and the JSON plugin, but I have hit a sna