Hi Dave, GWT supports code generation at compile time. This allows you to instantiate classes by name (string) at compile time. Have a look at http://programmatica.blogspot.com/2007/10/classfornamefullyqualifiedclassnamenewi.html
This blog entry has some gaps in source code. If you need a complete working source code example, you can contact me. Kind regards, Christoph On Aug 24, 4:39 pm, kilaru <[email protected]> wrote: > hi Dave, > > I have the same problem. i need to show content on the center position > of the panel, when user clicks on tree node displayed in left side. > > I have seen the code of GWT-Ext showcase example and trying to > implemented this. I have stored information in the > > database along with full classname. > > but problem is i am unable to instantiate that class in the client > side. whose name is stored as string. > > if we solve this. i can send you the code > > Thanks and Regards, > > kilaru > > On Aug 24, 3:23 pm, Dave <[email protected]> wrote: > > > Cheers Nathan, > > > That's a useful response. I didn't feel happy trying to send the UI > > classes across RPC, for the reasons you stated. I'm still looking at > > ways, where I will let developers 'produce' plugins that consist of a > > back and frontend. So the frontend widget/java script can easily be > > loaded, although I like your HTML suggestion. > > > On Aug 22, 9:06 pm, Nathan Wells <[email protected]> wrote: > > > > Dave, > > > > the first thing need to know is that you're attempting to break some > > > core rules. Widgets can only be created on the client-side. There are > > > numerous reasons for this, but essentially it boils down to this: RPC > > > calls should be about the model... data transfer, not UI component > > > transfer. That's not to say that what you're talking about is > > > impossible, it's just not going to be as pretty as you would like it > > > to be. You can make it so that your TreeItem contains an "HTML" > > > widget. Then you would probably provide some hook on the server-side > > > for someone to specify what that html is. > > > > Again, this breaks the rules, though > > > > On Aug 21, 4:56 am, Dave <[email protected]> wrote: > > > > > Hi, > > > > > I am trying to figure out how to create a pluginframeworkwith GWT, > > > > let me explain.... > > > > > I have created an application that has a menu on the left side and a > > > > form on the right site of the screen. The menu is a tree and the form > > > > is a vertical panel (think of the example mail application). > > > > > I have created a new class called CustomTreeItem that extends > > > > TreeItem. > > > > My custom class contains a member variable which is a vertical panel. > > > > When a user click on a instance of CustomTreeItem in the menu the > > > > vertical panel is displayed on the right site of the screen. > > > > > I would like to extend this by allowing developers to produce custom > > > > forms. i.e allow developers to add in there own CustomTreeItems, > > > > without having to recompile with my code. > > > > My inital plan was to have a directory in the classpath, so at runtime > > > > a class loader on the server side would look for any classes that were > > > > derived from my CustomTreeItem in that folder and load them. > > > > The client would make an RPC request for the tree items, so it could > > > > build up the Tree. I quickly discovered that VerticalPanel couldn't > > > > be serialized (I assume because this is translated to javascript), so > > > > this wouldn't work. > > > > > Is it possible for developers to create a vertical panel, and then > > > > translate it to js (storing it somewhere on the server) > > > > Then within my application if I know the name of the js/verticalpanel > > > > instance, load in and construct the panel? > > > > > Any info/ideas/suggestions would be appreciated > > > > > Cheers- Hide quoted text - > > > - Show quoted text - > > --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
