Wednesday, October 2, 2013

Client code depends on http://www.google.com/jsapi?callback=__gwt_AjaxLoader_onLoad

Hi all,

I have a GWT application that I'm trying to deploy in an environment where we have no internet connection. The application uses the gwt charts and it is unable to draw the charts unless internet connection is available, as it tries to fetch the following:

http://www.google.com/jsapi?callback=__gwt_AjaxLoader_onLoad

Is there any way to make this not depended on an Internet connection?

Thanks!

--
You received this message because you are subscribed to the Google Groups "Google Web Toolkit" group.
To unsubscribe from this group and stop receiving emails from it, send an email to google-web-toolkit+unsubscribe@googlegroups.com.
To post to this group, send email to google-web-toolkit@googlegroups.com.
Visit this group at http://groups.google.com/group/google-web-toolkit.
For more options, visit https://groups.google.com/groups/opt_out.

Tuesday, October 1, 2013

Re: get IP address

Hilco Wijbenga <hilco.wijbenga@...> writes:

>
> On 6 February 2012 14:25, IHateSoda <mguillaume21@...> wrote:
> > I'm trying to get my IP address (192.168......) but I always get the
> > localhost IP (127.0.0.1).
>
> You are presumably running your appserver (Tomcat, Jetty, ...) as
> localhost. If you want the servlet to return something else then do
> not run as localhost.
>


I think this is what you're looking for...

HttpServletRequest request = perThreadRequest.get();
String ipAddress = request.getRemoteAddr()

-Greg

--
You received this message because you are subscribed to the Google Groups "Google Web Toolkit" group.
To unsubscribe from this group and stop receiving emails from it, send an email to google-web-toolkit+unsubscribe@googlegroups.com.
To post to this group, send email to google-web-toolkit@googlegroups.com.
Visit this group at http://groups.google.com/group/google-web-toolkit.
For more options, visit https://groups.google.com/groups/opt_out.

Problem with GWT+Hibernate

hi folks,, 
i have a problem with integration of gwt & hibernate,,, 
when i use RPC without Hibernate & dataObj Movement over the network..it's work(for Object Like Inreger,String),, 
but when i add the hibernate to the project & want to move a myOwn Class Object over the net to the server for Saving it to the DB,,it's make a error,, 
this is my Error: 

ERROR: Unable to find type 'com.mySampleApplication.client.MySampleApplication' 
ERROR: Hint: Previous compiler errors may have made this type unavailable 
ERROR: Hint: Check the inheritance chain from your module; it may not be inheriting a required module or a module may not be adding its source path entries properly 
ERROR: Failed to load module 'MySampleApplication' from user agent 'Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Ubuntu Chromium/28.0.1500.71 Chrome/28.0.1500.71 Safari/537.36' at localhost:49745
 

this is Structure of My Project,,: 

https://www.dropbox.com/s/tgcpz8luyivcgxt/gwt%2Bhibernate.png 

this is my gwt Configuration File: 

  1. <!DOCTYPE module PUBLIC "-//Google Inc.//DTD Google Web Toolkit 2.0//EN"  
  2.         "http://google-web-toolkit.googlecode.com/svn/releases/2.0/distro-source/core/src/gwt-module.dtd">  
  3. <module rename-to="MySampleApplication">  
  4.   
  5.     <!-- Inherit the core Web Toolkit stuff.                  -->  
  6.     <inherits name='com.google.gwt.user.User'/>  
  7.   
  8.     <!-- Specify the app entry point class.                   -->  
  9.     <entry-point class='com.mySampleApplication.client.MySampleApplication'/>  
  10.   
  11.     <source path="com.mySampleApplication.client"/>  
  12.   
  13.     <!-- Specify the app servlets.                   -->  
  14.     <servlet path='/MySampleApplicationService' class='com.mySampleApplication.server.MySampleApplicationServiceImpl'/>  
  15.   
  16. </module>  

