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-dd'T'HH:mm:ss);

try {
final Date parsedDate = formatter.parse(date);
return 
DateTimeFormat.getFormat(DateTimeFormat.PredefinedFormat.DATE_MEDIUM).format(parsedDate);
} catch (IllegalArgumentException e) {
e.printStackTrace();
return date;
}

}

-- 
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/d/optout.


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 force English for certain condition, for instance, 
if a given url parameter was provided (even when the locale in the url is 
not English)?

-- 
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/d/optout.


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#LocaleSpecifying

 -- 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/d/optout.


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 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: I am getting ClassCastException only on production code but not on DevMode!

2014-02-16 Thread Mohammad Al Quraian
Thanks Thomas for replaying. This is the content of the jsFunction:

function (){
handler.onReadyStateChange__Lcom_google_gwt_xhr_client_XMLHttpRequest_2V(_this);
}

I know it's a long shot but do you know what might be the problem?

Thanks for your ongoing help, I appreciate it.


On Thu, Feb 13, 2014 at 12:19 PM, Thomas Broyer t.bro...@gmail.com 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:

 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_core_client_impl_Impl_entry__Lcom_google_
 gwt_core_client_JavaScriptObject_2Lcom_google_gwt_core_client_
 JavaScriptObject_2(jsFunction){
   return function(){
 try {
   return com_google_gwt_core_client_impl_Impl_entry0__Ljava_lang_
 Object_2Ljava_lang_Object_2Ljava_lang_Object_2Ljava_lang_Object_2(jsFunction,
 this, arguments);
 }
  catch (e) {
   throw e;
 }
   }
   ;
 }

 They are all maven projects with the same structure and dependencies, the
 home.xml files are similar. I can't figure out what's wrong, especially
 because they run fine on devmode. The exception happens on all major
 browsers.

 Any idea what's going on?

  --
 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/6AEXM5Dnmvw/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.


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_core_client_impl_Impl_entry__Lcom_google_gwt_core_client_JavaScriptObject_2Lcom_google_gwt_core_client_JavaScriptObject_2(jsFunction){
  return function(){
try {
  return 
com_google_gwt_core_client_impl_Impl_entry0__Ljava_lang_Object_2Ljava_lang_Object_2Ljava_lang_Object_2Ljava_lang_Object_2(jsFunction,
 
this, arguments);
}
 catch (e) {
  throw e;
}
  }
  ;
}

They are all maven projects with the same structure and dependencies, the 
home.xml files are similar. I can't figure out what's wrong, especially 
because they run fine on devmode. The exception happens on all major 
browsers.

Any idea what's going on?

-- 
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] I am getting ClassCastException on my app production code, but not on dev mode.

2014-02-10 Thread Mohammad Al Quraian
Hi,

I am developing multiple apps with similar structure, they're working fine 
except for 2. They give me the following error on production mode only:

Uncaught java.lang.runtimeexception: java.lang.ClassCastException


This is the compiled code that throws the exception:

