Problem with GWT 2.5.1 and Kindle paperwhite user agent

2013-10-29 Thread Eduardo José Cepas Quiñonero


Hi everyone,

I am using GWT 2.5.1 and I am accesing to a .war depolyed with Tomcat 
7.0.32, using the browser of a Kindle paperwhite model No. EY21.

The problem is that GWT cannot get the user-agent of the Kindle correctly, 
I mean, I get the following values:

   - 
   
   *From my server*: getMyThreadLocalRequest().getHeader(user-agent) -- 
   Mozilla/5.0 (X11; U; Linux armv7l like Android; en-us) AppleWebKit/531.2+ 
   (KHTML, like Gecko) Version/5.0 Safari/533.2+*Kindle/3.0+* -- ok!
   - 
   
   *From the web* www.whatsmyuseragent.com -- Mozilla/5.0 (X11; U; Linux 
   armv7l like Android; en-us) AppleWebKit/531.2+ (KHTML, like Gecko) 
   Version/5.0 Safari/533.2+ *Kindle/3.0+* -- ok !
   - 
   
   *From GWT 2.5.1 library*: Window.Navigator.getUserAgent() -- 
   Mozilla/5.0 (X11; ; U; Linux armv7l; en-us) AppleWebKit/534.26+ (KHTML, 
   like Gecko) Version/5.0 Safari/534.26+ -- ?¿?¿
   
So, I think that the GWT function is not getting the correct value for the 
user agent of the Kindle paperwhite browser...

Any idea??

Thanks a lot in advance!!

-- 
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+unsubscr...@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: NullPointerException on stockwatcher tutorial

2013-10-29 Thread Davide
Julio juliorod63@... writes:

 
 Hi,
 works for me. i insert the DIV tag into the html.
 
 Thanks.
 


Hi have the same problem..
In my html code i've div id=stockList/div

and the null point exception still showing.

How can i resolve it?

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+unsubscr...@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: Error using IMAGE/IO in a Servlet

2013-10-29 Thread Sean
Wow, 

Thank you Jens. I would have never figured that out in a million years! 
That was super subtle, but I learned a lot from it!

Thank you! Your suggestion worked perfectly!

-Sean

On Monday, October 28, 2013 4:17:13 PM UTC-4, Jens wrote:

 This kind of ClassCastException typically occurs if you have a ClassLoader 
 issue. If the same class is loaded by two different ClassLoader then Java 
 treats these two classes as different and its likely that you get the above 
 ClassCastException.

 First I would make sure that you have the imageIO.jar only once in your 
 class path and then you could check if you have a ClassLoader leak when you 
 redeploy your application. 

 A ClassLoader leak isn't that unlikely because the first call to ImageIO 
 pins the current ClassLoader. If that's the WebAppClassLoader that is 
 responsible for your app, the app server (jetty) can not garbage collect 
 your deployed app once you redeploy it because some Java system classes 
 will hold a reference to that WebAppClassLoader...well and this reference 
 will never go away unless you restart the server. 
 If you are in that situations then its likely that everything works the 
 first time you start Jetty and it will start to fail once you have 
 redeployed your app the first time. 

 To fix this situation you could try using a ServletContextListener and in 
 its contextInitialized() method you first change the class loader of the 
 current thread to the system class loader. Then you make a dummy call to 
 ImageIO and finally you set back the class loader to the original one.

 In our app we have to do that for multiple classes because libraries (and 
 Java) are sometimes written in a way thats not very compatible to 
 application server class loading.

 -- 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+unsubscr...@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: SVG image usage?

2013-10-29 Thread Philippe Lhoste

On 20/10/2013 19:04, Ed Bras wrote:

So I should just include them as background image directly in the css file?


I can be wrong, but I think SVG images cannot be used as CSS background images.
They have to be displayed as regular images, by specific widgets.

--
Philippe Lhoste
--  (near) Paris -- France
--  http://Phi.Lho.free.fr
--  --  --  --  --  --  --  --  --  --  --  --  --  --

--
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+unsubscr...@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: SVG image usage?

2013-10-29 Thread Ed Bras
Why?
According to this it's possible:
http://css-tricks.com/using-svg/
(I am doing it and works).

-- 
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+unsubscr...@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.


Slow down animation on DisclosurePanel?

