ERRest - problem outputting xml as JSON object

2011-07-15 Thread Elizabeth Lynch
I am building an ERRest application (read only), and am having a problem with one field. This field holds an xml string, which I need to embed into the output from show and index actions; it will be consumed as json (mainly; possibly only). For example, I would like to receive: {name : A

Re: ERRest - problem outputting xml as JSON object

2011-07-15 Thread Pascal Robert
I think the best way would be to transform the XML to a Java object and transform that object back to JSON. I am building an ERRest application (read only), and am having a problem with one field. This field holds an xml string, which I need to embed into the output from show and index

Re: ERRest - problem outputting xml as JSON object

2011-07-15 Thread Elizabeth Lynch
Hi Pascal Sorry, I didn't explain the problem clearly. I am doing that already. The problem is that it comes as a string in my JSON output, not as an object. Liz Sent from my iPhone On 15 Jul 2011, at 12:39, Pascal Robert prob...@macti.ca wrote: I think the best way would be to transform

Re: ERRest - problem outputting xml as JSON object

2011-07-15 Thread Maik Musall
Hi Liz, already tried org.json.XML? That's what I use for similar tasks. http://www.JSON.org/java/index.html Maik Am 15.07.2011 um 14:58 schrieb Elizabeth Lynch: Hi Pascal Sorry, I didn't explain the problem clearly. I am doing that already. The problem is that it comes as a string in

Re: You backtracked too far error after closing AjaxModalDialog and clicking on a link on the page

2011-07-15 Thread Ricardo J. Parada
It seems other people have ran into this same problem. It would be great if we can figure out what's going on. So far I just know how to reproduce in 5 easy steps which is very important. But I still don't understand why it happens. :-/ On Jul 15, 2011, at 10:11 AM, Ricardo J. Parada

Re: ERRest - problem outputting xml as JSON object

2011-07-15 Thread Farrukh Ijaz
Hi Liz, That's a common issue. Suppose you receive the JSON mentioned below, once you get the value of data attribute which is a JSON object in string format, evaluate it using eval() method of javascript and it will be converted to JSON. Farrukh Sent from my iPad 2 On 2011-07-15, at 3:58

properties files

2011-07-15 Thread Michael Gargano
I'm assuming the ERXProperties still doesn't allow you to reference other properties in your properties, does it? Thanks. -Mike ___ Do not post admin requests to the list. They will be ignored. Webobjects-dev mailing list

Re: properties files

2011-07-15 Thread Michael Gargano
I thought I recalled something about the properties files getting reprocessed like 3 times over, but I couldn't find any documentation on it. I'll check the vids, thanks. -Mike On Jul 15, 2011, at 11:09 AM, John Huss wrote: It does. There is a WOWODC video about it from last year. It boggles

Re: properties files

2011-07-15 Thread Paul D Yu
I think it was one of Kieran's video. My minds was blown by it. But I did get the Properties in the /etc/WebObjects/InstanceName/ rule. Paul On Jul 15, 2011, at 11:13 AM, Michael Gargano wrote: I thought I recalled something about the properties files getting reprocessed like 3 times over,

Re: ERRest - problem outputting xml as JSON object

2011-07-15 Thread Elizabeth Lynch
Hi Farrukh Thanks: that's a good suggestion, but I need to get it into JSON before it leaves the server, so that technique won't work for me. Liz On 15 Jul 2011, at 15:55, Farrukh Ijaz wrote: Hi Liz, That's a common issue. Suppose you receive the JSON mentioned below, once you get the

Re: ERRest - problem outputting xml as JSON object

2011-07-15 Thread Farrukh Ijaz
I think you can define an additional getter method over data as dataDictionary() which should return the data xml as NSDictionary. This will solve the problem for both XML and JSON. Farrukh On 2011-07-15, at 7:24 PM, Elizabeth Lynch wrote: Hi Farrukh Thanks: that's a good suggestion, but

Re: properties files

2011-07-15 Thread Michael Gargano
and @@propertyName@@ FTW :) -Mike On Jul 15, 2011, at 12:02 PM, Paul D Yu wrote: I think it was one of Kieran's video. My minds was blown by it. But I did get the Properties in the /etc/WebObjects/InstanceName/ rule. Paul On Jul 15, 2011, at 11:13 AM, Michael Gargano wrote: I thought I

Re: properties files

2011-07-15 Thread Pascal Robert
Le 2011-07-15 à 12:02, Paul D Yu a écrit : I think it was one of Kieran's video. My minds was blown by it. But I did get the Properties in the /etc/WebObjects/InstanceName/ rule. It's in that one: http://www.wocommunity.org/podcasts/wowodc/2010/GettingStartedWithWonder.mov Paul On

Re: ERRest - problem outputting xml as JSON object

2011-07-15 Thread Elizabeth Lynch
Hi I think you can define an additional getter method over data as dataDictionary() which should return the data xml as NSDictionary. This will solve the problem for both XML and JSON. Unfortunately that isn't working for me. Here's some more information I've discovered about the ERREST

Re: ERRest - problem outputting xml as JSON object

2011-07-15 Thread Mike Schrag
That should work. What key filter are you using? Are you not allowing keys in from the nested dictionary? On Jul 15, 2011, at 1:43 PM, Elizabeth Lynch wrote: Hi I think you can define an additional getter method over data as dataDictionary() which should return the data xml as

Re: You backtracked too far error after closing AjaxModalDialog and clicking on a link on the page

