Dynamic Output?

2013-11-27 Thread Chris Williams
Hello,

I'm just learning GWT and I've noticed that there's no documentation about 
producing dynamic output. By which I mean the ability to, for example, make 
a call to a database and build that information into the HTML which is sent 
to the client. All of the information that I see requires the developer to 
make RPC calls for every bit of dynamic information, after the HTML has 
been downloaded.

I suspect that the RPC method is the only way, but I just wanted to verify 
that I wasn't missing something.

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: GWT FileUpload with Progress Listener

2013-11-27 Thread confile
I did not seen how to implement the progress listener in this post. Could 
you please post an example?


Am Mittwoch, 27. November 2013 18:49:42 UTC+1 schrieb Juan Pablo Gardella:
>
> See https://code.google.com/p/google-web-toolkit/issues/detail?id=624 comment 
> 23 . 
> I've implemented a file upload with a listener and had this problem and 
> solved it using the workaround described there.
>
> Juan
>
>
> 2013/11/27 confile >
>
>> Hi Jens, 
>>
>> thanks for your help. I know the concept but did not fully understand 
>> you. 
>>
>> 1. What do you mean by: "Don't forget to cleanup the event listener after 
>> you are done."?
>>
>> 2. Did I get you right on the following. Since I use the progress for 
>> file upload I have to use a FormPanel. 
>>
>> my progress listener class would be like: 
>>
>> class MyProgressListener {
>>   void onProgress(int loaded, int total) {
>>  // so something with the data
>>   }
>> }
>>
>> then I would do something like: 
>>
>> final FormPanel form = new FormPanel();
>> form.setAction("/myFormHandler");
>> form.setEncoding(FormPanel.ENCODING_MULTIPART); 
>> form.setMethod(FormPanel.METHOD_POST);
>>
>> VerticalPanel panel = new VerticalPanel();
>> form.setWidget(panel);
>>
>> FileUpload upload = new FileUpload();
>> upload.setName("file");
>> panel.add(upload);
>>
>> // Add a 'submit' button.
>> panel.add(new Button("Submit", new ClickHandler() {
>>   public void onClick(ClickEvent event) {
>> form.submit();
>>   }
>> }));
>>
>>
>> 3. How do I integrate the setProgressListener method in the FormPanel?
>>
>> Thanks for help.
>>
>>
>> Am Mittwoch, 27. November 2013 16:51:45 UTC+1 schrieb Jens:
>>
>>> Well if you already know the concept of JSNI then you can use it to add 
>>> a listener to GWT's XMLHttpRequest as its an ordinary JavaScriptObject. You 
>>> either extend it or create a utility method. Something along these lines 
>>> (probably not fully correct):
>>>
>>> public native void setProgressListener(MyProgressListener p) /*-{
>>>   this.upload.addEventListener("progress", function(event) {
>>> 
>>> p.@com.example.progress.MyProgressListener::onProgress(II)(event.loaded, 
>>> event.total);
>>>   }, false);
>>> }-*/;
>>>
>>> A utility method would have an additional XMLHttpRequest parameter and 
>>> use request.upload instead of this.upload.
>>>
>>> Don't forget to cleanup the event listener after you are done. Also note 
>>> that XMLHttpRequest.create() can return an IE specific object which might 
>>> not support the progress feature or which requires you do register the 
>>> listener differently. So your implementation might be a bit more 
>>> complicated depending on your browser support requirements.
>>>
>>> -- 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-we...@googlegroups.com
>> .
>> Visit this group at http://groups.google.com/group/google-web-toolkit.
>> For more options, visit https://groups.google.com/groups/opt_out.
>>
>
>

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


Re: GWT FileUpload with Progress Listener

2013-11-27 Thread Juan Pablo Gardella
See https://code.google.com/p/google-web-toolkit/issues/detail?id=624 comment
23 .
I've implemented a file upload with a listener and had this problem and
solved it using the workaround described there.

Juan


2013/11/27 confile 