2013-10-29 Thread darkflame
I simply wish to slow down the open/close animation on a DisclosurePanel.

Any ideas how to do this?

I see; 

private static final int ANIMATION_DURATION = 350;

in the class. But the class cant be extended for some reason, so is there 
alternatives/workarounds?

Thanks,
Thomas


-- 
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+unsubscr...@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: PopupPanel.center() not centering content?

2013-10-29 Thread Saad S
I too am experiencing this problem in my code, where I have a large 
hierarchy of panels contained within the PopupPanel or DecoratedPopupPanel. 
 A simple GWT Designer app with a label in the PopupPanel or 
DecoratedPopupPanel works as expected.

-- 
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+unsubscr...@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: PopupPanel.center() not centering content?

2013-10-29 Thread Ed Bras
I currently center it by adding the content, that needs to be centered to
a container div that has a style that will take care of the styling
(something like margin: auto; position:absolute; left:0; top:0; bottom:0;
right:0). Note: i don't use fixed as position such that I can move the
whole container div just under body, such that I can move the whole screen,
which I need if a left/right menu slides in (just like facebook menu).

-- 
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+unsubscr...@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.


JNI Problem

2013-10-29 Thread Sean
Hey guys, I read the documentation on JNI and I think what I'm doing is 
correct, but its not working. I'm trying to get values from JAVA into 
Javascript. 

Code Snippet:
[...]
/**
 * 
 * @return
 */
public String getColorScale()
{
int selIndex =m_colorBox.getSelectedIndex();
return m_colorBox.getItemText(selIndex);
}

/**
 * 
 * @return TMS URL for OSM cyclemap
 */
private static native JSObject getCIDBUrl(CIDBViewer p_valHolder) /*-{
function get_my_gwt_url(bounds) {
var res = this.map.getResolution();

var x = Math.round((bounds.left - this.maxExtent.left)
/ (res * this.tileSize.w));
var y = Math.round((this.maxExtent.top - bounds.top)
/ (res * this.tileSize.h));
var z = this.map.getZoom();
if(z12)
{
return http://127.0.0.1:/images/missing.png;;
}
var left = bounds.left;
var right = bounds.right;
var top = bounds.top;
var bottom = bounds.bottom;
//Call the JAVA side to get these values
var minVal = 0;
var maxVal = 10;
* var colorScale 
= p_valhold...@com.ll.cidb.client.CIDBViewer::getColorScale();*
url = http://127.0.0.1:/cidbviewer/map?res=; + res + z= + z
+ left= + left + right= + right + top= + top
+ bottom= + bottom
+cs=+ colorScale
+min=+minVal
+max=+maxVal;
return url;
}

return get_my_gwt_url;
}-*/;

[...]


So you can see I have a simple java method that gets the value out of a 
ListBox. I want to pass that value into the JavaScript function so I can 
send it to my server. However, when I get to the server the value of 
colorScale is:
[function () {  var result = __static(dispId, this);  if 
(result[0]) {throw result[1];  } else {return 
result[1];  }}]


I've tried this instead of passing the java instance. That didn't work 
either.

Any ideas?

-- 
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+unsubscr...@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: JNI Problem

2013-10-29 Thread David
You are missing an extra () it should read:
*var colorScale = p_valhold...@com.ll.cidb.client.CIDBViewer
::getColorScale()();*
*
*


