Re: Passing PHP variables to my GWT application

2010-06-28 Thread barbe...@muohio.edu
Alright, so I have attempted to learn this JSON business, and have run into some issues. I followed the tutorial at: http://code.google.com/webtoolkit/doc/latest/tutorial/JSON.html Once I thought I understood it, I began to implement it within my project. However, I cannot successfully retrieve

Re: Passing PHP variables to my GWT application

2010-06-28 Thread Jeff Chimene
On 06/28/2010 12:12 PM, barbe...@muohio.edu wrote: Alright, so I have attempted to learn this JSON business, and have run into some issues. I followed the tutorial at: http://code.google.com/webtoolkit/doc/latest/tutorial/JSON.html Once I thought I understood it, I began to implement it

Re: Passing PHP variables to my GWT application

2010-06-26 Thread bluedes
I've developed applications with PHP throwing out the html pages to the client. But I've been trying out the GWT-PHP/JSON combination, and it's a whole lot faster in my experience. The client just calls a single GWT application, and everything within are just async callbacks to a PHP page that

Re: Passing PHP variables to my GWT application

2010-06-26 Thread Shedokan
You can try to put al your addTreeItems calls inside a function like onModuleLoad and then once you declare the addTreeItems function in your GWT function call it and all the addTreeItems calls will be called after your module loads. On 25 יוני, 04:25, barbe...@muohio.edu barbe...@muohio.edu

Re: Passing PHP variables to my GWT application

2010-06-25 Thread Ben Harris
I'm not all that familiar with javascript, but can you wrap your addTreeItems call in a javascript function? Then call that function from GWT after you have installed addTreeItems? Pausing the PHP won't help, because the PHP is being executed on the server. -- You received this message because

Re: Passing PHP variables to my GWT application

2010-06-25 Thread Ben Harris
That is a better solution, but they might not want the extra round trip time of requesting the data after the page has been sent down the wire. On Jun 25, 5:04 pm, Chris Boertien chris.boert...@gmail.com wrote: You might want to take a look at

Re: Passing PHP variables to my GWT application

2010-06-25 Thread Jaroslav Záruba
If another request is not an issue I'd prefer GWT-RPC. I'd be surprised if there was no PHP port. On Fri, Jun 25, 2010 at 11:09 AM, Ben Harris bharri...@gmail.com wrote: That is a better solution, but they might not want the extra round trip time of requesting the data after the page has been

Re: Passing PHP variables to my GWT application

2010-06-25 Thread Blessed Geek
Thanks to Sripathi a couple of months ago for letting me that there is a Dictionary class in GWT, which is used to access javascript objects in the hosting file. com.google.gwt.i18n.client.Dictionary. Therefore, for data that is dynamic per session startup but need not be dynamic while the page

Passing PHP variables to my GWT application

2010-06-24 Thread barbe...@muohio.edu
Hi everyone, I am faced with a situation in which I must pass variables read in from a database table using PHP to my GWT application. I am doing this by using PHP to read in the data(which are Strings), and then calling a JSNI function from my GWT application like so: $result =

Re: Passing PHP variables to my GWT application

2010-06-24 Thread Jaroslav Záruba
It seems that your script/ might get evaluated/executed before the module has finished loading and therefore your function window.addTreeItem might not exist yet. Several workarounds for that are possible I think. On Thu, Jun 24, 2010 at 9:39 PM, barbe...@muohio.edu barbe...@muohio.eduwrote: Hi

Re: Passing PHP variables to my GWT application

2010-06-24 Thread barbe...@muohio.edu
Thanks, that makes sense. However, do you have any suggestions on how I might work around it? I want to be able to load all of the data on startup, so I have called the PHP function that calls the javascript function in the body of the .php file. I tried to throw in a PHP sleep to delay the

Re: Passing PHP variables to my GWT application

2010-06-24 Thread Jaroslav Záruba
I believe the module loads on document's load event, therefore pausing PHP does not help indeed. You can load the JSON using JsonpRequestBuilder. That means another (XHR)request to server. If that's an issue I'd try to output the JSON using PHP as you do now, but not into script/ element. I would