> Hi Jens,
>
> thanks for your help. I know the concept but did not fully understand you.
>
> 1. What do you mean by: "Don't forget to cleanup the event listener after
> you are done."?
>
> 2. Did I get you right on the following. Since I use the progress for file
> upload I have to use a FormPanel.
>
> my progress listener class would be like:
>
> class MyProgressListener {
>   void onProgress(int loaded, int total) {
>  // so something with the data
>   }
> }
>
> then I would do something like:
>
> final FormPanel form = new FormPanel();
> form.setAction("/myFormHandler");
> form.setEncoding(FormPanel.ENCODING_MULTIPART);
> form.setMethod(FormPanel.METHOD_POST);
>
> VerticalPanel panel = new VerticalPanel();
> form.setWidget(panel);
>
> FileUpload upload = new FileUpload();
> upload.setName("file");
> panel.add(upload);
>
> // Add a 'submit' button.
> panel.add(new Button("Submit", new ClickHandler() {
>   public void onClick(ClickEvent event) {
> form.submit();
>   }
> }));
>
>
> 3. How do I integrate the setProgressListener method in the FormPanel?
>
> Thanks for help.
>
>
> Am Mittwoch, 27. November 2013 16:51:45 UTC+1 schrieb Jens:
>
>> Well if you already know the concept of JSNI then you can use it to add a
>> listener to GWT's XMLHttpRequest as its an ordinary JavaScriptObject. You
>> either extend it or create a utility method. Something along these lines
>> (probably not fully correct):
>>
>> public native void setProgressListener(MyProgressListener p) /*-{
>>   this.upload.addEventListener("progress", function(event) {
>> p.@com.example.progress.MyProgressListener::onProgress(II)(event.loaded,
>> event.total);
>>   }, false);
>> }-*/;
>>
>> A utility method would have an additional XMLHttpRequest parameter and
>> use request.upload instead of this.upload.
>>
>> Don't forget to cleanup the event listener after you are done. Also note
>> that XMLHttpRequest.create() can return an IE specific object which might
>> not support the progress feature or which requires you do register the
>> listener differently. So your implementation might be a bit more
>> complicated depending on your browser support requirements.
>>
>> -- 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.
>

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


Re: GWT FileUpload with Progress Listener

2013-11-27 Thread confile
Hi Jens, 

thanks for your help. I know the concept but did not fully understand you. 

1. What do you mean by: "Don't forget to cleanup the event listener after 
you are done."?

2. Did I get you right on the following. Since I use the progress for file 
upload I have to use a FormPanel. 

my progress listener class would be like: 

class MyProgressListener {
  void onProgress(int loaded, int total) {
 // so something with the data
  }
}

then I would do something like: 

final FormPanel form = new FormPanel();
form.setAction("/myFormHandler");
form.setEncoding(FormPanel.ENCODING_MULTIPART); 
form.setMethod(FormPanel.METHOD_POST);

VerticalPanel panel = new VerticalPanel();
form.setWidget(panel);

FileUpload upload = new FileUpload();
upload.setName("file");
panel.add(upload);

// Add a 'submit' button.
panel.add(new Button("Submit", new ClickHandler() {
  public void onClick(ClickEvent event) {
form.submit();
  }
}));


3. How do I integrate the setProgressListener method in the FormPanel?

Thanks for help.


Am Mittwoch, 27. November 2013 16:51:45 UTC+1 schrieb Jens:
>
> Well if you already know the concept of JSNI then you can use it to add a 
> listener to GWT's XMLHttpRequest as its an ordinary JavaScriptObject. You 
> either extend it or create a utility method. Something along these lines 
> (probably not fully correct):
>
> public native void setProgressListener(MyProgressListener p) /*-{
>   this.upload.addEventListener("progress", function(event) {
> 
> p.@com.example.progress.MyProgressListener::onProgress(II)(event.loaded, 
> event.total);
>   }, false);
> }-*/;
>
> A utility method would have an additional XMLHttpRequest parameter and use 
> request.upload instead of this.upload.
>
> Don't forget to cleanup the event listener after you are done. Also note 
> that XMLHttpRequest.create() can return an IE specific object which might 
> not support the progress feature or which requires you do register the 
> listener differently. So your implementation might be a bit more 
> complicated depending on your browser support requirements.
>
> -- 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: JPA for GWT