2011-07-15 Thread Chuck Hill
I will try it later. On 2011-07-15, at 7:11 AM, Ricardo J. Parada wrote: I have some good news. I have a little test app with a simple Main component that reproduces the problem in 5 easy steps. Who is interested in trying it out? :-) You just import into Eclipse and follow the 5

Re: You backtracked too far error after closing AjaxModalDialog and clicking on a link on the page

2011-07-15 Thread Ricardo J. Parada
Try the second one I sent out... That one is simpler and easier to understand. Thanks On Jul 15, 2011, at 1:52 PM, Chuck Hill wrote: I will try it later. On 2011-07-15, at 7:11 AM, Ricardo J. Parada wrote: I have some good news. I have a little test app with a simple Main

databaseContextNewPrimaryKey from a jar?

2011-07-15 Thread Calven Eggert
I've created a runnable jar using WO to create records in a database. In my WO Web App I have overridden databaseContextNewPrimaryKey to create my own primary key. Can this be done from the jar too? ___ Do not post admin requests to the list.

Re: databaseContextNewPrimaryKey from a jar?

2011-07-15 Thread Chuck Hill
Yes, you should be able to do that. On 2011-07-15, at 11:24 AM, Calven Eggert wrote: I've created a runnable jar using WO to create records in a database. In my WO Web App I have overridden databaseContextNewPrimaryKey to create my own primary key. Can this be done from the jar too?

Re: databaseContextNewPrimaryKey from a jar?

2011-07-15 Thread Calven Eggert
ok. I created a databaseContextNewPrimaryKey method. it never gets called. Something is not connected... Do I need to connect the EOEditingContext with the EODatabaseContext? On 2011-07-15, at 2:28 PM, Chuck Hill wrote: Yes, you should be able to do that. On 2011-07-15, at 11:24 AM,

Re: databaseContextNewPrimaryKey from a jar?

2011-07-15 Thread Chuck Hill
Not... sure what you are doing. That is a DBC context method, so you need to set up the database context's delegate. That is probably something that happens automagically in a wonder app. Chuck On 2011-07-15, at 11:46 AM, Calven Eggert wrote: ok. I created a databaseContextNewPrimaryKey

Re: ERRest - problem outputting xml as JSON object

2011-07-15 Thread Elizabeth Lynch
Hi That should work. What key filter are you using? Are you not allowing keys in from the nested dictionary? Here is my implementation of data for testing (from Category.java): public NSDictionary data() { return new NSDictionary(key, stringValue); } and my

Re: ERRest - problem outputting xml as JSON object

2011-07-15 Thread Farrukh Ijaz
Use ERXKeyFilter.filterWithAll() or ERXKeyFilter.filterWithAllRecrusive() Farrukh On 2011-07-15, at 11:12 PM, Elizabeth Lynch wrote: Hi That should work. What key filter are you using? Are you not allowing keys in from the nested dictionary? Here is my implementation of data for

multiple instance question, and more

2011-07-15 Thread Andrew Kinnie
Greetings, I have 2 issues, the first of which I had before WOWODC, and the second burst into the open yesterday. I have an app, an ERRest app, acting as a push notification server, although thus far now push notifications have gone out to the public, it works for testing. The app is

Re: ERRest - problem outputting xml as JSON object

2011-07-15 Thread Farrukh Ijaz
Below is a the running sample with filterWithAttributes and filterWithAllRecursive() public WOActionResults testAction() throws Throwable { ERXKeyFilter filter = ERXKeyFilter.filterWithAttributes(); NSMutableDictionaryString, Object dict = new NSMutableDictionaryString,

Re: multiple instance question, and more

2011-07-15 Thread Pascal Robert
Le 2011-07-15 à 16:52, Andrew Kinnie a écrit : Greetings, I have 2 issues, the first of which I had before WOWODC, and the second burst into the open yesterday. I have an app, an ERRest app, acting as a push notification server, although thus far now push notifications have gone out

Re: multiple instance question, and more

2011-07-15 Thread Andrew Kinnie
True. The inefficient queries yesterday were returning 50,000 rows on what should have been simple queries, now they are not. On Jul 15, 2011, at 4:57 PM, Pascal Robert wrote: Le 2011-07-15 à 16:52, Andrew Kinnie a écrit : Greetings, I have 2 issues, the first of which I had before

Re: ERRest - problem outputting xml as JSON object

2011-07-15 Thread Elizabeth Lynch
Hi Farrukh filterWithAllRecursive works great. Thanks for the help everyone. Liz On 15 Jul 2011, at 21:37, Farrukh Ijaz wrote: Use ERXKeyFilter.filterWithAll() or ERXKeyFilter.filterWithAllRecrusive() Farrukh On 2011-07-15, at 11:12 PM, Elizabeth Lynch wrote: Hi That should work.

Re: multiple instance question, and more

2011-07-15 Thread Matteo Centro
Are MySQL tables InnoDB or MyISAM? You shouldn't have the PK problem with InnoDB... Also for the CPU issue, how many instances are you running What are the deployment variables? In any case, the Apple Push Notification server is unbelievably fast, if you send 50k notifications at the same time

Fwd: Let's find a new name for the Community

2011-07-15 Thread Daniel Beatty
Begin forwarded message: From: Daniel Beatty danielbea...@mac.com Date: July 15, 2011 9:12:30 PM PDT To: Theodore Petrosky tedp...@yahoo.com Cc: Daniel Beatty danielbea...@mac.com Subject: Re: Let's find a new name for the Community Greetings Theodore, I kind of agree with you. On