I have Entity CLass With name Student : 
  1. @Entity  
  2. @Table(name="STUDENT")  
  3. public class Student implements Serializable{  
  4.   
  5.     @Id  
  6.     @GeneratedValue  
  7.     Integer id;  
  8.     @Column  
  9.     String name;  
  10.     @Column  
  11.     String family;  
  12. //setter & getter  
  13. //constructor with 2 Argument,,& no Argument  
  14. } 
i Have Student Manager: 
  1. public class StudentManage{  
  2. private static SessionFactory factory;  
  3.     public StudentManage()  
  4.     {  
  5.         try{  
  6.   
  7.             factory = new AnnotationConfiguration().  
  8.                     addAnnotatedClass(Student.class).  
  9.                     configure("hibernate.cfg.gwt.xml").buildSessionFactory();  
  10.   
  11.         }catch (Throwable ex) {  
  12.             System.err.println("Failed to create sessionFactory object." + ex);  
  13.             throw new ExceptionInInitializerError(ex);  
  14.         }  
  15.     }  
  16.   
  17.     public void save(Student stu)throws Exception  
  18.     {  
  19.         Session session = factory.openSession();  
  20.         Transaction tx=session.beginTransaction();  
  21.         session.saveOrUpdate(stu);  
  22.         tx.commit();  
  23.         session.close();  
  24.     }  
  25. }  
this is implementation of My Service in the Server : 
  1. public class MySampleApplicationServiceImpl extends RemoteServiceServlet implements MySampleApplicationService {  
  2. @Override  
  3.     public String setStu(Student stu) {  
  4.   
  5.         //System.out.println("In the set");  
  6.         StudentManage studentManage=new StudentManage();  
  7.   
  8.         try {  
  9.             studentManage.save(stu);  
  10.         } catch (Exception e) {  
  11.             e.printStackTrace();  //To change body of catch statement use File | Settings | File Templates.  
  12.         }  
  13.         return "Data Saved in DB";  
  14.     }  
  15. }  

And this is my own Code for the Client Side to send the Object to the Server,, 
  1. public void onModuleLoad() {  
  2. button.addClickHandler(new ClickHandler() {  
  3.             @Override  
  4.             public void onClick(ClickEvent event) {  
  5.                 System.out.println("int the ClickEvent");  
  6.                 MySampleApplicationService.App.getInstance().setStu(stu, new AsyncCallback<String>() {  
  7.   
  8.                     @Override  
  9.                     public void onFailure(Throwable caught) {  
  10.                         Window.alert("Error");  
  11.   
  12.                     }  
  13.   
  14.                     @Override  
  15.                     public void onSuccess(String result) {  
  16.                         Window.alert("Data is in the DB..." + result);  
  17.                     }  
  18.                 });  
  19.             }  
  20.         });  
  21. }  

i'm wating for your Solutions,,

--
You received this message because you are subscribed to the Google Groups "Google Web Toolkit" group.
To unsubscribe from this group and stop receiving emails from it, send an email to google-web-toolkit+unsubscribe@googlegroups.com.
To post to this group, send email to google-web-toolkit@googlegroups.com.
Visit this group at http://groups.google.com/group/google-web-toolkit.
For more options, visit https://groups.google.com/groups/opt_out.

Re: Client Logging Question

Jens,

Thanks for the info. i knew I was missing something simple.

Tim

On Sep 27, 2013, at 4:04 PM, Jens <jens.nehlmeier@gmail.com> wrote:

> The logging example comes with the GWT
> SDK: https://gwt.googlesource.com/gwt/+/master/samples/
> If you use Eclipse and the GWT update site the SDK should be installed in
> eclipse/plugins/com.google.gwt.eclipse.sdkbundle_2.5.1/gwt-2.5.1
>
> If you want runtime log settings you must keep logging enabled with a
> reasonable default log level while compiling your app. If needed you can
> log more details by setting the root logger's log level through a URL
> parameter, e.g. "&logLevel=FINE"
>
> Honestly I have no idea if you can set the log level per logger or only for
> the root logger. Something like logging.properties isn't possible as
> everything gets compiled to JS and I guess you don't want the browser to
> download such a runtime configuration file every now and then because you
> could have updated that file.
>
> -- J.
>
> --
> You received this message because you are subscribed to the Google Groups "Google Web Toolkit" group.
> To unsubscribe from this group and stop receiving emails from it, send an email to google-web-toolkit+unsubscribe@googlegroups.com.
> To post to this group, send email to google-web-toolkit@googlegroups.com.
> Visit this group at http://groups.google.com/group/google-web-toolkit.
> For more options, visit https://groups.google.com/groups/opt_out.

