Oops! Sorry for the double reply. I thought the first one hadn't gone through.
I think I've found what the problem is with what I was doing..it seems GWT isn't designed to be added dynamically to a page after the fact. A blog post here alludes to the problem: http://www.pathf.com/blogs/2007/08/bjax-a-quick-ha/ The fix there worked with GWT 1.4, but I've hacked through my own nocache.hs to make similar changes, and now it appears to be loaded properly to my pages 'after the fact', after onLoad's already fired etc. I do wonder if this is 'safe' though? Does GWT make other assumptions that would make it dangerous to dynamically add it to a page after the initial page load, or am I OK? Cheers, On May 27, 9:39 pm, peterk <[email protected]> wrote: > Hey Ian, > > Thanks very much for your reply. > > I don't absolutely need the widget-y stuff, no.. > > I gave this a quick bash to see if I could get something working > quickly. I have a simple GWT app that should add a button to the end > of the page it loads in. It works OK in a test page on my machine, > loading the .js file from a remote server (I have compiled it for > cross site access). > > However when I get a firefox extension to embed the script in a page > on page load, it seems to lock up the page.. it'll load the right page > initially, but then it 'redirects', almost, to a blank page and loads > i perpetually. Not sure if there's a quick and easy answer to that > question, maybe there's more configuration that needs doing in order > to allow a gwt app to be dynamically added to an arbitrary page (?) > > On May 27, 9:17 pm, Ian Petersen <[email protected]> wrote: > > > I think it depends on what you're doing when you "modify the page". > > As of GWT 1.5 (the last version I've used personally), it's difficult > > to construct a Widget around an existing DOM element. On the other > > hand, if you don't need GWT's Widget API, then GWT is exactly what you > > need. > > > Some people are confused by GWT's offering, but it's really important > > to remember that it's a very modular tool. The only thing you need to > > have in order to say you're "using GWT" is the GWT compiler. The > > download also includes various modules for doing things in a web page, > > though, that make your life easier. At the very bottom is the DOM API > > that mirrors the browser's DOM API into Java. There's also a module > > for doing AJAXy stuff, and an RPC-over-HTTP module that's built on top > > of that. If it suits you, you can use the Widget API, but it's not > > necessary. > > > Ian --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Google Web Toolkit" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/Google-Web-Toolkit?hl=en -~----------~----~----~----~------~----~------~--~---