On Tue, Oct 29, 2013 at 4:58 PM, Sean slough...@gmail.com wrote:

 Hey guys, I read the documentation on JNI and I think what I'm doing is
 correct, but its not working. I'm trying to get values from JAVA into
 Javascript.

 Code Snippet:
 [...]
 /**
  *
  * @return
  */
 public String getColorScale()
 {
 int selIndex =m_colorBox.getSelectedIndex();
  return m_colorBox.getItemText(selIndex);
 }

 /**
  *
  * @return TMS URL for OSM cyclemap
  */
 private static native JSObject getCIDBUrl(CIDBViewer p_valHolder) /*-{
  function get_my_gwt_url(bounds) {
 var res = this.map.getResolution();

 var x = Math.round((bounds.left - this.maxExtent.left)
  / (res * this.tileSize.w));
 var y = Math.round((this.maxExtent.top - bounds.top)
 / (res * this.tileSize.h));
  var z = this.map.getZoom();
 if(z12)
 {
 return http://127.0.0.1:/images/missing.png;;
  }
 var left = bounds.left;
 var right = bounds.right;
  var top = bounds.top;
 var bottom = bounds.bottom;
 //Call the JAVA side to get these values
  var minVal = 0;
 var maxVal = 10;
 * var colorScale = p_valhold...@com.ll.cidb.client.CIDBViewer
 ::getColorScale();*
  url = http://127.0.0.1:/cidbviewer/map?res=; + res + z= + z
  + left= + left + right= + right + top= + top
 + bottom= + bottom
  +cs=+ colorScale
 +min=+minVal
 +max=+maxVal;
  return url;
 }

 return get_my_gwt_url;
 }-*/;

 [...]


 So you can see I have a simple java method that gets the value out of a
 ListBox. I want to pass that value into the JavaScript function so I can
 send it to my server. However, when I get to the server the value of
 colorScale is:
 [function () {  var result = __static(dispId, this);  if
 (result[0]) {throw result[1];  } else {return
 result[1];  }}]


 I've tried this instead of passing the java instance. That didn't work
 either.

 Any ideas?

 --
 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+unsubscr...@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+unsubscr...@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: JNI Problem

2013-10-29 Thread Sean Loughran
Thanks David! That was the exactly it!


On Tue, Oct 29, 2013 at 12:07 PM, David david.no...@gmail.com wrote:

 You are missing an extra () it should read:
 *var colorScale = p_valhold...@com.ll.cidb.client.CIDBViewer
 ::getColorScale()();*
 *
 *


 On Tue, Oct 29, 2013 at 4:58 PM, Sean slough...@gmail.com wrote:

 Hey guys, I read the documentation on JNI and I think what I'm doing is
 correct, but its not working. I'm trying to get values from JAVA into
 Javascript.

 Code Snippet:
 [...]
 /**
  *
  * @return
  */
 public String getColorScale()
 {
 int selIndex =m_colorBox.getSelectedIndex();
  return m_colorBox.getItemText(selIndex);
 }

 /**
  *
  * @return TMS URL for OSM cyclemap
  */
 private static native JSObject getCIDBUrl(CIDBViewer p_valHolder) /*-{
  function get_my_gwt_url(bounds) {
 var res = this.map.getResolution();

 var x = Math.round((bounds.left - this.maxExtent.left)
  / (res * this.tileSize.w));
 var y = Math.round((this.maxExtent.top - bounds.top)
 / (res * this.tileSize.h));
  var z = this.map.getZoom();
 if(z12)
 {
 return http://127.0.0.1:/images/missing.png;;
  }
 var left = bounds.left;
 var right = bounds.right;
  var top = bounds.top;
 var bottom = bounds.bottom;
 //Call the JAVA side to get these values
  var minVal = 0;
 var maxVal = 10;
 * var colorScale = p_valhold...@com.ll.cidb.client.CIDBViewer
 ::getColorScale();*
  url = http://127.0.0.1:/cidbviewer/map?res=; + res + z= + z
  + left= + left + right= + right + top= + top
 + bottom= + bottom
  +cs=+ colorScale
 +min=+minVal
 +max=+maxVal;
  return url;
 }

 return get_my_gwt_url;
  }-*/;

 [...]


 So you can see I have a simple java method that gets the value out of a
 ListBox. I want to pass that value into the JavaScript function so I can
 send it to my server. However, when I get to the server the value of
 colorScale is:
 [function () {  var result = __static(dispId, this);  if
 (result[0]) {throw result[1];  } else {return
 result[1];  }}]


 I've tried this instead of passing the java instance. That didn't work
 either.

 Any ideas?

 --
 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+unsubscr...@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 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/gGocwnj1xAk/unsubscribe
 .
 To unsubscribe from this group and all its topics, send an email to
 google-web-toolkit+unsubscr...@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+unsubscr...@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: GWT Designer for NetBeans

2013-10-29 Thread Saad S
Ditto.

On Thursday, December 16, 2010 5:07:29 AM UTC-5, Kidowell wrote:

 Hey, is there any gwt designer for NetBeans out there?. 

 It would be nice to place all the design and receive automatically the 
 code for it. 

 I have read theres a plugin for Eclipse but I can't find anything for 
 NetBeans. 

 Any sugestion?. 

 Cheers. 

 Kido.

-- 
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+unsubscr...@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.


