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.


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: 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 
MessageFormathttp://docs.oracle.com/javase/7/docs/api/java/text/MessageFormat.htmlwhere
 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.


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 t.bro...@gmail.com 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: 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 ReceiverT() {

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

2013-11-27 Thread Moutellou
You can try the attribute 
placeholderhttp://www.w3schools.com/tags/att_input_placeholder.asp
.
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.


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.


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 
herehttps://developer.mozilla.org/en-US/docs/Web/API/XMLHttpRequest/Using_XMLHttpRequest
.)

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 
RequestBuilderhttp://www.gwtproject.org/javadoc/latest/com/google/gwt/http/client/RequestBuilder.html
 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 
XMLHttpRequesthttp://www.gwtproject.org/javadoc/latest/com/google/gwt/xhr/client/XMLHttpRequest.html
 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.


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.


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


Re: JPA for GWT

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


On Wed, Nov 27, 2013 at 9:26 PM, Ltearno ltea...@gmail.com 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: 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 subhrajyo...@gmail.com

 try Errai framework.


 On Wed, Nov 27, 2013 at 9:26 PM, Ltearno ltea...@gmail.com 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 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 ltea...@gmail.com

 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 subhrajyo...@gmail.com

 try Errai framework.


 On Wed, Nov 27, 2013 at 9:26 PM, Ltearno ltea...@gmail.com 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 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 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 jazzmatad...@gmail.com

 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 ltea...@gmail.com

 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 subhrajyo...@gmail.com

  try Errai framework.


 On Wed, Nov 27, 2013 at 9:26 PM, Ltearno ltea...@gmail.com 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 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 jens.nehlme...@gmail.com


- 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: 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: 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 https://code.google.com/p/google-web-toolkit/issues/detail?id=624#c23.
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 michael.gorsk...@googlemail.com

 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
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 https://code.google.com/p/google-web-toolkit/issues/detail?id=624#c23. 
 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 michael@googlemail.com javascript:

 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 javascript:.
 To post to this group, send email to 
 google-we...@googlegroups.comjavascript:
 .
 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.


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.


[gwt-contrib] Re: Unsupported browsers

2013-11-27 Thread Thomas Broyer


On Wednesday, November 27, 2013 1:13:30 AM UTC+1, Jens wrote:

 Currently, when a browser is unsupported (incl IE compatibility modes), 
 GWT falls back to gecko1_8. The problem is Firefox itself has its own bugs 
 and we have workarounds for those that will usually break the app in an 
 other browser.


 Are you sure? In our app we have removed the ie6/7 user.agent value and 
 when visiting our app with IE6/7 or IE compatibility mode no permutation is 
 selected. Thats why we configured a redirect to a static site in your load 
 balancers. Is it possible that we have somehow accidentally disabled this 
 gecko1_8 fallback mechanism?


I agree, I don't recall seeing anything related to falling back to 
gecko1_8, and UserAgentPropertyGenerator has a return 'unknown' as a 
fallback when no predicate matches.

Goktug, are you sure it's not an issue with your Server-Side 
Selection-Script?
 

  

 Instead of relying gecko1_8 as the fallback permutation, perhaps we can 
 provide a specific permutation for unsupported browsers. With this 
 permutation, most of the we can provide the standard implementation in 
 deferred bindings. The biggest advantage of this is, the app can handle it 
 in a way they see appropriate; e.g. provide an early shortcut to show a 
 warning page.

 Also another thing we might want to do is to make sure that an IE 
 permutation is used for the legacy browsers; IE8 would be a much better 
 match than gecko for IE6/7 and any compatibility mode.


 Falling back to a standards based permutation will be nice for new/unusual 
 browsers that might work with GWT but are not detected by GWT. Falling back 
 to an IE8 permutation for IE6/7 might work now but in a year IE8 is 
 probably gone anyways so I am not sure if its worth it. Also although the 
 JS code might work then, the UI is likely to not work very well if IE6/7 
 specific UI code has been deleted.

 What I like to see is something like:

 1.) A way to ask GWT at runtime if it runs in a fallback permutation 
 because it has failed to detect the browser (may it be a standards based 
 permutation or for IE a specific IE fallback permutation). This would allow 
 an app to provide a warning message. This is kind of an optimistic approach 
 as it could also happen that the app does not load at all.
 2.) A way to configure a redirect URL if GWT can not detect the browser 
 (or the browser is unsupported). That would be the pessimistic approach.


There's gwt:onPropertyErrorFn and gwt:onLoadErrorFn hooks (set the name 
of a JS func in a meta with that name; e.g. meta 
name=gwt:onPropertyErrorFn value=gwtErrFns.prop, and var gwtErrFns = { 
prop: function(propName, allowedValuesList, value) { 
window.location.replace(static/error.html); } })
 

 3.) A configuration property for developers to tell GWT if it should 
 choose approach 1.) or 2.)


 -- J.



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


[gwt-contrib] Re: GWT 2.7.0-SNAPSHOT in Google maven snapshot repo

2013-11-27 Thread Thomas Broyer


On Wednesday, November 27, 2013 1:03:26 AM UTC+1, Matthew Dempsky wrote:

 FYI, I've pushed out a build of master to Maven as 2.7.0-SNAPSHOT.


\o/