2013-11-27 Thread Arnaud TOURNIER
I completely agree with this point ! It should be fast enough so that
browser doesn't seem sluggish.

Arnaud


2013/11/27 Jens 

>
>>- You can only execute very simple queries,
>>- You cannot use any joins or nested attribute retrieval,
>>- All queries should be parsable at compile time. That means you
>>cannot generate dynamic queries during your application run,
>>- Transactions are not possible,
>>- You can have only one persistence context,
>>- The GROUP BY clause is not supported...
>>
>> That's why a REAL JPA implementation is missing...
>>
>
>
> Maybe you should reach out to Errai and check if there were good reasons
> to have these restrictions. My feeling is that a "real jpa" implementation
> would result in too much overhead from a code size point of view as well as
> runtime overhead. If a real JPA implementation will cause the browser to
> hang every now and then if things get a bit more complicated then no one
> will use it. A browser that feels sluggish because of a library is a no-go.
>
>
> -- 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/8k_pqIciRHQ/unsubscribe
> .
> To unsubscribe from this group and all its topics, send an email to
> google-web-toolkit+unsubscr...@googlegroups.com.
> To post to this group, send email to google-web-toolkit@googlegroups.com.
> Visit this group at http://groups.google.com/group/google-web-toolkit.
> For more options, visit https://groups.google.com/groups/opt_out.
>

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


Re: JPA for GWT

2013-11-27 Thread Arnaud TOURNIER
The problem is that Errai is not supported by an underlying powerful SQL
implementation. That's why they say those features will *never *be
implemented, because that's not possible with their underlying data storage
management (i guess but i am not 100% sure, that they use the LocalStorage
which is just a key/value map, and they then build a minimal subset of JPA
on top of it)

So anyway, that would mean rewriting a lot of code in the Errai project,
which is great by the way.

Thanks
Arnaud


2013/11/27 Alain Ekambi 

> ERRAI is open source. Why not extend or contribuate to it instead of
> rolling with a  yet a new library ?
> Sounds good though :)
>
>
> 2013/11/27 Arnaud TOURNIER 
>
>> Yes i know ERRAI but :
>>
>>
>>- You can only execute very simple queries,
>>- You cannot use any joins or nested attribute retrieval,
>>- All queries should be parsable at compile time. That means you
>>cannot generate dynamic queries during your application run,
>>- Transactions are not possible,
>>- You can have only one persistence context,
>>- The GROUP BY clause is not supported...
>>
>> That's why a REAL JPA implementation is missing...
>>
>> Thanks !
>> Arnaud
>>
>>
>> 2013/11/27 Subhrajyoti Moitra 
>>
>>>  try Errai framework.
>>>
>>>
>>> On Wed, Nov 27, 2013 at 9:26 PM, Ltearno  wrote:
>>>
 Hi everybody,

 I am planning to implement a fully compliant JPA library for GWT. But
 before i do so, i need to first know whether people would be interested by
 such a project.

 So here is a survey that i ask you to fill, it will help me to focus on
 most important features first.

 http://www.lteconsulting.fr/jpa-for-gwt.html

 Thank you all !
 Arnaud Tournier
 http://www.lteconsulting.fr

 --
 You received this message because you are subscribed to the Google
 Groups "Google Web Toolkit" group.
 To unsubscribe from this group and stop receiving emails from it, send
 an email to google-web-toolkit+unsubscr...@googlegroups.com.

 To post to this group, send email to
 google-web-toolkit@googlegroups.com.
 Visit this group at http://groups.google.com/group/google-web-toolkit.
 For more options, visit https://groups.google.com/groups/opt_out.

>>>
>>>  --
>>> 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/8k_pqIciRHQ/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.
>>
>
>  --
> 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/8k_pqIciRHQ/unsubscribe
> .
> To unsubscribe from this group and all its topics, send an email to
> google-web-toolkit+unsubscr...@googlegroups.com.
> To post to this group, send email to google-web-toolkit@googlegroups.com.
> Visit this group at http://groups.google.com/group/google-web-toolkit.
> For more options, visit https://groups.google.com/groups/opt_out.
>

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