Mask for money values ?

2013-10-29 Thread Fernando Paiva
Hello all

I'm looking for some how to add money mask for a TextItem.
I need to setting my caret position right and each number that I enter the 
mask goes work.

example.
100,000.00

How to do this ?

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+unsubscr...@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: GWT - Send a message from the server to the client?

2013-10-29 Thread Andrea Boscolo
I'd use http://errai.github.io/ and its bus.

On Monday, October 28, 2013 10:01:27 PM UTC+1, Joshua Godi wrote:

 Good afternoon,

 I was curious how I would properly send a message from the server to the 
 client? Here is my scenario:

 Client A - Modifies User1 from the GUI and pushes the data to the server
 Client B - Is looking at User1 and needs to be notified that there are 
 changes that have been made

 So the server needs to send a message to all clients that the user has 
 changed.

 What is the best way to solve this?

 Thanks,
 Joshua


-- 
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+unsubscr...@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.


[gwt-contrib] Re: Thoughts on GWT 3.0 re: Java 8 and IE 8/9

2013-10-29 Thread Andrés Testi
Are other source languages than Java taken into account for GWT 3.0? Is 
Jribble considered? 

- Andrés Testi

El viernes, 25 de octubre de 2013 13:18:52 UTC-3, Thomas Broyer escribió:

 Forwarded from the GWT group, so it's not lost in the middle of support 
 questions.
 Link to the topic (there's some feedback there as well): 
 https://groups.google.com/d/topic/google-web-toolkit/Ll0W3Ui1CAI/discussion

 On Friday, October 25, 2013 4:50:38 PM UTC+2, Andy wrote:

 I just read through the notes from the GWT steering 
 committeehttps://groups.google.com/d/msg/gwt-steering/ldyo7OXUnHQ/ogtT-kPFoaoJand
  would like to share our perspective. I know you have a lot of survey 
 results and we're just 1 company, but here's some more info based on our 
 needs.

 *Java 8 only*

 I would encourage and support this move. I've been writing a ton of 
 Javascript for the past few weeks and really miss the functional style when 
 I come back to Java. Lambdas in Java 8 are going to be powerful and fun and 
 they should be used liberally throughout the GWT 3.0 APIs. We won't be able 
 to move our backend to Java 8 for a while, but since we only ship the JS 
 output of the GWT compiler, I'm happy to use Java 8 for front-end 
 development.

 *Dropping IE 8/9*
 *
 *
 We just decided on Tuesday to drop IE7 with our next release. We got 
 tired of working around hasLayout bugs, etc. We have several major 
 customers that still have users with XP/IE7, but after consulting with 
 them, we decided we could go ahead with dropping support. Unfortunately, 
 many of our customers are using IE8 and we won't be able to drop IE 8/9 
 anytime soon. As a developer this is extremely frustrating, but it's the 
 sad reality of the enterprise.

 So Java 8 would be awesome, but dropping support for IE 8/9 would prevent 
 us from being about to use GWT 3.0 until our enterprise customers upgrade 
 their browsers.



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


Re: [gwt-contrib] Re: Change in gwt[master]: Added disabled IE10 permutation

2013-10-29 Thread Brian Slesinsky
On Wed, Oct 23, 2013 at 11:59 AM, Jens jens.nehlme...@gmail.com wrote:

 Hmm. It's a fair point. On the other hand, you don't *have* to upgrade
 right away.


 Hehe sure, but its hard to resist Java7, @GwtIncompatible support and
 compiler/code splitting bug fixes ;-)

 But maybe I misunderstood Matthew's post? I was under the impression that
 with either solution 1 or 2 I could upgrade right away to 2.6 without
 problems. In order to stay on the safe side when upgrading to 2.6 the only
 thing I need to care about is to make sure that IE10 permutation is
 disabled (which means I put myself in the same situation as with GWT 2.5.1
 which does not know IE 10).


You can certainly try it and most things will likely work, for now. The
only issue is if you're using some third-party library that expects the
IE10 permutation to be there, and might behave strangely with IE10 if the
IE9 permutation gets used instead.

We have to decide which configuration people writing third-party libraries
should test their code with for 2.6; they aren't likely to test everything
and will probably just test with 2.6 and the defaults. It seems better in
the long term if they assume the IE10 permutation is there.

- Brian

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