function 
com_google_gwt_core_client_impl_Impl_entry__Lcom_google_gwt_core_client_JavaScriptObject_2Lcom_google_gwt_core_client_JavaScriptObject_2(jsFunction){
  return function(){
try {
  return 
com_google_gwt_core_client_impl_Impl_entry0__Ljava_lang_Object_2Ljava_lang_Object_2Ljava_lang_Object_2Ljava_lang_Object_2(jsFunction,
 
this, arguments);
}
 catch (e) {
  throw e;
}
  }
  ;

I am using GWT 2.5.1, any idea what could be the problem?

Thanks

-- 
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.


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 style name, however, the following would not:

image.setResource(logo);
image.setStyleName(styles.topLogo());

So, my guess is that setResource foe some reason removes the previously 
defined style name. Is that a bug or a bug that is disguised as a feature?

-- 
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.


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 very 
annoying. I tried to stop the LoadEvent like this:


private HandlerRegistration handler;

handler = videoFrame.addLoadHandler(new LoadHandler() {

@Override
public void onLoad(LoadEvent event) {
handler.removeHandler();
}
});

With no luck what so ever. I tried other things but I got no where.
Any help?

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.


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 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: 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 zinkr...@gmail.com wrote:
Hai,

how u show the previous thing? is it windows pop up?


On Wed, Aug 21, 2013 at 12:46 PM, Mohammad Al Quraian m4des...@gmail.com 
[mailto:m4des...@gmail.com] wrote:

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 given callback, but 
is there a better way?

Thansk
--
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 
[mailto:google-web-toolkit%2bunsubscr...@googlegroups.com].
To post to this group, send email to google-web-toolkit@googlegroups.com 
[mailto:google-web-toolkit@googlegroups.com].
Visit this group at http://groups.google.com/group/google-web-toolkit 
[http://groups.google.com/group/google-web-toolkit].
For more options, visit https://groups.google.com/groups/opt_out 
[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/r-VPdzOYJpA/unsubscribe 
[https://groups.google.com/d/topic/google-web-toolkit/r-VPdzOYJpA/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 
[http://groups.google.com/group/google-web-toolkit].
For more options, visit https://groups.google.com/groups/opt_out 
[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.


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 given 
callback, but is there a better way?

Thansk

-- 
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.


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:

 ...
 ...
 g:HTMLPanel ui:field=panel /
 ...
 ...
 public void addToPanel(Widget widget) {
 panel.clear();
 panel.add(widget);
 }


How can I avoid having the div of the fathering panel?

-- 
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: How come the ScrollEvent is never fired in this code?

2013-06-19 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 
just need a general idea if you have the time.

Cheers and thanks again.

On Wednesday, June 19, 2013 2:58:39 AM UTC+3, Jens wrote:

 Your ScrollPanel never needs to scroll if it really has a height of 1200px 
 but only contains such a short text.

 Also ScrollPanel extends SimplePanel so it can only have exactly one child 
 widget. That means if onScroll() executes you will see an exception because 
 you are trying to add a second child to ScrollPanel. What you want is: 

 ScrollPanel (height 1200px)
 --- FlowPanel
   - child 1 (should be taller than 1200px so ScrollPanel can 
 actually scroll it)
   - child 2


 -- 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: 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 and see if it works for you.

On Wednesday, June 19, 2013 11:06:26 AM UTC+3, P.G.Taboada wrote:

 Hi there,

 I am using layout panels to layout my application. It works fine, but I 
 need a scroll bar as soon as the window is too small. 

 Here is an example of what I would like to have:

 http://jsfiddle.net/hrnU3/2/

 Any tips to get something like this working with layout panels?

 brgds,


 Papick



-- 
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.




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...;
ScrollPanel panel;
String height = 1200px;
String width = 200px;

public InfiniteScrollPanel() {
panel = new ScrollPanel(new HTML(text));
panel.setSize(width, height);
panel.addScrollHandler(this);
panel.getElement().getStyle().setBackgroundColor(rgb(216, 216, 216));
}

@Override
public void onScroll(ScrollEvent event) {
if (panel.getVerticalScrollPosition() == 1100) {
panel.add(new HTML(text));
}
}
}

Then I add it like this:

InfiniteScrollPanel demo = new InfiniteScrollPanel();
RootPanel.get().add(demo.panel);

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: 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/GinTutorial#Gin_
https://code.google.com/p/google-gin/wiki/GinFaq#Does_GIN_have_runtime_overhead?

Also, you don't have to added any configurations for things such as 
Constants and RPC interfaces, because will automate the deferred binding. 
You just need to inject them when you need to use them. This is also 
explained in the links above.

-- 
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?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.




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 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?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.




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

2013-05-15 Thread Mohammad Al Quraian
 Hi Thomas,

The ScriptInjector only works 1% of the times, however this:

Document doc = Document.get();
ScriptElement script = doc.createScriptElement();
script.setSrc(http://platform.twitter.com/widgets.js;);
script.setType(text/javascript);
script.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 t.bro...@gmail.com 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 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.

 The script should be injected each time you add a new Anchor (attached to
 the doc!) so I'd say you should add it to your view's onAttach.
 If it works as well as the one for embedded tweets (which I've used on my
 blog a few times), and there's no reason it wouldn't, injecting the script
 multiple times shouldn't cause conflicts: it'll detect Anchors that have
 already been processed and will only process the others.

 --
 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/TjN9oGZlLag/unsubscribe?hl=en
 .
 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?hl=en.
 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?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.




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/facebook-and-twitter-buttons-in.html

I also found this code:

.
final String scriptStr = !function(d,s,id){ +  var 
js,fjs=d.getElementsByTagName(s)[0];
 +  if(!d.getElementById(id)){ + 
js=d.createElement(s);
 +  
js.id=id;js.src='//platform.twitter.com/widgets.js';
 +  fjs.parentNode.insertBefore(js,fjs);
 +  }}(document,'script','twitter-wjs');;

final ScriptElement scriptElement = Document.get().createScriptElement(
scriptStr);

// we place the script just after the body tag
bodyElement.appendChild(scriptElement);
Any suggestions? I want something simple and clean. 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?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.




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 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?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.




[gwt-contrib] Do you guys need help in translation, Arabic language specifically?

2013-05-14 Thread Mohammad Al-Quraian
I want to try and help improve GWT, and I was wondering if that is 
possible. I noticed for instance in the Simple Pager, the words are still 
in English even when the selected locale is Arabic.

-- 
-- 
http://groups.google.com/group/Google-Web-Toolkit-Contributors
--- 
You received this message because you are subscribed to the Google Groups 
Google Web Toolkit 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: 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:
extend-property name=locale values=ar /

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 right, after switching to a RTL 
locale the label would be on the right and the text box on the left, all 
done magically for you by GWT.

On Friday, May 10, 2013 4:43:53 PM UTC+3, Dawn Borg Costanzi wrote:

 Hi everyone,

 I've created a number of widgets to make an online questionnaire. Can 
 anyone tell me whether there is an easy way to have a mirror-image of the 
 widget, for right-to-left language support?

 Thanks,
 Dawn


-- 
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?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.




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 clear the memory for you AFAIK.
Don't think too much about performance and optomisation at the moment.

On Friday, May 10, 2013 3:17:08 AM UTC+3, Blake wrote:

 BeneficiaryPopUpImpl.as

 import com.arahant.app.common.BasePopUp;
 import flash.display.DisplayObject;
 import 
 com.arahant.app.screen.standard.wizard.benefitWizard.page.simpleX.SimpleXXXScreen;



 if (!mainWindow.contingentBeneficiariesHiddenField.booleanValue) {
 primaryRadioButton.selected = true;
  primaryRadioButton.visible = false;
 contingentRadioButton.visible = false;
 }



 private function get mainWindow():SimpleCoverageScreen
 {
 var parent:DisplayObject = this.parentWindow;
  while (parent is BasePopUp)
 parent = (parent as BasePopUp).parentWindow;
 return parent as SimpleCoverageScreen;
 }




 Sorry, that got accidentally sent before it was done.  I continue...


 I have a GWT web app that has several screens.  Each screen is
 represented by its own Java class.  Each screen starts with the
 following logic:

 RootPanel rootPanel = RootPanel.get();
 rootPanel.clear();

 I then add the stuff I want to appear on the new screen to rootPanel
 (since each screen doesn't share content with the prior screen).

 The first screen (class) is an instance object because that is the way
 GWT spawns it (probably for good reason to support other models).  For
 my remaining screens I just use class methods and class variables
 instead of creating an instance.  I do this for two reasons.  The main
 reason is that I don't have to keep track of which instance when I do
 things with the screen.  I would only have one copy of the screen.

 I presume that if I opened the same app in another browser tab it
 would be entirely unrelated to the first tab.  It would be like
 starting up two copies of the same program.  One has nothing to do
 with the other.  And, of course, one machine would have utterly
 nothing to do with the other.

 This all makes sense in theory and seems to work fine while debugging
 under eclipse.  However, when I started it up under glassfish in a
 production environment, my app is flaky.  Sometimes I enter data,
 click a button, and nothing happens.  Other times a new screen is run
 and no data (from the server) shows up.  When I retry it it works.  I
 don't know what is causing this but I thought perhaps my unorthodox way
 of switching screens might be the problem.

 So, I have two issues.  The first issue is whether I can do things with
 classes and resetting the root each time or not.  The second is - what
 is causing the flakiness when operating in a production environment?

 Any pointers would really be appreciated.

 Thanks.

 Blake McBride



-- 
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?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.




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 that in your service and forget about the 
Type if you never going to receive it.

-- 
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?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.




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 few pages that may help you:
https://code.google.com/p/gwt-examples/wiki/DemoGwtGData
http://stackoverflow.com/questions/8991955/doing-oauth-with-scribe-for-gwt

There's a complete sample project for OAuth with GWT:
https://code.google.com/p/gwtoauthlogindemo/

But the code is bad and confusing, I found out that the process is easier 
than portrayed  by this project.

-- 
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?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.




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 requires users validation) 
will be done by this session id.

The issue here is that sessions expire, some noted to user a timer on the 
client side to rest the sessions duration. But what if the user is inactive 
for a long time, *does that mean that the user has to login if the session 
has expired*?
I know that sessions duration can be extended, but I don't reckon this is a 
good idea, or is it?

How do you solve this simple yet complicated issue?

-- 
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?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.




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 shows many example to do OAuth management for many websites 
including Facebook.

On Friday, May 3, 2013 5:35:23 PM UTC+3, Larissa Costa wrote:

 Hi,

 I've never worked with the facebook and I need help.

 I have a website (GWT) and I wanted to connect it with facebook to get 
 some information about the user. For example, put a login button on the 
 home page of my site.

 Does anyone know how I can do this? Anyone have one example?

 Thank you


-- 
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?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.




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
   * constructor. The constructor may have any access modifier (for example,
   * private).
   */
  @SuppressWarnings(unchecked)
  public static T T newInstance(ClassT klass) {
ConstructorT c = (ConstructorT) constructorCache.get(klass);
try {
  if (c == null) {
c = klass.getDeclaredConstructor();
c.setAccessible(true);
constructorCache.put(klass, c);
  }
  return c.newInstance();
} catch (Exception ex) {
  throw new RuntimeException(Unexpected failure, ex);
}
  }

I emptied all and every cache I can think of, I also started using JDK 6 
instead of 7, but with no luck yet.
I'm using GWT 2.5.1 and App Engine 1.7.7.1.

-- 
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?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.




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 change my model!

On Thursday May 02. 2013 at 1:07 AM, Jens jens.nehlme...@gmail.com wrote:
The stack trace should tell you whats wrong. Looking at the code I would guess 
you have a class (that goes through RPC) without any default constructor.

-- J.
--
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/f0wzUeJzjzM/unsubscribe?hl=en
 
[https://groups.google.com/d/topic/google-web-toolkit/f0wzUeJzjzM/unsubscribe?hl=en].
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?hl=en 
[http://groups.google.com/group/google-web-toolkit?hl=en].
For more options, visit https://groups.google.com/groups/opt_out 
[https://groups.google.com/groups/opt_out].
 
 



Sent from Mailbird 
[http://www.getmailbird.com/?utm_source=signatureutm_medium=emailutm_campaign=SentWithMailbird_Normal]

-- 
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?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.




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 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?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.




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 2.51. there was a note about the plugin being available from the 
 Chrome Store. It is there but is disabled.  Is there plugin for Chrome 
 going to be made available anytime soon?

-- 
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?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.




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. I go to 'Help  Install new 
 software... ' through menus and I have added 
 http://dl.google.com/eclipse/plugin/4.2 as Available Software Site. I 
 choose to install Google Web Toolkit SDK 2.5.1, accept the agreements. 
 Installing software dialog window appears and I see the progress bar which 
 immediately gets stuck at 48% and never proceeds from there.

 System information:
 Arch Linux 3.8.10-1 x86_64
 Eclipse SDK 4.2.2



-- 
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?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.




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 tucker...@gmail.com wrote:
Once on the server the jars in a directory are loaded in alphabetic order if 
not specified otherwise. You can try renaming the jar to make it come first.

--
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/v5UhdnWvyQA/unsubscribe?hl=en.
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?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.





Sent from Mailbird 
[http://www.getmailbird.com/?utm_source=signatureutm_medium=emailutm_campaign=SentWithMailbird_Faster]
 - it's faster

-- 
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?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.




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 seem to be working for you?

Cheers

-- 
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?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.




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 this issue?

-- 
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?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.




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 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?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.




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 with now 
options to select from.

The only thing I can think of that may cause this issue is GIIN, but I have 
no idea what it could be.
I know that is not enough information but I was hoping that someone may 
have an idea what could the cause of this issue be.

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?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.




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, Mohammad Al-Quraian wrote:

 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 with now 
 options to select from.

 The only thing I can think of that may cause this issue is GIIN, but I 
 have no idea what it could be.
 I know that is not enough information but I was hoping that someone may 
 have an idea what could the cause of this issue be.

 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?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.




Re: ListBox and SuggetBox values are empty!

2013-04-23 Thread Mohammad Al-Quraian
I don't understand why but this workaround fixes the issue:

Instead of creating my own oracle I just use the one created in the suggest 
box itself.
In the constructor:

suggestBox = new SuggestBox();

When I want to update the values in the suggestbox:

MultiWordSuggestOracle oracle = (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 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, Mohammad Al-Quraian wrote:

 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 with now 
 options to select from.

 The only thing I can think of that may cause this issue is GIIN, but I 
 have no idea what it could be.
 I know that is not enough information but I was hoping that someone may 
 have an idea what could the cause of this issue be.

 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?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.




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 run 
fine but not in debug mode. After when it finally runs, the app seems very 
very slow, and I can see the javaaw.exe process taking a bit of cpu power.

I cleaned up all the gwt cached files, browser cache, tried other browsers, 
stopped firewall, restart pc, all I can think of and with no luck.

-- 
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?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.




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=2alt=jsoncallback=__gwt_jsonp__.P8.onSuccess
http://gdata.youtube.com/feeds/api/videos/02HCaj9h8Lo?v=2alt=jsoncallback=__gwt_jsonp__.P7.onSuccess
http://gdata.youtube.com/feeds/api/videos/02HCaj9h8Lo?v=2alt=jsoncallback=__gwt_jsonp__.P6.onSuccess

All with the same exact content!

This is my code for the jsonprequest builder:

public void getVideo(final String url,
final AsyncCallbackYoutubeVideoData async) {
String reqUrl;
 reqUrl = http://gdata.youtube.com/feeds/api/videos/; + id + 
?v=2alt=json;

requestBuilder.requestObject(URL.encode(reqUrl),
new AsyncCallbackYoutubeVideoData() {
public void onFailure(Throwable caught) {
async.onFailure(caught);
}
public void onSuccess(YoutubeVideoData result) {
async.onSuccess(result);
}
});
}

Also, I'm getting this error for including a frame of a different domain:
Unsafe JavaScript attempt to access frame with URL 
http://127.0.0.1:/Mobaraty.html?gwt.codesvr=127.0.0.1:9997#AddContentfrom 
frame with URL 
http://www.youtube.com/embed/02HCaj9h8Lo?wmode=transparentrel=0autohide=1showinfo=0.
 
Domains, protocols and ports must match.

I included this in my module file, but it didn't help:
add-linker name=xsiframe /

-- 
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?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.




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 a sample of the requests:

 http://gdata.youtube.com/feeds/api/videos/02HCaj9h8Lo?v=2alt=jsoncallback=__gwt_jsonp__.P8.onSuccess

 http://gdata.youtube.com/feeds/api/videos/02HCaj9h8Lo?v=2alt=jsoncallback=__gwt_jsonp__.P7.onSuccess

 http://gdata.youtube.com/feeds/api/videos/02HCaj9h8Lo?v=2alt=jsoncallback=__gwt_jsonp__.P6.onSuccess

 All with the same exact content!

 This is my code for the jsonprequest builder:

 public void getVideo(final String url,
 final AsyncCallbackYoutubeVideoData async) {
 String reqUrl;
  reqUrl = http://gdata.youtube.com/feeds/api/videos/; + id + 
 ?v=2alt=json;

 requestBuilder.requestObject(URL.encode(reqUrl),
 new AsyncCallbackYoutubeVideoData() {
 public void onFailure(Throwable caught) {
 async.onFailure(caught);
 }
 public void onSuccess(YoutubeVideoData result) {
 async.onSuccess(result);
 }
 });
 }

 Also, I'm getting this error for including a frame of a different domain:
 Unsafe JavaScript attempt to access frame with URL 
 http://127.0.0.1:/Mobaraty.html?gwt.codesvr=127.0.0.1:9997#AddContentfrom 
 frame with URL 
 http://www.youtube.com/embed/02HCaj9h8Lo?wmode=transparentrel=0autohide=1showinfo=0.
  
 Domains, protocols and ports must match.

 I included this in my module file, but it didn't help:
 add-linker name=xsiframe /


-- 
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?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.




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 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?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.




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
Good question, I don't even know how they are instantiated!

I just got a CellList declared as:
private final CellListPresentable cellList = new CellListPresentable(new 
TileCell());

and call this method to update the list:

public void setTilesStartingAt(int start, ListPresentable tiles) {
cellList.setRowData(start, 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 t.bro...@gmail.com 
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 tried 
constructor and method injection but it seems that DI is never fired up on cell 
widgets.

You can use DI everywhere object creation can be done by the DI container (for 
instance, it means using @UiField(provided=true) or @UiFactory for UiBinder).

So the question is: how are your cells instantiated? 
--
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/MS3J-6W7BBg/unsubscribe?hl=en
 
[https://groups.google.com/d/topic/google-web-toolkit/MS3J-6W7BBg/unsubscribe?hl=en].
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?hl=en 
[http://groups.google.com/group/google-web-toolkit?hl=en].
For more options, visit https://groups.google.com/groups/opt_out 
[https://groups.google.com/groups/opt_out].
 
 



Sent from Mailbird 
[http://www.getmailbird.com/?utm_source=signatureutm_medium=emailutm_campaign=SentWithMailbird_Windows]
 for Windows

-- 
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?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.




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'm using Jodatime in my GWT application, server only. I'm getting a 
 runtime message:  java.lang.ClassNotFoundException: 
 org.joda.time.ReadableInstant. I have included Jodatime 1.6.2 in my project 
 build path. Do I need to add an inherits ... statement as well? I am sure 
 it is something extremely simple, I just haven't found it.
 Thanks,
 Steve


-- 
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?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.




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 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?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.




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 group, send email to google-web-toolkit@googlegroups.com.
Visit this group at http://groups.google.com/group/google-web-toolkit?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.




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

2013-04-10 Thread Mohammad Al Quraian
Yeah, I don't have any intentions in using any more frameworks. Let me ask
you this, let's say that you have a page which has multiple panels and in
each panel there are multiple widgets. How would you go about implementing
that yourself? I'm especially interested in the case that you wanted for
some of these widget to communicate with each other.

In my design, I made a 'father' presenter that has a few 'children'
presenters, the idea here is that these presenters can communicate with
each other directly (father to children and vice versa), with the father
having the overall control. Of course, each presenter controls its own view
and nobody knows about this view.

Isn't that a good way of handling things or is it complicated?


On Wed, Apr 10, 2013 at 10:22 AM, Ed post2edb...@gmail.com wrote:

 I wouldn't use these MVP patterns like gwtp before understanding well the
 different View patterns, start reading here:
 http://martinfowler.com/eaaDev/SupervisingPresenter.html (martin fowler).

 Every situation is different, and simple adding a tool like gwtp might
 not work for you, even worse, might result in awkward buggy code.
 If you understand well the theory, you can always use (parts)  these
 framework, but to my experience, if you understand well the patterns, you
 will not use them (anymore) and make things yourself as it's not a lot of
 coding.

 Personally I don't think I would use nested presenters, I did that in the
 past, but didn't like it. I use kind of Autonomous views - All my widgets
  extend from lightweight IsWidget objects that construct the actual Widget
 (builder pattern). I have good experience with it, like and results in good
 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 presenter have a reference to the nesting presenter? Is
 there a better design than this?

  --
 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/cfj3qqhufKc/unsubscribe?hl=en
 .
 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?hl=en.
 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?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.




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

2013-04-10 Thread Mohammad Al Quraian
Wow, that's a lot to digest, I need some time for that. Thank you very
much. Just a quick Q, controllers, views, presenters and facades are all
different things?
Also, wouldn't you consider facades a form of presenters? If not then what
is the difference?

I really like your input and hope more people contribute to this discussion.
Thansks


On Wed, Apr 10, 2013 at 11:49 AM, Ed Bras post2edb...@gmail.com wrote:

 Let me give you some idea's from what I use now, and which I like after
 trying/playing many things in the last 7 years with gwt:

 + Well defined overall functionality, like login, productInfo are
 contained in a component. The component has a Controller, View, if required
 a Presenter and always a Facade.
 The facade hide's all internal things and is the class that others use to
 communicate with the component.
 This setup has many advantages like clear, pushing events instead of
 pulling to overcome a Handler web that results in memory leaks, good unit
 testable as all required things like presenter, controller, view,
 widgets... etc.. are created through the facade and the facade is mocked
 through the GWTBridge during unit testing.

 + All controllers are lazy loaded through code splitting and hold in a
 central controller storage.

 + The View composes widget, not more, not less and take care that it keeps
 this responsibility during development as developers often put too much
 widget things in a view such that the view's become messy and hard to test.

 + In the View you use hardcore OO design and use things like HeaderPanel,
 ProductContainer, Product, StatusButton, etc...
 I can't stress enough the OO design, as if you do, you will see that
 flow's and coding becomes logic and stays maintenable such that it's easy
 and natural to add functionality.
 Yes, you probably complain that you get a lot of small objects, and the
 code often takes longer to understand,  but that's OO, but the advantage of
 optimal reuse of small pieces of functionality.

 + Use standard patterns like factory, singleton, visitor, service, builder
 patterns, such that others can more easily understand the code.

 + Use lightweight widget (builders) that extend from IsWidget
 (ProductContainer extends from IsWidget), that contains logical and can
 easily be tested.

 + If these widget (builders) need to communicate with eachother I use a
 Communicate interface (or Informer interface) that is public but contained
 in the Widget itself. I't s usualy injected throug the constructor and
 required.

 + The Composer (father in your story) implements mostly all Communicator
 interfaces and delegates it to others, like: bubble it up to the
 controller, or let another widget do something.
 It all depends on the responsibility of every widget/component.
 For example: in my case, only the controller is allowed to communicate to
 the backend, such that only the controller contains Async callbacks.

 + Use a lot of Characteristic interfaces like HasId, HasEmpty, HasSize
 (just like GWT does), as this makes coding a lot easier as the
 Communicators are basically composed of these smaller interfaces...

 + The number of if conditions and static methods is a measurement for your
 OO coding. The more if statement, and static method usage, the less your
 are coding OO (this comes from  the OO books).
 Anyway: I often use Singleton classes instead of static utility classes.
 The nice things of these singleton classes  is that you can change their
 implementation through deferred binding.
 Example: CmsKeyNames that contains all cms keys, or CmsFactory (factory
 pattern).
 Too often I started with static methods and then needed other return
 value's under certain conditions (other app), which is hard when using
 static method as you can't do anything with it.. Changing them can be a
 pain.

 + etc

 Yes, it all results in more 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 don't become
 too expensive.

 Above just came up, which I think contains some things you can use.
 Good luck.




 On Wed, Apr 10, 2013 at 9:35 AM, Mohammad Al Quraian 
 m4des...@gmail.comwrote:

 Yeah, I don't have any intentions in using any more frameworks. Let me
 ask you this, let's say that you have a page which has multiple panels and
 in each panel there are multiple widgets. How would you go about
 implementing that yourself? I'm especially interested in the case that you
 wanted for some of these widget to communicate with each other.

 In my design, I made a 'father' presenter that has a few 'children'
 presenters, the idea here is that these presenters can communicate with
 each other directly (father to children and vice versa), with the father
 having the overall control. Of course, each presenter controls its own view

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 someone would try to fix and update this sample app because it 
is very comprehensive and covers many aspects of GWT.

-- 
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?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.




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 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?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.




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 number of GWT projects for practicing, I also 
delete the gwt-unitCache folder every now and then.

Cheers gwters,
Mo

-- 
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?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.




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 
HasWidgetshttp://google-web-toolkit.googlecode.com/svn/javadoc/latest/com/google/gwt/user/client/ui/HasWidgets.htmlinterface.

I don't understand why.

-- 
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?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.




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 the previously loaded app, and start again 
(without stopping the devmode completely)?

-- 
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?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.




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
Yep that's the same issue. I hope it gets fixed.

Thanks Thomas.


On Wed, Mar 27, 2013 at 7:49 PM, Thomas Broyer t.bro...@gmail.com wrote:

 If you're using Firefox, there's a known memory leak:
 https://code.google.com/p/google-web-toolkit/issues/detail?id=7648


 On Wednesday, 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 ...)

 Even though I set the -xmx variable to -Xmx512m. Is there a way to clear
 to force the devmode to clear the previously loaded app, and start again
 (without stopping the devmode completely)?

  --
 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/sEGHR-H3IGc/unsubscribe?hl=en
 .
 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?hl=en.
 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?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.




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

2013-03-25 Thread Mohammad Al-Quraian
Thanks for the fix, do you know how can I change the locale/language (if 
that's possible)?
Or if it's possible to adopt to the locale of the browser?

Cheers

On Monday, March 25, 2013 7:09:09 PM UTC+3, Sebastián Gurin wrote:

 Problem fixed. That .jar contains 2 projects inside: 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:
 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


 On Thursday, March 21, 2013 10:22:15 PM UTC+3, Sebastián Gurin wrote:

 I just released a GWT wrapper for the nice JavaScript library momentjs (
 momentjs.com). It resulted on a small and easy to use alternative for 
 working with dates, calendars, intervals, date formats, date 
 internationalization, etc. 

 https://github.com/cancerberoSgx/momentgwt

 Hope it can be of help to somebody working with dates, calendars, etc. 



-- 
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?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.




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

2013-03-25 Thread Mohammad Al-Quraian
Thanks for your replies, I really appreciate that.
There's an issue with your code, I'm not sure if it's a bug or not.

It gives me this error:

com.google.gwt.core.client.JavaScriptException: (ReferenceError) 
@com.google.gwt.core.client.impl.Impl::apply(Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;)([JavaScript
 
object(7), JavaScript object(5), JavaScript object(13)]): langDef is not 
defined

It works if I changed it to:
Moment.lang(es, null);

On Monday, March 25, 2013 9:00:38 PM UTC+3, Sebastián Gurin wrote:

 yes is it possible. Take a look at http://momentjs.com/docs/#/i18n/ for 
 seeing how momentjs support internationalization (you must load an extra 
 .js with the desired language definitions). YOu can find all the locales 
 files here: https://github.com/timrwood/moment/tree/develop/min/lang

 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 UTC-3, Mohammad Al-Quraian wrote:

 Thanks for the fix, do you know how can I change the locale/language (if 
 that's possible)?
 Or if it's possible to adopt to the locale of the browser?

 Cheers

 On Monday, March 25, 2013 7:09:09 PM UTC+3, Sebastián Gurin wrote:

 Problem fixed. That .jar contains 2 projects inside: 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:
 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


 On Thursday, March 21, 2013 10:22:15 PM UTC+3, Sebastián Gurin wrote:

 I just released a GWT wrapper for the nice JavaScript library momentjs 
 (momentjs.com). It resulted on a small and easy to use alternative 
 for working with dates, calendars, intervals, date formats, date 
 internationalization, etc. 

 https://github.com/cancerberoSgx/momentgwt

 Hope it can be of help to somebody working with dates, calendars, etc. 



-- 
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?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.




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


On Thursday, March 21, 2013 10:22:15 PM UTC+3, Sebastián Gurin wrote:

 I just released a GWT wrapper for the nice JavaScript library momentjs (
 momentjs.com). It resulted on a small and easy to use alternative for 
 working with dates, calendars, intervals, date formats, date 
 internationalization, etc. 

 https://github.com/cancerberoSgx/momentgwt

 Hope it can be of help to somebody working with dates, calendars, etc. 


-- 
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?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.




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 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


 On Thursday, March 21, 2013 10:22:15 PM UTC+3, Sebastián Gurin wrote:

 I just released a GWT wrapper for the nice JavaScript library momentjs (
 momentjs.com). It resulted on a small and easy to use alternative for 
 working with dates, calendars, intervals, date formats, date 
 internationalization, etc. 

 https://github.com/cancerberoSgx/momentgwt

 Hope it can be of help to somebody working with dates, calendars, etc. 



-- 
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?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.




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 pedro.lama...@gmail.comwrote:



 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 the user's
 locale. I'm confused on whether the deferred binding (to create the list's
 internationalised content) should be in the presenter or in the view.
 I feel it should be in the presenter, however in my code the view is
 created before the presenter (as it should be I guess), so I
 can't initialise the view this way.


 By created you mean object allocated + constructor called?

 You can always add an init() method for initialization delayed to some
 point in the future. If you have a Resource object of some kind, you can
 think about this as dependency injection.

 --
  P.

 --
 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?hl=en.
 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?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.