DateTimeFormat is not showing the locales specific formatting.

2014-03-31 Thread Mohammad Al Quraian
Hi, I am using the DateTimeFormat and it's working fine for English, however, in Arabic it's showing the exact value as shown for the English locale! Here's the code: public static String getFormattedDate(String date) { final DateTimeFormat formatter = DateTimeFormat.getFormat("-MM

Re: How to use/force the default locale under certain conditions on runtime?

2014-03-27 Thread Mohammad Al Quraian
Hi Jens, Thanks for your replay but I don't think this helps me. I need someway to switch the locale on runtime for certain pages, not for the complete app. On Thursday, March 27, 2014 2:46:24 PM UTC+3, Jens wrote: > > See: > http://www.gwtproject.org/doc/latest/DevGuideI18nLocale.html#LocaleS

How to use/force the default locale under certain conditions on runtime?

2014-03-27 Thread Mohammad Al Quraian
I have this requirement that for certain pages I want to show them in English locale for some given locales, because not all translations are available. If I didn't do so, some pages will have some items translated but not all, plus the styling of the non-English locale. Is there a good way to

How to make a CSS file as the default and only override some of the classes. (when in I18N)

2014-03-01 Thread Mohammad Al Quraian
Hi, I am using mult-locales app, and wanted to reuse the content of the English language instead of copying the whole and then doing the modifications. Is that possible or is there a good way to avoid code duplication? Thank you. -- You received this message because you are subscribed to the

Re: I am getting ClassCastException only on production code but not on DevMode!

2014-02-16 Thread Mohammad Al Quraian
eb 13, 2014 at 12:19 PM, Thomas Broyer wrote: > Put a breakpoint on that throw line and look at the jsFunction. > Alternatively, possibly look at the stacktrace of the 'e' exception. > > > On Thursday, February 13, 2014 8:43:08 AM UTC+1, Mohammad Al Quraian wrote: >>

I am getting ClassCastException only on production code but not on DevMode!

2014-02-12 Thread Mohammad Al Quraian
Hi, I am developing multi-module project, each project is by its own a GWT project. 2 of these project throw these exception when I run them. The exception is: Uncaught java.lang.RuntimeException: java.lang.ClassCastException The javascript code that throw that is: function com_google_gwt_cor

When the Image setResource is called does the image style get removed?

2014-01-21 Thread Mohammad Al Quraian
I am using the GWT Image widget then I am setting the image resource dynamically. When I do so the style class name of the image gets removed. I used UiBinder also tested on the java code as: image.setStyleName(styles.topLogo()); image.setResource(logo); This would also removed

The Frame class adds to the history tokens every time I change the URL, how can I stop that?

2013-09-17 Thread Mohammad Al Quraian
I noticed that a certain page would appear many times in the 'go back' history tokens. After some digging I found out that the cause is the class 'Frame', specifically every time I change the URL like this: videoFrame.setUrl(url); the tokens would increase with the same current page! Which is

How to use OAuth service in a popup window and close the window, then return to the app and refresh?

2013-09-13 Thread Mohammad Al Quraian
Basically I want to close a page (the one that returned to by the OAuth provider). The refreshes the page that opened the popup to the AOuth provider. I hope that is clear. -- You received this message because you are subscribed to the Google Groups "Google Web Toolkit" group. To unsubscribe f

Re: How do I know that a certain RPC callback is the correct one?

2013-08-21 Thread Mohammad Al Quraian
Does it really matter how I am showing the list? I just want to confirm that the given list is the correct one and that the old one is ignored. On 21/08/2013 9:34:13 AM, Fahmi wrote: Hai, how u show the previous thing? is it windows pop up? On Wed, Aug 21, 2013 at 12:46 PM, Mohammad Al

How do I know that a certain RPC callback is the correct one?

2013-08-20 Thread Mohammad Al Quraian
Hi, Short story, I am making an RPC call to get a list of things, however, when I navigate quickly to another page which would make its own RPC call with different things to get. I sometimes get the previous call 'things' on top of the new 'things'.I though of appending an identifier to the giv

How to avoid unnecessary divs when using UiBinder with a panel, example, HTMLPanel?

2013-07-12 Thread Mohammad Al Quraian
When I use Uibinder and want to have an HTMLPanel to hold another widget which is also HTMLPanel, I would have 2 divs, which I only require 1, I don't need the external one. Example: > ... > ... > > ... > ... > public void addToPanel(Widget widget) { > panel.clear(); > panel.ad