--
You received this message because you are subscribed to the Google Groups "Google Web Toolkit" group.
To unsubscribe from this group and stop receiving emails from it, send an email to google-web-toolkit+unsubscribe@googlegroups.com.
To post to this group, send email to google-web-toolkit@googlegroups.com.
Visit this group at http://groups.google.com/group/google-web-toolkit.
For more options, visit https://groups.google.com/groups/opt_out.

Re: Best way to Emulate Mobile Tabs using GWT

Thanks for the quick reply.  Without getting into any details, I am trying to not use mgwt.   But, with that said, I did check out the source which was helpful.  I think I am going to use a TabBar and DeckPanel combination since the native GWT TabPanel does not seem to support positioning the TabBar.

On Sep 29, 2013, at 10:12 AM, Paul <paul.french@kirona.com> wrote:

take a look at how mgwt does it in it's showcase app http://mobilegwt.appspot.com/showcase/

It will a combination of using the css3 flex box model and such to achieve the desired layout

On Friday, September 27, 2013 8:52:25 PM UTC+1, Paul Mazzuca wrote:
Many mobile applications have "Tabs" or buttons on the bottom of the View to move from different areas of the application.  Can this be emulated in pure GWT, and if so how would you recommend it?  My initial thought was to use a DockLayoutPanel with the "south" region containing a grid of buttons.  This kinda works, however I then began to think that what I really want is a TabLayoutPanel with the tabs on the bottom, stretched to the width.  Is this even possible in GWT?  After a cursory effort, I am unable to position the tabs on the bottom of the view relative to the tab page, and I am unable to modify the width of the tabs relative to the view.   I tried playing with the gwt-TabLayoutPanel css with no luck.   My other thought is that I need to go lower and use the TabBar and figure out the tab container separately, however I would rather just use the TabLayoutPanel.  Any suggestions would be much appreciated.

--
You received this message because you are subscribed to a topic in the Google Groups "Google Web Toolkit" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/google-web-toolkit/Q_PnuA7UMr4/unsubscribe.
To unsubscribe from this group and all its topics, send an email to google-web-toolkit+unsubscribe@googlegroups.com.
To post to this group, send email to google-web-toolkit@googlegroups.com.
Visit this group at http://groups.google.com/group/google-web-toolkit.
For more options, visit https://groups.google.com/groups/opt_out.

Re: Developer plugin for Firefox 23 doesn't work

I have and that doesn't work. It's a pretty persistent error. Cannot test my GWT at this point.

--
You received this message because you are subscribed to the Google Groups "Google Web Toolkit" group.
To unsubscribe from this group and stop receiving emails from it, send an email to google-web-toolkit+unsubscribe@googlegroups.com.
To post to this group, send email to google-web-toolkit@googlegroups.com.
Visit this group at http://groups.google.com/group/google-web-toolkit.
For more options, visit https://groups.google.com/groups/opt_out.

Re: Generated class only appearing in one permutation

Many thanks :) This is a very helpful answer.

--
You received this message because you are subscribed to the Google Groups "Google Web Toolkit" group.
To unsubscribe from this group and stop receiving emails from it, send an email to google-web-toolkit+unsubscribe@googlegroups.com.
To post to this group, send email to google-web-toolkit@googlegroups.com.
Visit this group at http://groups.google.com/group/google-web-toolkit.
For more options, visit https://groups.google.com/groups/opt_out.