Re: JPA for GWT

2013-11-27 Thread Jens

>
>
>- You can only execute very simple queries, 
>- You cannot use any joins or nested attribute retrieval, 
>- All queries should be parsable at compile time. That means you 
>cannot generate dynamic queries during your application run, 
>- Transactions are not possible, 
>- You can have only one persistence context, 
>- The GROUP BY clause is not supported...
>
> That's why a REAL JPA implementation is missing...
>


Maybe you should reach out to Errai and check if there were good reasons to 
have these restrictions. My feeling is that a "real jpa" implementation 
would result in too much overhead from a code size point of view as well as 
runtime overhead. If a real JPA implementation will cause the browser to 
hang every now and then if things get a bit more complicated then no one 
will use it. A browser that feels sluggish because of a library is a no-go.


-- 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: JPA for GWT

2013-11-27 Thread Alain Ekambi
ERRAI is open source. Why not extend or contribuate to it instead of
rolling with a  yet a new library ?
Sounds good though :)


2013/11/27 Arnaud TOURNIER 

> Yes i know ERRAI but :
>
>
>- You can only execute very simple queries,
>- You cannot use any joins or nested attribute retrieval,
>- All queries should be parsable at compile time. That means you
>cannot generate dynamic queries during your application run,
>- Transactions are not possible,
>- You can have only one persistence context,
>- The GROUP BY clause is not supported...
>
> That's why a REAL JPA implementation is missing...
>
> Thanks !
> Arnaud
>
>
> 2013/11/27 Subhrajyoti Moitra 
>
>> try Errai framework.
>>
>>
>> On Wed, Nov 27, 2013 at 9:26 PM, Ltearno  wrote:
>>
>>> Hi everybody,
>>>
>>> I am planning to implement a fully compliant JPA library for GWT. But
>>> before i do so, i need to first know whether people would be interested by
>>> such a project.
>>>
>>> So here is a survey that i ask you to fill, it will help me to focus on
>>> most important features first.
>>>
>>> http://www.lteconsulting.fr/jpa-for-gwt.html
>>>
>>> Thank you all !
>>> Arnaud Tournier
>>> http://www.lteconsulting.fr
>>>
>>> --
>>> You received this message because you are subscribed to the Google
>>> Groups "Google Web Toolkit" group.
>>> To unsubscribe from this group and stop receiving emails from it, send
>>> an email to google-web-toolkit+unsubscr...@googlegroups.com.
>>>
>>> To post to this group, send email to google-web-toolkit@googlegroups.com
>>> .
>>> Visit this group at http://groups.google.com/group/google-web-toolkit.
>>> For more options, visit https://groups.google.com/groups/opt_out.
>>>
>>
>>  --
>> 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/8k_pqIciRHQ/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.
>

-- 
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: JPA for GWT

2013-11-27 Thread Arnaud TOURNIER
Yes i know ERRAI but :


   - You can only execute very simple queries,
   - You cannot use any joins or nested attribute retrieval,
   - All queries should be parsable at compile time. That means you cannot
   generate dynamic queries during your application run,
   - Transactions are not possible,
   - You can have only one persistence context,
   - The GROUP BY clause is not supported...

That's why a REAL JPA implementation is missing...

Thanks !
Arnaud


2013/11/27 Subhrajyoti Moitra 

> try Errai framework.
>
>
> On Wed, Nov 27, 2013 at 9:26 PM, Ltearno  wrote:
>
>> Hi everybody,
>>
>> I am planning to implement a fully compliant JPA library for GWT. But
>> before i do so, i need to first know whether people would be interested by
>> such a project.
>>
>> So here is a survey that i ask you to fill, it will help me to focus on
>> most important features first.
>>
>> http://www.lteconsulting.fr/jpa-for-gwt.html
>>
>> Thank you all !
>> Arnaud Tournier
>> http://www.lteconsulting.fr
>>
>> --
>> You received this message because you are subscribed to the Google Groups
>> "Google Web Toolkit" group.
>> To unsubscribe from this group and stop receiving emails from it, send an
>> email to google-web-toolkit+unsubscr...@googlegroups.com.
>>
>> To post to this group, send email to google-web-toolkit@googlegroups.com.
>> Visit this group at http://groups.google.com/group/google-web-toolkit.
>> For more options, visit https://groups.google.com/groups/opt_out.
>>
>
>  --
> 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/8k_pqIciRHQ/unsubscribe
> .
> To unsubscribe from this group and all its topics, send an email to
> google-web-toolkit+unsubscr...@googlegroups.com.
> To post to this group, send email to google-web-toolkit@googlegroups.com.
> Visit this group at http://groups.google.com/group/google-web-toolkit.
> For more options, visit https://groups.google.com/groups/opt_out.
>

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


