Sorry Arul, this is ambiguous: path statement to the source packages (and their child packages)
what I mean is that all sub-packages of a package specified in a path statement are automatically included. On Dec 29, 5:00 pm, gregor <[email protected]> wrote: > Hi Arul, > > Yes, the reason your client side GWT code cannot see your shared bean > class is because it does not live within the compilation scope (i.e. > underneath) your GWT module *.gwt.xm file. > > The solution is as follows: > > 1) leave your bean class where it is in your server side code > > 2) create a new GWT module file in a convenient location somewhere > above the shared bean .java file in your server side source structure, > say MyModuleSharedBeans.gwt.xml. In this file you simply specify a > path statement to the source packages (and their child packages) to > include (NB: the path is relative to the location of this new module > file), for example (and no more than this is needed): > > module> > <inherits name='com.google.gwt.user.User'/> > <source path="path.to.my.beans"/> > // you can have more than one path statement,,,, > </module> > > 3) include this module in your main application *.gwt.xl, e.g: > > module> > ..... > <inherits name='path.to.MyModuleSharedBeans'/> > ..... > </module> > > As long as you get the paths right in these two entries, you should be > good to go. The only thing to remember is that all java classes in the > specified packages must be compatible with GWT JRE Emulation. This > means that sometimes you have to artificially create a separate > package for beans you want to use both client and server side which > can be a bit of a nuisance since you might not be able to put your > shared beans in the most logical package. A simple trick is to add an > extra package, say "shared", directly under the logical package you > would have put the bean in normally and have > MyModuleSharedBeans.gwt.xml point directly to that so as to by-pass > the non-GWT friendly classes in the "real" package. > > regards > gregor > > On Dec 29, 3:53 pm, Arul <[email protected]> wrote: > > > Hi, > > Would you please clarify below questions. > > 1) Is the package struct client must be followed using > > applicationCreator? if no, will you please tell me how can use > > applicationCreator without package client be created. > > > 2)I understant applicationCreator is tool for helping to develop > > project quickly. > > Is possible to develop the package struture ( GWT application) without > > using this tool? if yes how can specifiy client to gwt. > > and generate the nochahe.js file etc. > > > 3) There is no problem in server side code, it is not forcing to > > create under server folder. because deployment decriptor helps loading > > the server side code. > > What I am coming here is, Is there similar approach for client side > > code?. Right now if i did not put any java file which is referred by > > EntryPoint class under client package then it is treating as module > > and fails to load. > > > Thanks Arul --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