I won't have a use for it right now (except maybe updating the Maven plugin 
proactively and pushing snapshots as well), but thanks a lot for that 
anyway.

Just to be sure: this is not automatized yet, right?
 

 Not sure if the next release will be 2.7, but it needed *some* version 
 and that seemed as good as any.


Yup, seems like the best choice to date. 

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


Re: [gwt-contrib] Re: GWT 2.7.0-SNAPSHOT in Google maven snapshot repo

2013-11-27 Thread Matthew Dempsky
On Wed, Nov 27, 2013 at 1:40 AM, Thomas Broyer t.bro...@gmail.com wrote:

 Just to be sure: this is not automatized yet, right?


Not fully: I've got it mostly scripted, but it still needs me to manually
run it and enter a few values.  Assuming it's working, I'll try to automate
it or at least setup a calendar reminder to nag me to run it daily. :)

Thanks again to Colin for getting the maven scripts working for snapshots!

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


[gwt-contrib] Re: Unsupported browsers

2013-11-27 Thread Jens



 There's gwt:onPropertyErrorFn and gwt:onLoadErrorFn hooks (set the 
 name of a JS func in a meta with that name; e.g. meta 
 name=gwt:onPropertyErrorFn value=gwtErrFns.prop, and var gwtErrFns = { 
 prop: function(propName, allowedValuesList, value) { 
 window.location.replace(static/error.html); } })


I know. But they are not reliable. If you disable IE6 and IE8 permutation 
the bootstrap file still assigns a valid ie6, ie8 value to the user.agent 
property because the user.agent detection code does still contain the 
ie6/ie8 checks. onPropertyErrorFn will only be called if the user.agent 
value contains an invalid value. So to make it work way better the 
detection code should be aware of the enabled/disabled permutations and 
only do the required checks instead of all checks. That way the 
onPropertyErrorFn function would become useful for this scenario.

-- J.



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


[gwt-contrib] Re: Unsupported browsers

2013-11-27 Thread Thomas Broyer


On Wednesday, November 27, 2013 11:13:03 AM UTC+1, Jens wrote:


 There's gwt:onPropertyErrorFn and gwt:onLoadErrorFn hooks (set the 
 name of a JS func in a meta with that name; e.g. meta 
 name=gwt:onPropertyErrorFn value=gwtErrFns.prop, and var gwtErrFns = { 
 prop: function(propName, allowedValuesList, value) { 
 window.location.replace(static/error.html); } })


 I know. But they are not reliable. If you disable IE6 and IE8 permutation 
 the bootstrap file still assigns a valid ie6, ie8 value to the user.agent 
 property because the user.agent detection code does still contain the 
 ie6/ie8 checks. onPropertyErrorFn will only be called if the user.agent 
 value contains an invalid value. So to make it work way better the 
 detection code should be aware of the enabled/disabled permutations and 
 only do the required checks instead of all checks. That way the 
 onPropertyErrorFn function would become useful for this scenario.


If that's the case, then it means a PropertyProviderGenerator is called 
with the full list of possible values even when that list is restricted to 
a subset of them with set-property. I'd say it's a bug.
That said, it wouldn't be enough in some cases: imagine using a conditional 
set-property where ie9,gecko1_8 are enabled for locale=en and ie9,safari 
are enabled for locale=fr, the property provider would have to return 
either gecko1_8 or safari, and then depending on the locale a permutation 
would be found or not; which would be the same behavior as we have today if 
you disable a user.agent globally. In this case, onLoadErrorFn would be 
called IIRC. Are you saying onLoadErrorFn is not reliable?
(in all honesty, I never used them, I only ever read the code that calls 
them, and I haven't checked the exact behavior)

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


[gwt-contrib] Re: Unsupported browsers

2013-11-27 Thread Jens


  In this case, onLoadErrorFn would be called IIRC. Are you saying 
 onLoadErrorFn is not reliable?


onLoadErrorFn is only called if an unexpected exception occurs while 
starting an already selected permutation, so for example if onModuleLoad() 
fails. Each permutation defines a gwtOnLoad function which looks like

function gwtOnLoad(errFn, modName, modBase, softPermutationId){
  $moduleName = modName;
  $moduleBase = modBase;
  if (errFn)
try {
  $entry(init)();
}
 catch (e) {
  errFn(modName);
}
   else {
$entry(init)();
  }
}

with errFn being the onLoadErrorFn function passed in by the bootstrap 
script and $entry(init)() does a user agent runtime check and then executes 
onModuleLoad(). So this function works reliably but does not really help 
for unsupported browsers because if no permutation is selected this code 
can't be executed.

And as already noted the onPropertyErrorFn functions works slightly 
different than what I would expect thats why I called it unreliable. It 
only works if you use a browser that GWT does not know at all.

-- J.

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


[gwt-contrib] Re: Unsupported browsers

2013-11-27 Thread Jens


 And as already noted the onPropertyErrorFn functions works slightly 
 different than what I would expect thats why I called it unreliable. It 
 only works if you use a browser that GWT does not know at all.


To be exact: The method itself is of course reliable. It triggers if a 
property value is not valid, i.e. if its not in the set of defined/allowed 
values. It's just that its not that useful for the user.agent scenario as a 
slightly different behavior is desired in this case because the user.agent 
value is always correctly filled (regardless of permutations) unless you 
use a browser that is totally unknown to GWT.

-- J.

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