Re: JPA for GWT

2013-11-27 Thread Subhrajyoti Moitra
try Errai framework.


On Wed, Nov 27, 2013 at 9:26 PM, Ltearno  wrote:

> Hi everybody,
>
> I am planning to implement a fully compliant JPA library for GWT. But
> before i do so, i need to first know whether people would be interested by
> such a project.
>
> So here is a survey that i ask you to fill, it will help me to focus on
> most important features first.
>
> http://www.lteconsulting.fr/jpa-for-gwt.html
>
> Thank you all !
> Arnaud Tournier
> http://www.lteconsulting.fr
>
> --
> You received this message because you are subscribed to the Google Groups
> "Google Web Toolkit" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to google-web-toolkit+unsubscr...@googlegroups.com.
> To post to this group, send email to google-web-toolkit@googlegroups.com.
> Visit this group at http://groups.google.com/group/google-web-toolkit.
> For more options, visit https://groups.google.com/groups/opt_out.
>

-- 
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: Building the dev plugin for firefox

2013-11-27 Thread navels
I see.  My thinking was to be able to unblock our team more quickly by 
fixing compatibility issues right away rather than waiting for an official 
update, which can take several days.  Of course we aren't really blocked, 
there is just some thrash for the folks who take FF updates immediately.

This would be on Ubuntu Linux.  I would not be inclined to go to the 
trouble (the thrash isn't that bad) unless I could contribute.  If in order 
to submit a patch I would be required to build/test on Windows, ain't 
happening, but if Linux is sufficient, then yeah, if you could put out 
non-Google-specific build instructions, that would be great.

Thanks,
Lee


On Tuesday, November 26, 2013 2:30:36 PM UTC-8, Brian Slesinsky wrote:
>
> It's fairly complicated to build because we have to do a C++ compile 
> against the latest XulRunner SDK on three platforms and assemble the 
> results. Furthermore, converting a new XulRunner SDK into the format needed 
> to do the build is a partially manual process. But if you just want to 
> build on one platform (Linux or Mac, preferably) for a Firefox release we 
> already support, it should be easier and that should be enough to get 
> started. And yes, we'd like to accept patches.
>
> I have a document with the build procedure, but it contains 
> Google-specific steps. If you're seriously interested then I could publish 
> a cleaned-up version.
>
> - Brian
>
> On Tuesday, November 26, 2013 8:33:00 AM UTC-8, navels wrote:
>>
>> What are the general steps involved to build the firefox plugin?  How 
>> involved are the fixes to maintain compatibility with new FF releases? 
>>  (I'm sure it depends on the release, but is there a general level of 
>> complexity.)
>>
>> Would I be able to contribute patches?
>>
>>
>>

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


JPA for GWT

2013-11-27 Thread Ltearno
Hi everybody,

I am planning to implement a fully compliant JPA library for GWT. But 
before i do so, i need to first know whether people would be interested by 
such a project.

So here is a survey that i ask you to fill, it will help me to focus on 
most important features first.

http://www.lteconsulting.fr/jpa-for-gwt.html

Thank you all !
Arnaud Tournier
http://www.lteconsulting.fr

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


Re: GWT FileUpload with Progress Listener

2013-11-27 Thread Jens
Well if you already know the concept of JSNI then you can use it to add a 
listener to GWT's XMLHttpRequest as its an ordinary JavaScriptObject. You 
either extend it or create a utility method. Something along these lines 
(probably not fully correct):

public native void setProgressListener(MyProgressListener p) /*-{
  this.upload.addEventListener("progress", function(event) {

p.@com.example.progress.MyProgressListener::onProgress(II)(event.loaded, 
event.total);
  }, false);
}-*/;

A utility method would have an additional XMLHttpRequest parameter and use 
request.upload instead of this.upload.

Don't forget to cleanup the event listener after you are done. Also note 
that XMLHttpRequest.create() can return an IE specific object which might 
not support the progress feature or which requires you do register the 
listener differently. So your implementation might be a bit more 
complicated depending on your browser support requirements.

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


GWT FileUpload with Progress Listener

2013-11-27 Thread confile


 want to observe the upload percentage of a file upload from GWT.

In JavaScript you can use a XMLHttpRequest and add an event listener like 
this:

var oReq = new XMLHttpRequest();

oReq.upload.addEventListener("progress", updateProgress, false);
// progress on transfers from the server to the client (downloads)
function updateProgress (oEvent) {
  if (oEvent.lengthComputable) {
var percentComplete = oEvent.loaded / oEvent.total;
// ...
  } else {
// Unable to compute progress information since the total size is unknown
  }}

(The above code is from 
here
.)

This is also done very easily in jQuery as:

 var $request = $.ajax({
  xhr: function() {
xhrNativeObject = new window.XMLHttpRequest();
//Upload progress
xhrNativeObject.upload.addEventListener("progress", function(event) { 
... }
  }
 });

I want to do the same with GWT. I could use a 
RequestBuilder
 to 
send a request, but this is only a high level wrapper around the 
XMLHttpRequest JavaScriot object. Another possibility would be to use the 
GWT 
XMLHttpRequest
 class 
which is a JSNI wrapper of the JavaScript XMLHttpRequest.

My problem:

*How can I add a progress listener to the XMLHttpRequest or the 
RequestBuilder?*

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


Split Report Analysis - Makes sense?

2013-11-27 Thread Joel
I'm having trouble code splitting, and understanding the analysis report.

com.invodo.shelby.client.video.reporting.OverviewActivity::start
   
   - com.google.gwt.activity.shared.ActivityManager::$tryStart

This seems to say that the base GWT ActivityManager may call my activity, 
therefore its including it in the initial download. I find that odd... How 
could I ever split that, the GWT ActivityManager is capable of starting all 
the activities I create.

-- 
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: Default value in empty TextBox

2013-11-27 Thread Moutellou
You can try the attribute 
placeholder
.
getElement().setPropertyString("placeholder", "default value")

On Thursday, February 7, 2008 9:10:17 AM UTC-5, Brock Parker wrote:
>
> Hello, 
>
> Is there anything built into GWT to display a value in a TextBox if 
> the field is emtpy?  This value would disappear once the user clicked 
> in the field and started typing.  I have seen this functionality on 
> several Google web pages (i.e. the Contacts page in GMail) but I can't 
> find anything in the documentation or samples about it. 
>
> Thanks, 
>
> Brock

-- 
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: Re-firing a failed/rejected server call in RequestFactory, is this possible?

2013-11-27 Thread Arlo O'Keeffe
Jan and I further looked into the issue and actually found a working 
solution that is "less hacky" than Eric's.

private void setupRequest(UserRequest request, UserProxy proxy) {
final UserProxy editableProxy = request.edit(proxy);
editorDriver.edit(editableProxy, request);
request.save(editableProxy).to(new Receiver() {

@Override
public void onFailure(ServerFailure error) {
...
setupRequest(getRequest(), editableProxy);
}

@Override
public void onConstraintViolation(
...
}

@Override
public void onSuccess(T response) {
...
}

});
}

This keeps the data around and allows "re-firing" the request.

The explicit request.edit() is necessary because otherwise the entered data 
is lost when another failure occurs.

Am Dienstag, 26. November 2013 18:33:22 UTC+1 schrieb Thomas Broyer:
>
> I don't disagree. A non-reachable database is likely to trigger a "global 
> failure" though (in steps 1 or 4 from my previous message), that, IIRC 
> should make the RequestContext "reusable" (it does in some cases, I just 
> can't remember which ones)
> That said, you could also handle the error on the server-side and replay 
> the request yourself (and I'm not saying it's easy!)
>
> On Tuesday, November 26, 2013 4:59:38 PM UTC+1, Jan Marten wrote:
>>
>> Thank you for clarifying the behavior.
>>
>> Nevertheless, in my opinion there is a use-case where the data should be 
>> reusable after a server failure.
>>
>> SQL exceptions like a unique constraint violation could be checked before 
>> sending the request but 
>> there might be server failures like a non-reachable database which is 
>> unpredictable.
>>
>> When something like this happens one could prompt the user to retry after 
>> a few minutes.
>> But since the request cannot be reused the user cannot resend it's 
>> entered data.
>>
>> Am Dienstag, 26. November 2013 16:25:06 UTC+1 schrieb Thomas Broyer:
>>>
>>>
>>>
>>> On Tuesday, November 26, 2013 4:10:08 PM UTC+1, Jan Marten wrote:

 The inconsistency with the current RequestFactory is that if in a batch 
 request, a single sub-request has a constraint violation

>>>
>>> There's no inconsistency, because that's not how things work.
>>>
>>>
>>>1. All objects (entities and "value objects") are "deserialized" 
>>>from the request (for entities, it involves first retrieving them from 
>>> the 
>>>data store)
>>>2. Then they're all validated. If there's a constraint violation, 
>>>things stop here and you'll have onConstraintViolations on the 
>>> client-side, 
>>>in each and every Receiver attached to the RequestContext (i.e. or one 
>>> of 
>>>its Requests/InstanceRequests)
>>>3. Otherwise, "invocations" are processed, in the same order they 
>>>were added to the RequestContext on client side. Each invocation either 
>>>succeeds or fails, and the onSuccess or onFailure will be called 
>>>accordingly on the client side for the corresponding Receiver. The 
>>>exception raised might be a ConstraintViolationException, it doesn't 
>>> change 
>>>anything: onFailure (not onConstraintViolation) will be called for the 
>>>appropriate Receiver (not all receivers)
>>>4. Then all entities (including those returned by "invocations") are 
>>>checked for "liveness", to tell the client which kind of 
>>> EntityProxyChange 
>>>event to fire (PERSIST/UPDATE/DELETE)
>>>5. And finally the response is constructed, with serialized objects, 
>>>etc.
>>>
>>>  
>>>
 then onConstraintViolation is called for every sub-request and the 
 whole batch request fails (onFailure is called).
 Whereas if in a sub-request an exception is raised on the server only 
 for this single sub-request onFailure is called and the surrounding
 batch-request succeeds with onSuccess.

>>>
>>>  
>>>
 Thus, the RequestContext cannot be reused since "reuse" is only called 
 for constraint violations and failures.

 Hence, as described in the original post, after a server failure the 
 proxy cannot be reused and the user-entered data is gone (in contrast to a 
 constraint violation).

>>>
>>> Yes. Exceptions are meant to be "exceptional", you should use a "return 
>>> value" to convey errors. In other words, onFailure should never be called, 
>>> unless something *unpredictable* happens.
>>>
>>

-- 
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: i18n Messages and the need for double quotes to generate a single quote

2013-11-27 Thread Raphael André Bauer
On Wed, Nov 27, 2013 at 10:46 AM, Thomas Broyer  wrote:
>
>
> On Wednesday, November 27, 2013 10:23:51 AM UTC+1, Raphael Bauer wrote:
>>
>> Hi,
>>
>>
>>
>> we are currently translating one of our applications.
>> We are using regular properties files that generate a
>> com.google.gwt.i18n.client.Messages interface.
>>
>> One "strange" thing for us is that our translation department has to
>> use double quotes to generate single
>> quotes in those files ('' => ').
>
>
> Note: it's not "a double quote" (U+0022) but "two single quotes" (U+0027
> U+0027)

Actually that's what I meant - bad English lang skills I guess ;)

>
>>
>> Of course we could use the Constants
>> interface, but this would not allow us to
>> use placeholders.
>>
>> So I am wondering if I am missing something obvious. Is there a way
>> around the need to double the quotes all
>> the time?
>
>
> No. This constraint/feature comes from Java's own MessageFormat where U+0027
> has a special meaning.
> In other words, you'd have the same issue if you used MessageFormat in your
> Java code (server side, desktop app, mobile app, etc.)

Good to know...

Thanks for your answer!


Best,

Raphael

-- 
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: i18n Messages and the need for double quotes to generate a single quote

2013-11-27 Thread Thomas Broyer


On Wednesday, November 27, 2013 10:23:51 AM UTC+1, Raphael Bauer wrote:
>
> Hi, 
>
>
>
> we are currently translating one of our applications. 
> We are using regular properties files that generate a 
> com.google.gwt.i18n.client.Messages interface. 
>
> One "strange" thing for us is that our translation department has to 
> use double quotes to generate single 
> quotes in those files ('' => ').


Note: it's not "a double quote" (U+0022) but "two single quotes" (U+0027 
U+0027)
 

> Of course we could use the Constants 
> interface, but this would not allow us to 
> use placeholders. 
>
> So I am wondering if I am missing something obvious. Is there a way 
> around the need to double the quotes all 
> the time?
>

No. This constraint/feature comes from Java's own 
MessageFormatwhere
 U+0027 has a special meaning.
In other words, you'd have the same issue if you used MessageFormat in your 
Java code (server side, desktop app, mobile app, 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.
For more options, visit https://groups.google.com/groups/opt_out.


i18n Messages and the need for double quotes to generate a single quote

2013-11-27 Thread Raphael André Bauer
Hi,



we are currently translating one of our applications.
We are using regular properties files that generate a
com.google.gwt.i18n.client.Messages interface.

One "strange" thing for us is that our translation department has to
use double quotes to generate single
quotes in those files ('' => '). Of course we could use the Constants
interface, but this would not allow us to
use placeholders.

So I am wondering if I am missing something obvious. Is there a way
around the need to double the quotes all
the time?


Any suggestion welcome!

Thanks!


Raphael

-- 
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: Default value in empty TextBox

2013-11-27 Thread Zied Hamdi
Hi all,

There is ready version (among other widgets) in the buttom of this page 
http://1vu-widgets.appspot.com/IntoGwt.html

The project homepage is 
https://code.google.com/p/advanced-suggest-select-box/

Best regards


On Wednesday, March 19, 2008 7:25:53 AM UTC+1, Christopher wrote:
>
> Thanks for the code. Here's my extension of it: 
>
> public class DefaultTextBox extends TextBox implements FocusListener { 
> String defaultText; 
> boolean defaultTextMode = false; 
>
> public DefaultTextBox(String defaultText) { 
> setDefaultText(defaultText); 
> setDefaultTextMode(); 
> addFocusListener(this); 
> } 
>
> public String getDefaultText() { 
> return defaultText; 
> } 
>
> public String getText() { 
> if (!defaultTextMode) { 
> return super.getText(); 
> } else { 
> return ""; 
> } 
> } 
>
> public void onFocus(Widget sender) { 
> if (defaultTextMode) { 
> setNormalTextMode(); 
> } 
> } 
>
> public void onLostFocus(Widget sender) { 
> if (getText().length() == 0) { 
> setDefaultTextMode(); 
> } 
> } 
>
> public void setDefaultText(String defaultText) { 
> this.defaultText = defaultText; 
> if (defaultTextMode) { 
> setDefaultTextMode();// Refresh 
> } 
> } 
>
> void setDefaultTextMode() { 
> assert super.getText().length() == 0; 
> super.setText(defaultText); 
> addStyleDependentName("default"); 
> defaultTextMode = true; 
> } 
>
> void setNormalTextMode() { 
> assert super.getText().length() != 0; 
> super.setText(""); 
> removeStyleDependentName("default"); 
> defaultTextMode = false; 
> } 
>
> public void setText(String text) { 
> super.setText(text); 
> if (text.length() == 0) { 
> setDefaultTextMode(); 
> } else { 
> setNormalTextMode(); 
> } 
> } 
> } 
>
> Cheers, 
> -C

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