Re: LayoutPanel with minimum size

2013-06-19 Thread Mohammad Al Quraian
Have you tried using the ScrollPanel class? http://www.tutorialspoint.com/gwt/gwt_scrollpanel_widget.htm Remember you have to explicitly set the size of the scrollpanel, also I remember I had an issue with scroll panels and layout panels, I did solve it but I don't remember how. Give it a try an

Re: How come the ScrollEvent is never fired in this code?

2013-06-18 Thread Mohammad Al Quraian
Ok I got it, Thank you very much Jens. One question though, I wanted to make an infinite loop panel, is this the way to do it, how can I do without having the scroll bars, I know I can hide them in CSS but this would stop the scrolling event from firing. You don't have to answer me in detail I

How come the ScrollEvent is never fired in this code?

2013-06-18 Thread Mohammad Al Quraian
I'm playing around with some code, but I couldn't figure out how come the ScrollEvent is never fired, I put a breakpoint on onScroll and it never breaks! Here is the code: public class InfiniteScrollPanel implements ScrollHandler { String text = "Lorem ipsum dolor sit amet, consectetuer..."; Scr

Re: Static dependency Injection vs Direct deferred binding

2013-05-24 Thread Mohammad Al-Quraian
There's no runtime overhead from using Gin, actually Gin does exactly what's your teammate is telling you to do, read here: https://code.google.com/p/google-gin/wiki/GinTutorial#Gin_"Magic"; https://code.google.com/p/google-gin/wiki/GinFa

Re: primer for mobile development

2013-05-22 Thread Mohammad Al-Quraian
I'm on the same train, I would like to get some guidance on mobile GWT. At least how to start on that. I'm doing my app in MVP pattern, so it would be great if it fits that. -- You received this message because you are subscribed to the Google Groups "Google Web Toolkit" group. To unsubscribe

Re: How can I integrate things like the twitter 'tweet button'?

2013-05-16 Thread Mohammad Al Quraian
that? On Wed, May 15, 2013 at 3:26 PM, Thomas Broyer wrote: > > > On Wednesday, May 15, 2013 11:18:48 AM UTC+2, Mohammad Al-Quraian wrote: >> >> Hi Thomas, >> >> The ScriptInjector only works 1% of the times, however this: >> >> Document do

Re: How can I integrate things like the twitter 'tweet button'?

2013-05-15 Thread Mohammad Al Quraian
.setLang("javascript"); doc.getBody().appendChild(script); works 100%, do you have any idea why? On Tue, May 14, 2013 at 6:51 PM, Thomas Broyer wrote: > On Tuesday, May 14, 2013 5:11:26 PM UTC+2, Mohammad Al-Quraian wrote: > > Wow that was easier than I expected. One question t

Re: How can I integrate things like the twitter 'tweet button'?

2013-05-14 Thread Mohammad Al-Quraian
Wow that was easier than I expected. One question though, should I inject the script at the beginning of the app or when I instantiate the presenter? I'm expecting the code of the sharing provider to be accessed quite often. -- You received this message because you are subscribed to the Google

How can I integrate things like the twitter 'tweet button'?

2013-05-14 Thread Mohammad Al-Quraian
Basically, I want to use something like this: https://twitter.com/about/resources/buttons#tweet I found this page which suggests loading the script at the beginning, then using jquery to look for certain elements and then renders relevant elements: http://thegregstier.blogspot.com/2011/05/facebo

Re: right-to-left

2013-05-11 Thread Mohammad Al-Quraian
Have you tested that by adding a locale into your .xml module file? You can add the Arabic locale like this: Then when you change the locale you would find that GWT does rearrange the widgets as a mirror-image, so if you have a horizontal panel with a label on the left then a text box on the r

Re: Serialization help

2013-05-09 Thread Mohammad Al-Quraian
Any object that is sent/received via RPC has to adhere to the serialization policy: https://developers.google.com/web-toolkit/doc/1.6/DevGuideServerCommunication#DevGuideSerializableTypes So, Subtype has to be Serializable. On ther other hand, if you only want to get Subtype, then just declare

Re: instance or class?

2013-05-09 Thread Mohammad Al-Quraian
I thinks it would be better if you included snippets of your code so it's clearer for anyone wants to help you. You seem to be concerned with creating and maintaining classes, however, GWT does a lot of clean up for you, so when you call rootPanel.clear() GWT will detach all of it's widgets and

User login and session management.

2013-05-06 Thread Mohammad Al-Quraian
I'm implementing a simple app which require users to be logged in for some pages/actions. I get the idea about sessions and cookies, and after some reading I deduced that the best way is to only save the session id on the client side as a cookie. Then all communication with the server (that requ

Re: Facebook login button

2013-05-06 Thread Mohammad Al-Quraian
I don't think that Scribe is gwt safe, so what I did is handle most of the login process on the server side. Unfortunately, I couldn't find easy tutes for that. Most importantly you have to understand how OAuth works (which is easy especially v.2). Then try to implemented yourself, here are a

Re: Facebook login button

2013-05-03 Thread Mohammad Al-Quraian
You can check this page on facebook: https://developers.facebook.com/docs/facebook-login/getting-started-web/ You probably have to use OAuth protocol for that. There an easy library that helps you manage that in the server side: https://github.com/fernandezpablo85/scribe-java?source=cr It also sh

Re: java.lang.RuntimeException: Unexpected failure when returning from an RPC call.

2013-05-01 Thread Mohammad Al-Quraian
I figured out the issue, it was an assertion error mistake in my code. Sorry about the inconvenience. -- 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 goog

Re: java.lang.RuntimeException: Unexpected failure when returning from an RPC call.

2013-05-01 Thread Mohammad Al Quraian
There's no stacktrace, it just calls the onFailure function on the client side, and prints: SEVERE: java.lang.RuntimeException: Unexpected failure When I break on the exception, the last relavent thing that I can see is the FieldSerializer of my class model. The weird thing is that I didn't even

java.lang.RuntimeException: Unexpected failure when returning from an RPC call.

2013-05-01 Thread Mohammad Al-Quraian
I'm having this sudden and strange issue, when my RPC call tries to return the value, this exception is thrown: java.lang.RuntimeException: Unexpected failure It happens at this code of the GWT library: /** * Creates a new instance of {@code klass}. The class must have a no-arg * construct

Re: I want to use Apache Commons on the server, but the code is using the packages in gwt-dev.jar.

2013-04-29 Thread Mohammad Al Quraian
The thig is whenever I use a class from that package the IDE would link to the gwt-dev.jar. It's seem to be a conflict issue, there might be an easy solution but I have no knowledge of it. On Monday April 29. 2013 at 4:18 AM, Patrick Tucker wrote: Once on the server the jars in a directory are l

Re: Installing GWT 2.5.1 through Eclipse

2013-04-29 Thread Mohammad Al-Quraian
That's weird, it might be a networking issue. Try to follow this page: https://developers.google.com/eclipse/docs/install-from-zip It's shows you how to install from a local repos. On Monday, April 29, 2013 7:44:23 PM UTC+3, Anssi Lappalainen wrote: > > I'm trying to install GWT plugin for Eclipse

Re: Chrome plugin

2013-04-29 Thread Mohammad Al-Quraian
It's is available in Chrome Web Store: https://chrome.google.com/webstore/detail/gwt-developer-plugin/jpjpnpmbddbjkfaccnmhnkdgjideieim It's working fine with latest Chrome and GWT 2.5.1. What do you mean it's disabled? On Monday, April 29, 2013 8:02:26 PM UTC+3, Norman Viands wrote: > > In the

I want to use Apache Commons on the server, but the code is using the packages in gwt-dev.jar.

2013-04-28 Thread Mohammad Al-Quraian
I want to use this class RandomStringUtils, I included the Apache Commons jar in the server side, but my code/ide refers to the ones in the gwt-dev.jar, which won't work because it's not copied to the server. I tried to reorder the libraries in the build path but it didn't help. How can I avoid

How do you guys organise you styling? especially when using Gin and UiBinder.

2013-04-28 Thread Mohammad Al-Quraian
I'm using an external CSS file, however when I tried to use it as a client bundle, things get complex when you use Gin and Uibinder. I want something that makes the styles easy to use and change, also to have shared naming between the different views (for mobile and desktop). So what practices

In the suggest box, is there a way to avoid highlighting the matched letter?

2013-04-26 Thread Mohammad Al-Quraian
As it says in the title, is there an easy way? Because it doesn't look very pretty in the Arabic language. -- 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

My app suddenly doesn't work in debug mode.

2013-04-23 Thread Mohammad Al-Quraian
This is a bit strange as it happened out of the blue. When I try to run my app in debug mode it takes a very long time in the development mode console the step that seems to be taking time is the ' rebinding ...templates" for a widget cell. Now, all other projects work fine, and this project can

Re: ListBox and SuggetBox values are empty!

2013-04-23 Thread Mohammad Al-Quraian
racle = (MultiWordSuggestOracle) suggestBox.getSuggestOracle(); oracle.clear(); oracle.addAll(values); On Tuesday, April 23, 2013 2:04:22 PM UTC+3, Mohammad Al-Quraian wrote: > > After I posted that, I went to my GIN module and made these views > as singletons (I didn't make before because t

Re: ListBox and SuggetBox values are empty!

2013-04-23 Thread Mohammad Al-Quraian
After I posted that, I went to my GIN module and made these views as singletons (I didn't make before because they are rarely used) now the ListBox shows the values but not the SuggestBox! Both widgets are UiBinder widgets by the way. On Tuesday, April 23, 2013 1:56:03 PM UTC+3, Mohamm

ListBox and SuggetBox values are empty!

2013-04-23 Thread Mohammad Al-Quraian
I have this strange issue, everything was fine for a while then I noticed that the SuggetBox doesn't show any values, later I find the same issue for ListBox. Now, when I debug my code I see that the widgets are being updated with the correct values, these widgets also appear on the page but wit

Re: Regarding JSONP requests, duplicate requests and an error.

2013-04-22 Thread Mohammad Al-Quraian
Nevermind the duplication error, it seems to be gone. On Monday, April 22, 2013 3:26:00 PM UTC+3, Mohammad Al-Quraian wrote: > > I noticed that the browser is sending what it seems to be duplicate > requests, I'm not sure if it's a thing in my code or not: > > Here is

Regarding JSONP requests, duplicate requests and an error.

2013-04-22 Thread Mohammad Al-Quraian
I noticed that the browser is sending what it seems to be duplicate requests, I'm not sure if it's a thing in my code or not: Here is a sample of the requests: http://gdata.youtube.com/feeds/api/videos/02HCaj9h8Lo?v=2&alt=json&callback=__gwt_jsonp__.P8.onSuccess http://gdata.youtube.com/feeds/api

Re: Can I use DI in widget cells,because it doesn't seem to be working with me?

2013-04-20 Thread Mohammad Al Quraian
tiles); } How are they instaniated, sorry I just started learning about cells. Thanks Thomas On Saturday April 20. 2013 at 12:39 PM, Thomas Broyer wrote: On Saturday, April 20, 2013 9:12:12 AM UTC+2, Mohammad Al-Quraian wrote: I was just wondering if DI can be used in cell widget or not? I

Can I use DI in widget cells,because it doesn't seem to be working with me?

2013-04-20 Thread Mohammad Al-Quraian
I was just wondering if DI can be used in cell widget or not? I tried constructor and method injection but it seems that DI is never fired up on cell widgets. -- You received this message because you are subscribed to the Google Groups "Google Web Toolkit" group. To unsubscribe from this group

Re: Joda Time Jodatime in GWT server

2013-04-18 Thread Mohammad Al-Quraian
It's not enough to include it in the build path, you have to copy the library to the lib folder in your server side (uder war/WEB-INF), and then include it in the build path. This is so the server has access to the library. On Tuesday, April 16, 2013 12:36:15 AM UTC+3, Steve Morgan wrote: > > I

Thumbnail interface with infinite scrolling, are cell widgets the best choice?

2013-04-15 Thread Mohammad Al-Quraian
Hi, I'm writing an app which has a thumbnail interface and in which users may want to browser hundreds if not thousands of custom widgets (images + other). Are data presentation widgets my best choice? Obviously my main concern here is performance and resources usage. -- You received this mes

In UiBinder, how to make a namespace import from multiple packages?

2013-04-11 Thread Mohammad Al-Quraian
I tried many ways but nothing worked. -- 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 grou

Problems trying to run MobileWebApp.

2013-04-10 Thread Mohammad Al-Quraian
I'm having so many issues running this sample app, I was able to run it using the maven command line with some problems but it works. When I import it to eclipse I encounter many problems for example: HTTP ERROR: 500 No realm RequestURI=/MobileWebApp.html *Powered by Jetty://* I wish that som

Re: Is there a set of best practices for implementing nested presenters/view?

2013-04-10 Thread Mohammad Al Quraian
e coding... but that's why people often complain > that Java is a very verbose language ;) Especially when you want to > correctly code OO. > Above setup is especially friendly for long running app's that need to be > changed in such a way that it stays maintenable and changes

Re: Is there a set of best practices for implementing nested presenters/view?

2013-04-10 Thread Mohammad Al Quraian
unit testing (I wrote something about that some time ago in this forum). > > > > Op woensdag 10 april 2013 01:30:55 UTC+2 schreef Mohammad Al-Quraian het > volgende: > >> I did my own way of nesting presenters and now I hit a design issue, >> should the nested presente

Is there a set of best practices for implementing nested presenters/view?

2013-04-09 Thread Mohammad Al-Quraian
I did my own way of nesting presenters and now I hit a design issue, should the nested presenter have a reference to the nesting presenter? Is there a better design than this? -- You received this message because you are subscribed to the Google Groups "Google Web Toolkit" group. To unsubscrib

GWT is creating large cache files in my temp folder.

2013-03-29 Thread Mohammad Al-Quraian
It's getting ridiculous, the total size of the files is over 6 GB!! An example of a file name is: gwt170701911917272844byte-cache 1- Why is it doing that and can I avoid it? or at least make them deleted automatically? 2- Are they different from gwt-unitCache files? BTW, I'm opening quite the n

Re: In DevMode, when the browser is refreshed and the module is loaded again, does the prev' one exists in memory?

2013-03-27 Thread Mohammad Al Quraian
March 27, 2013 5:39:23 PM UTC+1, Mohammad Al-Quraian wrote: >> >> Because, after several refreshes I sometimes get this error: >> >> 19:33:47.995 [ERROR] [xxx] Out of memory; to increase the amount of >> memory, use the -Xmx flag at startup (java -Xmx128M ...) >&

In DevMode, when the browser is refreshed and the module is loaded again, does the prev' one exists in memory?

2013-03-27 Thread Mohammad Al-Quraian
Because, after several refreshes I sometimes get this error: 19:33:47.995 [ERROR] [xxx] Out of memory; to increase the amount of memory, use the -Xmx flag at startup (java -Xmx128M ...) Even though I set the -xmx variable to -Xmx512m. Is there a way to clear to force the devmode to clear th

Why should widgets who implement HasDirection be a leaf widget?

2013-03-27 Thread Mohammad Al-Quraian
It says in the javadoc: A widget that implements this interface has the ability to override the document directionality for its root element. Widgets that implement this interface should be leaf widgets. More specifically, they should not implement the HasWidgets

Re: momentgwt - a GWT wrapper library for momentjs.com

2013-03-25 Thread Mohammad Al-Quraian
I just made an example on how to do this using momentgwt: > > > https://github.com/cancerberoSgx/momentgwt/blob/master/momentgwttest/momentgwttest1/src/org/sgx/momentgwttest1/client/tests/InternationalizationTest1.java > > Hope that helps > > On Monday, March 25, 2013 2:11:45 PM UT

Re: momentgwt - a GWT wrapper library for momentjs.com

2013-03-25 Thread Mohammad Al-Quraian
e: momentgwt and > gwtjsutil - (an utility library of mine for easier javascript wrapper > libraries development). Jar replaced. Sorry for the inconvenience > > On Sunday, March 24, 2013 3:43:10 PM UTC-3, Mohammad Al-Quraian wrote: >> >> When I tried to use the example:

Re: momentgwt - a GWT wrapper library for momentjs.com

2013-03-24 Thread Mohammad Al-Quraian
I think the module org.sgx.jsutil.JsUtil is required. On Sunday, March 24, 2013 9:43:10 PM UTC+3, Mohammad Al-Quraian wrote: > > When I tried to use the example: > Moment.moment().add(2, "days").format(" Do , h:mm:ss a") > > After inheriting the requir

Re: momentgwt - a GWT wrapper library for momentjs.com

2013-03-24 Thread Mohammad Al-Quraian
When I tried to use the example: Moment.moment().add(2, "days").format(" Do , h:mm:ss a") After inheriting the required module and including the jar, it gives me this error: The type org.sgx.jsutil.client.JsObject cannot be resolved. It is indirectly referenced from required .class files

Re: In MVP should/could the view depends on the presenter to be initialised?

2013-02-17 Thread Mohammad Al Quraian
Thanks Pedro for the help, I think I should look into DI and see it fits my design well. On Sat, Feb 16, 2013 at 10:09 AM, Pedro Lamarão wrote: > > > Em sábado, 16 de fevereiro de 2013 00h39min15s UTC-2, MAQ escreveu: >> >> Hi, >> >> In my view there's a ListBox that its content should depend on