popup window

2020-10-20 Thread Benjamin Cuthbert
all,

does anyone have an example of a popup window that opens a new browser 
window. I would like to dock and existing widget outside of the current 
browser window.

-- 








_This message, including any attachments, may include private, 
privileged and confidential information and is intended only for the 
personal and confidential use of the intended recipient(s). If the reader 
of this message is not an intended recipient, you are hereby notified that 
any review, use, dissemination, distribution, printing or copying of this 
message or its contents is strictly prohibited and may be unlawful. If you 
are not an intended recipient or have received this communication in error, 
please immediately notify the sender by telephone and/or a reply email and 
permanently delete the original message, including any attachments, without 
making a copy._

-- 
You received this message because you are subscribed to the Google Groups "GWT 
Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to google-web-toolkit+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/google-web-toolkit/78a4a909-9443-4c78-92aa-8cbeb07081b5n%40googlegroups.com.


Re: Emulating CompletableFuture with Promise

2017-09-06 Thread Benjamin DeLillo
I decided to package this up in a standalone library so it can be used 
until such time that it makes it into a GWT release.

https://github.com/OneGeek/GWT-CompletableFuture

On Monday, September 5, 2016 at 4:47:10 AM UTC-4, Andrei Korzhevskii wrote:
>
> I guess you need to super-source this class so the gwt compiler could use 
> it.
>
> You can take a look at my initial CompletableFuture implementation here:
>
> https://github.com/nordligulv/gwt/tree/completable-future
>
> https://github.com/nordligulv/gwt/commit/ea70c5358bac3c939cb0c1628a58ccc462cd7423
>
> Feel free to use it but note that I haven't tested it properly yet.
>
>
>
> On Monday, September 5, 2016 at 3:28:27 AM UTC+3, Ian Preston wrote:
>>
>> I'm trying to emulate CompletableFuture by backing directly onto Promise, 
>> but when compiling it gives this error: 
>> "No source code is available for type 
>> java.util.concurrent.CompletableFuture"
>> (it finds other JRE classes I've replaced fine)
>>
>> My source I'm including is below. Am I doing anything illegal?
>> 
>> package java.util.concurrent;
>>
>> import com.google.gwt.user.client.*;
>> import jsinterop.annotations.*;
>>
>> import java.util.function.*;
>>
>> @JsType(isNative=true, name = "Promise", namespace = JsPackage.GLOBAL)
>> public class CompletableFuture implements CompletionStage {
>>
>> @JsMethod(name = "then")
>> public native  CompletableFuture thenApply(Function> extends U> fn);
>>
>> @JsMethod(name = "then")
>> public native CompletableFuture thenAccept(Consumer 
>> action);
>>
>> @JsMethod(name = "then")
>> public native  CompletableFuture thenCompose(Function> T, ? extends CompletionStage> fn);
>>
>> @JsMethod(name = "reject")
>> public native boolean completeExceptionally(Throwable ex);
>>
>> @JsMethod(name = "resolve")
>> public native boolean complete(T value);
>>
>> @JsMethod(name = "resolve")
>> public static native  CompletableFuture completedFuture(U 
>> value);
>>
>> @JsOverlay
>> public T get() throws InterruptedException, ExecutionException {
>> Window.alert("Calling synchronous get() on CompletableFuture is 
>> not possible in Javascript!");
>> throw new IllegalStateException("Unimplemented!");
>> }
>> }
>>
>

-- 
You received this message because you are subscribed to the Google Groups "GWT 
Users" 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 https://groups.google.com/group/google-web-toolkit.
For more options, visit https://groups.google.com/d/optout.


Re: Project structure in IntelliJ

2016-03-01 Thread Benjamin Tillman
No worries, that will be my next stop. I just thought another GWT / 
IntelliJ user might have already figured this out.

Cheers,
Ben.

On Tuesday, 1 March 2016 21:44:16 UTC+11, Thomas Broyer wrote:
>
> You may want to contact JetBrains' support directly: 
> https://www.jetbrains.com/support/
> (hey, you paid for their product after all!)
>
> On Monday, February 29, 2016 at 7:21:44 PM UTC+1, Benjamin Tillman wrote:
>>
>> Maybe I'm just missing something, but I can't find a way to stray from 
>> IntelliJ's suggested package structure for GWT apps (see this link 
>> <https://www.jetbrains.com/idea/help/developing-gwt-components.html>).
>>
>> For example, if I have an application organised using a standard Maven 
>> directory layout, I'd like to place my module file (module.gwt.xml) in the 
>> src/main/resources/com/example/ folder, but this breaks IntelliJ's GWT 
>> build (the GWT compiler simply reports back it can't find module.gwt.xml on 
>> the classpath). Including src/main/resources/ as a content root in 
>> IntelliJ's project structure window doesn't seem to make any difference 
>> either.
>>
>> It's the same deal for my GSS files, but in this case it's even more 
>> annoying because as soon as my GSS files are outside of src/main/java then 
>> I lose some IDE support for those files too.
>>
>> I can build with Maven or Gradle no problems, but I'm wondering if it's 
>> possible to get IntelliJ to do the same. Mostly for the IDE support, but 
>> just in general would be great.
>>
>> Cheers,
>> Ben.
>>
>

-- 
You received this message because you are subscribed to the Google Groups "GWT 
Users" 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 https://groups.google.com/group/google-web-toolkit.
For more options, visit https://groups.google.com/d/optout.


Project structure in IntelliJ

2016-02-29 Thread Benjamin Tillman
Maybe I'm just missing something, but I can't find a way to stray from 
IntelliJ's suggested package structure for GWT apps (see this link 
).

For example, if I have an application organised using a standard Maven 
directory layout, I'd like to place my module file (module.gwt.xml) in the 
src/main/resources/com/example/ folder, but this breaks IntelliJ's GWT 
build (the GWT compiler simply reports back it can't find module.gwt.xml on 
the classpath). Including src/main/resources/ as a content root in 
IntelliJ's project structure window doesn't seem to make any difference 
either.

It's the same deal for my GSS files, but in this case it's even more 
annoying because as soon as my GSS files are outside of src/main/java then 
I lose some IDE support for those files too.

I can build with Maven or Gradle no problems, but I'm wondering if it's 
possible to get IntelliJ to do the same. Mostly for the IDE support, but 
just in general would be great.

Cheers,
Ben.

-- 
You received this message because you are subscribed to the Google Groups "GWT 
Users" 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 https://groups.google.com/group/google-web-toolkit.
For more options, visit https://groups.google.com/d/optout.


[gwt-contrib] Re: JsInterop Question

2015-08-25 Thread Benjamin Tillman
That's fine, I was just trying to pre-empt Elemental 2.0 a bit and got the 
impression from the compiler complaint and some of the design docs linked 
here that examples like the above wouldn't be possible.

Regards,
Ben.

On Monday, 24 August 2015 22:32:55 UTC+10, Jens wrote:

 You need to use normal JavaScriptObject + JSNI for now for these cases.

 -- J.


-- 
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.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/google-web-toolkit-contributors/3a284009-6d3b-40a5-a9bc-8aeb6549ef58%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: JsInterop question ...

2015-08-24 Thread Benjamin Tillman
Any chance of reply? If it's a bad question I'm happy to hear that as well, 
just so I know I'm thinking about this the wrong way.

Regards,
Ben.

On Wednesday, 1 July 2015 05:30:17 UTC+10, Benjamin Tillman wrote:

 Hey everyone, just a quick question regarding JsInterop: how is it 
 proposed to manage javascript functions that can potentially take more than 
 one type of parameter? For example, take the websocket interface 
 http://www.w3.org/TR/websockets/#the-websocket-interface:

 @JsType(prototype = WebSocket)
 public interface WebSocket extends EventTarget {

   ... blah blah.

   void send(String data);
   // void send(Blob data); -- JsInterop forbids this

 }


 I suppose that the following is possible

 @JsType(prototype = WebSocket)
 public interface WebSocket extends EventTarget {

   void send(Object data);

 }


 but ... this doesn't seem ideal from a Java perspective :)

 Regards,
 Ben.


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


[gwt-contrib] Re: JsInterop Question

2015-08-24 Thread Benjamin Tillman
Any chance of reply? If it's a bad question I'm happy to hear that as well, 
just so I know I'm thinking about this the wrong way.

Regards,
Ben.

On Friday, 31 July 2015 17:13:32 UTC+10, Benjamin Tillman wrote:

 Hey everyone, I posted this question on the GWT group here 
 https://groups.google.com/forum/#!topic/google-web-toolkit/sj3pyJPijB8 
 at the beginning of the month, but since I didn't get a reply I'm just 
 cross-posting here :)

 Just a quick question regarding JsInterop: how is it proposed to manage 
 javascript functions that can potentially take more than one type of 
 parameter? For example, take the websocket interface 
 http://www.w3.org/TR/websockets/#the-websocket-interface:

 @JsType(prototype = WebSocket)
 public interface WebSocket extends EventTarget {

   ... blah blah.

   void send(String data);
   // void send(Blob data); -- JsInterop forbids this

 }


 I suppose that the following is possible

 @JsType(prototype = WebSocket)
 public interface WebSocket extends EventTarget {

   void send(Object data);

 }


 but ... this doesn't seem ideal from a Java perspective :)

 Regards,
 Ben.


-- 
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.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/google-web-toolkit-contributors/02188193-4760-48d7-a43f-2331b1fbc377%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[gwt-contrib] JsInterop Question

2015-07-31 Thread Benjamin Tillman
Hey everyone, I posted this question on the GWT group here 
https://groups.google.com/forum/#!topic/google-web-toolkit/sj3pyJPijB8 at 
the beginning of the month, but since I didn't get a reply I'm just 
cross-posting here :)

Just a quick question regarding JsInterop: how is it proposed to manage 
javascript functions that can potentially take more than one type of 
parameter? For example, take the websocket interface 
http://www.w3.org/TR/websockets/#the-websocket-interface:

@JsType(prototype = WebSocket)
public interface WebSocket extends EventTarget {

  ... blah blah.

  void send(String data);
  // void send(Blob data); -- JsInterop forbids this

}


I suppose that the following is possible

@JsType(prototype = WebSocket)
public interface WebSocket extends EventTarget {

  void send(Object data);

}


but ... this doesn't seem ideal from a Java perspective :)

Regards,
Ben.

-- 
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.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/google-web-toolkit-contributors/8417d030-4696-486a-ac3b-76edcab4111f%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


JsInterop question ...

2015-06-30 Thread Benjamin Tillman
Hey everyone, just a quick question regarding JsInterop: how is it proposed 
to manage javascript functions that can potentially take more than one type 
of parameter? For example, take the websocket interface 
http://www.w3.org/TR/websockets/#the-websocket-interface:

@JsType(prototype = WebSocket)
public interface WebSocket extends EventTarget {

  ... blah blah.

  void send(String data);
  // void send(Blob data); -- JsInterop forbids this

}


I suppose that the following is possible

@JsType(prototype = WebSocket)
public interface WebSocket extends EventTarget {

  void send(Object data);

}


but ... this doesn't seem ideal from a Java perspective :)

Regards,
Ben.

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


IntelliJ and debugging Javascript issues

2015-05-29 Thread Benjamin Tillman
Hello everyone,

I've just installed a fresh copy of IntelliJ (14.1) and wanted to test 
Super Dev Mode out (GWT 2.7.0). Everything seems to be working fine except 
that any breakpoints I set in IntelliJ are not working. I'm really not sure 
what information is going to help solve this issue, so let me list some 
things basics I have done/tried:

- I do have the Jetbrains Chrome plugin installed and it connects to 
IntelliJ fine
- IntelliJ says it's connected to the Chrome extension
- I can use Chrome's developer tools to set a breakpoint within Chrome and 
this is respected just fine
- I've tried using Chrome 43 and and Chrome Beta 44
- I've followed https://www.youtube.com/watch?v=pdh2aKW2JPU (apart from 
setting up Tomcat on my local machine), including setting a breakpoint on 
the same line in the code as was done in the video, yet nothing.

I'm happy to work through this, but I'm not even sure where to start 
looking. Any help would be much appreciated.

Regards,
Ben.

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


Re: IntelliJ and debugging Javascript issues

2015-05-29 Thread Benjamin Tillman
I guess it was just bad timing on my part to start playing with this 
yesterday as opposed to me doing something wrong. See this IntelliJ issue 
https://youtrack.jetbrains.com/issue/IDEA-139739 which will be fixed next 
release.

Regards,
Ben.

On Saturday, 30 May 2015 02:00:16 UTC+10, Jens wrote:

 Hm just tried it myself (using GWT 2.8 SNAPSHOT, IntelliJ 14.1.3) and I 
 have to say that it seems to be broken.

 I can only see the log output of chrome console in IntelliJ but break 
 points do not work. I guess they do not work because IntelliJ does not see 
 the SourceMaps provided by the SDM CodeServer. So IntelliJ does not know 
 how to map your break point on a Java line of code to the corresponding 
 JavaScript break point in Chrome debugger.

 Normally when you run the JavaScript debug run configuration in IntelliJ 
 you can switch to the Scripts tab in IntelliJs debug console and when you 
 open the node for the SDM CodeServer you can browse the data found on 
 http://localhost:9876/sourcemaps/app/ 
 http://10.8.1.24:9876/sourcemaps/app/ . However that is currently 
 missing so IntelliJ does not see source maps.

 I know that it does work in general because I already used it quite a bit 
 some time ago. I guess either a Chrome or IntelliJ update has introduced a 
 regression.

 -- J.


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


GSS migration: mixin definition for a transition with multiple transition-property

2015-04-20 Thread Benjamin V.
Hello,

I am currently migrating a GWT project to use new GSS features. But I am 
struggling in finding a mixin definition for a transition with multiple 
transition property.

Old CSS code before GWT 2.7 was:

.class {
  transition: literal(opacity .5s linear 0s, visibility 0s linear .5s);
  -webkit-transition: literal(opacity .5s linear 0s, visibility 0s linear 
.5s);
}

Now I want to use a mixin for that:

@defmixin transitions(TRANSITIONS) {
  -webkit-transition: TRANSITIONS;
  -moz-transition: TRANSITIONS;
  transition: TRANSITIONS;
}

.class {
  @mixin transitions(opacity .5s linear 0s, visibility 0s linear .5s);
}

Not surprisingly the code cannot be compiled. The error message is The 
number of arguments of the mixin and the corresponding definition are 
different. I tried to escape the comma with an unicode sequence but with 
no success.

So how I can perform a successful migration of the old code?




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


Re: GSS migration: mixin definition for a transition with multiple transition-property

2015-04-20 Thread Benjamin V.
Yes, that works. But it is a bit unintuitive as I have multiple different 
transitions properties in one stylesheet. So I have to define multiple 
similiar property variables which are all only used once.


Am Montag, 20. April 2015 15:55:22 UTC+2 schrieb Jens:

 Does it work if you create a constant for the properties? E.g.:

 @def MY_TRANSITION_PROPERTIES opacity .5s linear 0s, visibility 0s linear 
 .5s;

 .class {
   @mixin transitions(MY_TRANSITION_PROPERTIES);
 }



 -- J.


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


Re: [gwt-contrib] What constitutes an acceptable emulated String.format implementation?

2015-03-05 Thread Benjamin DeLillo
I'm curious if anyone knows, what is 10KB, percentage wise, vs the size of 
the average GWT project? I don't know if the one I work with is average or 
unusual weighing in at 7.2MB. I'm wondering if my perspective is skewed.

On Monday, February 9, 2015 at 11:19:39 AM UTC-5, Colin Alworth wrote:

 Its not that 3k is huge, its that it would be (to a developer, accustomed 
 to GWT's policies) massively larger than normally expected for built-in 
 methods. Just ran SOYC on a project (OBF but not closure), and the largest 
 java.lang.String method is 466 bytes, greater than twice the size of the 
 next biggest method. The entire class is only 1,749 bytes, and the entire 
 java.lang (for this project) is 10,535 bytes.

 Adding String.format, once, using only %s to substitute in strings easily, 
 would add 30%.

 On Mon Feb 09 2015 at 8:26:49 AM Benjamin DeLillo bpd...@gmail.com 
 javascript: wrote:

 Dan,

 Thanks for the response.

 sprintf.js is 3kB minified and 7.5kB uncompressed weighing in at just 
 under 200 LoC, you mention this would be too big. Just how small would an 
 implementation have to be to be acceptable? How large are other JRE 
 emulation implementations by comparison? I spoke with Ray at GWT.Create 
 2013 and his take on this was that although String.format was originally 
 excluded from GWT for codesize reasons, that in today's browser/internet 
 ecosystem the hit would be acceptable.

 I do agree that any less than complete implementation needs to have as 
 obvious a failure mode as possible for when it diverges from String.format 
 canon, and must be well documented and easy to find. How do other JRE 
 emulation implementations handle this kind of divergence? Or do they avoid 
 such divergence at all costs?



 On Monday, February 9, 2015 at 5:13:38 AM UTC-5, Daniel Kurka wrote:

 Hi Benjamin,

 thanks for reaching out to us. Answers are inline.


 On Sat, Feb 7, 2015 at 5:31 AM, Benjamin DeLillo bpd...@gmail.com 
 wrote:

 For an implementation to be accepted would it have to conform to the 
 entire Java Formater spec? 
 http://docs.oracle.com/javase/7/docs/api/java/util/Formatter.html

 I think supporting the entire java spec is impossible since we do not 
 have Locale working (for codesize reasons). So we would need to discuss 
 what a good subset would be
  

 Would an implementation lacking the Date/Time conversions be acceptable?

 Would an implementation that wraps sprintf.js be acceptable (if the 
 licensing is compatible)? https://github.com/alexei/sprintf.js

 I briefly skimmed the lib and it seems huge, so I am inclined to say 
 no. In general you have to think about that any application will have the 
 hit of that method in their app as soon as they call String.format one time 
 in their code base.
  


 What about a minimal positional substitution implementation and nothing 
 more?


 Right now any code that relies on String.format will not compile in GWT 
 and thus give the author a clear indication of having a problem. Once we 
 support a subset this compile error might be gone, but we will be 
 introducing runtime errors for not supported features rather than compile 
 time errors.

 One could try to deal with these (and this is bad from the compiler 
 perspective), by looking at the parameters of String.format and only allow 
 statically resolvable arguments for the format String that are supported by 
 the emulation, but this is a very tight coupling of compiler and lib that 
 we do not want in the compiler.

 So if we want to do a minimal support of String.format these are the 
 kinds of problems we need to discuss. 

  

  -- 
 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+unsubscribe@
 googlegroups.com.
 To view this discussion on the web visit https://groups.google.com/d/
 msgid/google-web-toolkit-contributors/bc6afdc0-eb87-
 4815-b076-6db912f8f94c%40googlegroups.com 
 https://groups.google.com/d/msgid/google-web-toolkit-contributors/bc6afdc0-eb87-4815-b076-6db912f8f94c%40googlegroups.com?utm_medium=emailutm_source=footer
 .
 For more options, visit https://groups.google.com/d/optout.




 -- 
 Google Germany GmbH
 *Dienerstr. 12*
 *80331 München*

 Registergericht und -nummer: Hamburg, HRB 86891
 Sitz der Gesellschaft: Hamburg
 Geschäftsführer: Graham Law, Katherine Stephens

  -- 
 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 
 javascript:.
 To view this discussion on the web visit 
 https://groups.google.com/d/msgid/google-web-toolkit-contributors/fa54c87b-c54b-4c8d-87f9-ff234c04cc35%40googlegroups.com
  
 https://groups.google.com/d/msgid/google-web-toolkit-contributors/fa54c87b-c54b-4c8d-87f9

[gwt-contrib] Re: What constitutes an acceptable emulated String.format implementation?

2015-02-10 Thread Benjamin DeLillo
If trying to provide a fairly complete duplicate of the JRE functionality 
is too much of a point of contention, would it be more acceptable to 
provide a simpler/lighter-weight string interpolation implementation behind 
e.g. GWT.format() or to follow the NumberFormat convention a StringFormat 
class?

On Friday, February 6, 2015 at 11:31:32 PM UTC-5, Benjamin DeLillo wrote:

 For an implementation to be accepted would it have to conform to the entire 
 Java Formater spec? 
 http://docs.oracle.com/javase/7/docs/api/java/util/Formatter.html

 Would an implementation lacking the Date/Time conversions be acceptable?

 Would an implementation that wraps sprintf.js be acceptable (if the licensing 
 is compatible)? https://github.com/alexei/sprintf.js


 What about a minimal positional substitution implementation and nothing more?



-- 
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.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/google-web-toolkit-contributors/9d1583ef-ae7b-41e2-9eca-207e8ef33062%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [gwt-contrib] What constitutes an acceptable emulated String.format implementation?

2015-02-09 Thread Benjamin DeLillo
Dan,

Thanks for the response.

sprintf.js is 3kB minified and 7.5kB uncompressed weighing in at just under 
200 LoC, you mention this would be too big. Just how small would an 
implementation have to be to be acceptable? How large are other JRE 
emulation implementations by comparison? I spoke with Ray at GWT.Create 
2013 and his take on this was that although String.format was originally 
excluded from GWT for codesize reasons, that in today's browser/internet 
ecosystem the hit would be acceptable.

I do agree that any less than complete implementation needs to have as 
obvious a failure mode as possible for when it diverges from String.format 
canon, and must be well documented and easy to find. How do other JRE 
emulation implementations handle this kind of divergence? Or do they avoid 
such divergence at all costs?



On Monday, February 9, 2015 at 5:13:38 AM UTC-5, Daniel Kurka wrote:

 Hi Benjamin,

 thanks for reaching out to us. Answers are inline.

 On Sat, Feb 7, 2015 at 5:31 AM, Benjamin DeLillo bpd...@gmail.com 
 javascript: wrote:

 For an implementation to be accepted would it have to conform to the entire 
 Java Formater spec? 
 http://docs.oracle.com/javase/7/docs/api/java/util/Formatter.html

 I think supporting the entire java spec is impossible since we do not 
 have Locale working (for codesize reasons). So we would need to discuss 
 what a good subset would be
  

 Would an implementation lacking the Date/Time conversions be acceptable?

 Would an implementation that wraps sprintf.js be acceptable (if the 
 licensing is compatible)? https://github.com/alexei/sprintf.js

 I briefly skimmed the lib and it seems huge, so I am inclined to say no. 
 In general you have to think about that any application will have the hit 
 of that method in their app as soon as they call String.format one time in 
 their code base.
  


 What about a minimal positional substitution implementation and nothing more?


 Right now any code that relies on String.format will not compile in GWT 
 and thus give the author a clear indication of having a problem. Once we 
 support a subset this compile error might be gone, but we will be 
 introducing runtime errors for not supported features rather than compile 
 time errors.

 One could try to deal with these (and this is bad from the compiler 
 perspective), by looking at the parameters of String.format and only allow 
 statically resolvable arguments for the format String that are supported by 
 the emulation, but this is a very tight coupling of compiler and lib that 
 we do not want in the compiler.

 So if we want to do a minimal support of String.format these are the kinds 
 of problems we need to discuss. 

  

  -- 
 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 
 javascript:.
 To view this discussion on the web visit 
 https://groups.google.com/d/msgid/google-web-toolkit-contributors/bc6afdc0-eb87-4815-b076-6db912f8f94c%40googlegroups.com
  
 https://groups.google.com/d/msgid/google-web-toolkit-contributors/bc6afdc0-eb87-4815-b076-6db912f8f94c%40googlegroups.com?utm_medium=emailutm_source=footer
 .
 For more options, visit https://groups.google.com/d/optout.




 -- 
 Google Germany GmbH
 *Dienerstr. 12*
 *80331 München*

 Registergericht und -nummer: Hamburg, HRB 86891
 Sitz der Gesellschaft: Hamburg
 Geschäftsführer: Graham Law, Katherine Stephens
  

-- 
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.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/google-web-toolkit-contributors/fa54c87b-c54b-4c8d-87f9-ff234c04cc35%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[gwt-contrib] What constitutes an acceptable emulated String.format implementation?

2015-02-07 Thread Benjamin DeLillo


For an implementation to be accepted would it have to conform to the entire 
Java Formater spec? 
http://docs.oracle.com/javase/7/docs/api/java/util/Formatter.html

Would an implementation lacking the Date/Time conversions be acceptable?

Would an implementation that wraps sprintf.js be acceptable (if the licensing 
is compatible)? https://github.com/alexei/sprintf.js


What about a minimal positional substitution implementation and nothing more?

-- 
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.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/google-web-toolkit-contributors/bc6afdc0-eb87-4815-b076-6db912f8f94c%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: I need java.util.Collections synchronized classes.

2015-02-07 Thread Benjamin DeLillo
You place it wherever you want in your source tree, usually at src/emul or 
src/super I think. So you'd have src/emul/java/util/Collections.java

Then add
super-source path=path/relative/to/your.gwt.xml/

to your gwt.xml file.

Someone else can help fill in the details I've missed, I'm a little fuzzy 
on the specifics of how the path gets resolved or the canonical location 
for the super-source directory, but that's the idea.


On Friday, February 6, 2015 at 5:20:55 PM UTC-5, eho...@usdataworks.com 
wrote:

  
 I found an emu directory with a Collections implementation.  Problem is 
 that Collections.java file has a java.util package.  I can't put that in 
 my source tree.  It will collide with the real implementation.


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


[gwt-contrib] Re: Wrapping HTML Content into UIBinder

2015-01-16 Thread Benjamin Possolo
You should start by reading the UiBinder documentation 
http://www.gwtproject.org/doc/latest/DevGuideUiBinder.html.
That has a lot of good examples that you can follow.
In order to wrap just basic HTML, you should use an HTMLPanel widget.

g:HTMLPanel
  pYour basic html goes inside the HTMLPanel like this/p
  div class=foobar/div
/g:HTMLPanel

Performance is very good with UiBinder templates. It is better than 
constructing the UI programmatically because it involves a lot less 
function calls. Not to mention its just easier to read/understand.

If you want to manipulate the html/dom elements that exist in your UiBinder 
template, You'll need to bind them to the Java class
So the aforementioned example would look like this:

g:HTMLPanel
  pYour basic html goes inside the HTMLPanel like this/p
  div class=foo ui:binder=foobar/div
/g:HTMLPanel

In your java class

@UiBinder
DivElement foo;

when your java class is instantiated (and after a call to 
binder.createAndBindUI()) the foo variable will have a reference to the div 
element and you can execute methods on it like set inner text, set inner 
html, add styles programmatically, etc.

Event handlers are done in a similar way. See UiBinder documentation above 
for examples.

To use jQuery in your code, you need to add the script element with the 
link to the jquery javascript in your HTML host pageand then you need 
to create JSNI methods: java code that wraps your javascript code.
See the GWT JSNI documentation 
http://www.gwtproject.org/doc/latest/DevGuideCodingBasicsJSNI.html for 
that. Too complicated for me to explain here.

Benjamin


On Thursday, January 15, 2015 at 8:34:04 PM UTC-8, Mohammed wrote:

 Hi Folks,
   I am using GWT 2.6 to develop my web application.Since i am getting the 
 HTML prototype from UX/UI designer can i wrap the html directly into 
 uibinder in GWT?

- Is so,then how to write event handler or validation for the 
component?
- Can i expect the same output (as looking in HTML prototype)?
- Generated code will be match exactly as looking in HTML,Is this 
Possible using UIBinder Approch?
- Is there any performance Issue?
- some time HTML Prototype will internally having jquery component,Can 
i wrap JQuery in GWT using UIBinder Approach?

 Please give me your valuable suggestion?Thanks in advance?


-- 
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.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/google-web-toolkit-contributors/e2696eea-f39f-4645-bc1d-d80c1e81dcac%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Strange Behavior from scheduleIncremental

2014-12-30 Thread Benjamin DeLillo
Browser: Firefox 25
GWT: 2.5

I'm changing the implementation of a scatterchart I have to update 
incrementally to avoid the slow script warning. I've successfully 
implemented this using Scheduler.scheduleIncremental. However, there is one 
oddity I'd like to better understand: The chart is only updated when the 
user is actively performing input e.g. moving the mouse, but it does not 
progress if no input is performed at all, though the browser UI is not 
hung. Is this behavior a setting I've missed? A (potentially fixed in 2.6 
or 2.7) GWT bug? Something else?

I'd really appreciate any insight others could provide into this behavior.

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


Re: How to dynamically load css style in GWT-based application

2014-09-03 Thread Benjamin Cuthbert
Okay interesting. So do you have the css deployed into the war? Or unpacked 
on the server?

On Tuesday, September 2, 2014 4:31:02 PM UTC+1, Yuri C wrote:

 In my case the idea was to have a CSS per screen. I call the server the 
 first time the very first time that particular screen is revealed.

 On Tuesday, September 2, 2014 3:56:56 AM UTC-4, Benjamin Cuthbert wrote:

 Hi Yuri,

 How do you make the call to the server? via the onModuleLoad?

 On Tuesday, January 15, 2013 6:52:57 PM UTC, Yuri C wrote:

 I have 2 CSS loaders.
 One relies on link tags. This is the preferred way to load CSS as long 
 as you don't need to be notified when the stylesheet is loaded.
 Another one updates the page with CSS loaded via a separate HTTP request 
 and you can register a callback to be notified when the CSS is loaded.


 On Wednesday, December 12, 2007 4:22:59 AM UTC-5, yadong wrote:

 I am working on an web application in which the css style varies based 
 on different user, I am curious how to load css file dynamically. 
 Currently we use JSTL tag to access server side parameter to determine 
 which css file needs to be used.



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


Re: How to dynamically load css style in GWT-based application

2014-09-02 Thread Benjamin Cuthbert
Hi Yuri,

How do you make the call to the server? via the onModuleLoad?

On Tuesday, January 15, 2013 6:52:57 PM UTC, Yuri C wrote:

 I have 2 CSS loaders.
 One relies on link tags. This is the preferred way to load CSS as long 
 as you don't need to be notified when the stylesheet is loaded.
 Another one updates the page with CSS loaded via a separate HTTP request 
 and you can register a callback to be notified when the CSS is loaded.


 On Wednesday, December 12, 2007 4:22:59 AM UTC-5, yadong wrote:

 I am working on an web application in which the css style varies based 
 on different user, I am curious how to load css file dynamically. 
 Currently we use JSTL tag to access server side parameter to determine 
 which css file needs to be used.



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


Re: [gwt-contrib] Re: Can we move the code to GitHub?

2014-03-30 Thread Benjamin Possolo
yah i don't actually expect it to happen just because i created a thread 
about it. i was just wondering if there are any very strong reasons against 
it.

with regards to angularjs adoption...yes you are right in that it's not 
just the code repository but i feel like some simple changes would help 
bring GWT up to the playing field of several of the other trendy 
frameworks. I've had trouble convincing people to consider GWT because on 
the surface-level, it seems less mature when in reality the opposite is 
true.

On Saturday, March 29, 2014 10:06:59 PM UTC-7, Stephen Haberman wrote:


  We're starting seeing integrations between Gerrit and GitHub 
  (http://gerrithub.io/http://www.google.com/url?q=http%3A%2F%2Fgerrithub.io%2Fsa=Dsntz=1usg=AFQjCNH-NimTSAMXFvCqad3DZ7-2FmHgsA)
   


 Ooh, that looks spiffy. Thanks for the link, Thomas. 

 From Benjamin's reply: 

  I think other UI frameworks/platforms like AngularJS are gaining more 
  traction/adoption because they are accessible through GitHub. 

 AngularJS is not gaining more traction than GWT merely because it's 
 hosted on GitHub. I wish that there the case (what an easy thing to 
 fix!), but in reality it's much more than that, and not worth rehashing 
 here. 

 Basically, Benjamin, it's great to have you, and I'm sure you mean 
 well, but you're not going to win a let's change our tools thread on 
 your 1st post to gwt-contrib. 

 But it's great to see that you're enthusiastic about GWT. It'd be great 
 to have you help out. Perhaps you can indulge us and put up with Gerrit 
 for awhile while doing so. :-) 

 - Stephen 



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


[gwt-contrib] Can we move the code to GitHub?

2014-03-29 Thread Benjamin Possolo
I am interested in helping modernize the gwtproject.org 
website/documentation and part of that effort would include moving the code 
to GitHub.

I think GitHub provides a certain amount of credibility that lacks with the 
current Gerrit system.
Moving to GitHub would encourage more people to contribute and get involved 
because they are familiar with the github UI and the process for submitting 
pull requests, performing code reviews, etc.
Not to mention, it is simply much more social and transparent.

It sounds like Gerrit has a feature that only allows patches from people 
that have signed contributor legal agreements.
I guess I don't really understand why this is necessary now that GWT has 
become fully open sourced and is no longer owned by Google.
However, if this is actually necessary, couldn't we simply use a git commit 
hook to enforce it?

AngularJS is on GitHub..doesn't make sense to me why Google Web Toolkit 
can't be.

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


[gwt-contrib] Re: Can we move the code to GitHub?

2014-03-29 Thread Benjamin Possolo
Thanks for the detailed response.

On Saturday, March 29, 2014 7:28:22 PM UTC-7, Thomas Broyer wrote:


 Do you imply that the same system that is used for Android and ChromiumOS 
 lacks credibility? The same that's also used by Eclipse, OpenStack, Typo3, 
 Qt, Wikimedia, etc. https://code.google.com/p/gerrit/wiki/ShowCases


I think simple things like having a View On GitHub button, the Fork This 
Project on GitHub ribbon and the silhouette of the GitHub mascot on the GWT 
project site would all provide *more* credibility and charm to lure people 
to the project.

I think other UI frameworks/platforms like AngularJS are gaining more 
traction/adoption because they are accessible through GitHub.
 

 I agree GitHub is more familiar to many than Gerrit, and that would 
 probably ease contributions.
 But, as far as I'm concerned, I wouldn't move to GitHub (at least for GWT 
 proper).

 The main reasons we chose Gerrit were:
 * side-by-side diffs
 * enforcing a clean history (this is particularly important as Google 
 syncs their internal Perforce repo with the public Git repo, the history 
 needs to be linear for them)
 The website doesn't have those clean history constraints, but it'd be a 
 bit strange to use another system to review changes for the website than 
 changes to GWT proper (note that I'm not strongly against it)
 I believe you can find some discussions on the subject in the archives of 
 https://groups.google.com/d/forum/gwt-steering

 At GitHub, to maintain a clean history means that you either ask every 
 contributor to rebase and squash their branches before you can merge them, 
 and/or you rebase and squash them yourself when merging, but it at least 
 means being very careful when clicking the merge button (so careful that 
 you'd probably want to disable it –that's not possible– and force every 
 commiter to merge manually with --ff-only or --squash).

 We're starting seeing integrations between Gerrit and GitHub (
 http://gerrithub.io/), so who knows, maybe one day that plugin will be 
 available on gwt-reviews so contributors will be able to submit changes as 
 GitHub Pull Requests rather than pushing them to Gerrit.


i think side-by-side diffs can always be attainted through a 3rd party 
tool. if the contribution is small i don't see the big advantage. if the 
contribution is very big you're likely going to pull the branch yourself to 
examine/run it. 
 
At my current workplace, we ensure our main project repo has a clean 
history as well by having developers:

   1. fork the main repo
   2. commit/squash/push to their personal repo
   3. send pull requests from their personal repo to the main repo
   

In the mean time, I believe what we need is better documentation. Our 
 making GWT better web page is really light. Patches welcome.


The webpage improvements should be a different discussion but I think it 
needs a much bigger overhaul in order to productize it more.

Ideally it would be competitive with other sites like AngularJS 
(http://angularjs.org), Scala (http://scala-lang.org), Google Cloud 
Platform  GAE (https://cloud.google.com), EmberJS (http://emberjs.com), 
IntercoolerJS (http://intercoolerjs.org), etc.

There are tons of projects built on GWT which is fantastic but there is 
hardly any talk about it and almost nothing on Hacker News which is kind of 
sad.
 
I think it would also help us if we got GWT on the radar of services like 
Prerender (https://prerender.io), SEOjs (http://getseojs.com), Brombone 
(http://www.brombone.com), etc which would help drive home the fact that 
it's a serious product that is viable for enterprise and public facing 
sites.

 

 Not to mention, it is simply much more social and transparent.


 !?
 I could understand the more social argument (although I don't think it's 
 a compelling one), but more transparent?


The two are very intertwined in my eyes. Having recognizable people/users 
from other popular projects on github starring, commenting and contributing 
to GWT along with an easier to use interface yields a higher amount of 
perceived transparency.

It sounds like Gerrit has a feature that only allows patches from people 
 that have signed contributor legal agreements.
 I guess I don't really understand why this is necessary now that GWT has 
 become fully open sourced and is no longer owned by Google.


 Required reading: 
 http://julien.ponge.org/blog/in-defense-of-contributor-license-agreements/and 
 http://www.clahub.com/pages/why_cla
 Ideally, the GWT Project would be a legal organization so you'd sign a CLA 
 with the GWT Project. But it's not, so you still sign an agreement with 
 Google.

 Yes, there are things like CLAHub; but you need to train all committers to 
 not look at patches until the CLA has been signed, it's not enforced.
 Similarly, GitHub hooks with the PR status API can inform you of the build 
 status of a pull request, but nothing prevents you from merging it. On the 
 other hand, merging a change that 

How to load a JRE-dependent/non-compile-mode-supported class in GWT Dev Mode

2014-02-25 Thread Benjamin Bitdiddle
For a particular GWT module, I'm able to solve a problem in compiled mode 
by manipulating the JS object representing the Java object.  (Specifically, 
I need to clone the object, so I simply create a new JS object, copy the 
properties from the original JS object, and assign a new hash value.)  I've 
tested this an it works OK.

Since that approach (that I use in compiled mode) doesn't work in Dev Mode, 
I want to use Object.clone(), which is available in Dev Mode, to perform 
the clone operation. However, I'm not sure how to accomplish this as every 
approach I try hits a problem.

   - I can't seem to use deferred binding (i.e. GWT.create() and replace 
   with in the module gwt.xml file), for two reasons:


   1. Even in Dev Mode, when I replace a class using replace with, the 
  class I swap in seems not to be able to use JRE-only methods, such as 
  reflection or Object.clone.  I get an error that the source code for the 
  method is not available.  I don't want this class compiled, but it seems 
  to want to compile it to JS.
  2. If I solve #1, then I have to figure out how to get the replace 
  with to be conditional based on being in dev mode.  I'm using ant to 
build 
  the compiled-mode stuff and I'm using Eclipse to run dev mode.  Is there 
  way to make this automatic so I can use the same module gwt.xml in 
Eclipse 
  and for an ant build?  I guess I'd need an ant property that 
automatically 
  is set by compiled but not by development mode, or vice versa?
  

   - I also tried simply using new Foo() (rather than GWT.create() and 
   deferred binding), placing the JS-copying/GWT-compile-friendly version of 
   Foo in the normal location.  This works for GWT compiled mode obviously.  
   Then for Dev Mode, I add a new source directory to the class path in 
   Eclipse and stick a different class Foo there that uses the JRE-only APIs 
   (such as Object.clone).  However, this hits the same problem as deferred 
   binding - I still get an error that the source code is not available for 
   various APIs I use in that version of Foo (e.g. reflection APIs).
   
Right now, I've managed to use the Eclipse expression panel to manually 
load the JRE-version of Foo I mentioned above (in the special class path 
segment).  So I know it's possible for it to coexist with other Dev Mode 
classes, but how do I load it programmatically as part of starting GWT 
DevMode class?

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


Re: How to load a JRE-dependent/non-compile-mode-supported class in GWT Dev Mode

2014-02-25 Thread Benjamin Bitdiddle
Thanks for the quick response.  I haven't tried it yet, but will soon.

I want to use Object.clone() because I have a situation where I need to 
create a (shallow) duplicate of a Java class that differs from the original 
only by virtue of pointing to a different JS object (with one member).  *The 
class may be one I have no control over, such as something user writes*, so 
I can't insist that it implement any particular API.  (I guess the ideal 
situation would be to have my root class A implement myClone(), which 
clones by just calling a constructor for that class with the right 
arguments, and then require that any class B that a user writes to extend A 
override myClone().  However, I don't think I can require that.)

On Tuesday, February 25, 2014 3:19:29 AM UTC-6, Thomas Broyer wrote:



 On Tuesday, February 25, 2014 8:53:39 AM UTC+1, Benjamin Bitdiddle wrote:

 For a particular GWT module, I'm able to solve a problem in compiled mode 
 by manipulating the JS object representing the Java object.  (Specifically, 
 I need to clone the object, so I simply create a new JS object, copy the 
 properties from the original JS object, and assign a new hash value.)  I've 
 tested this an it works OK.

 Since that approach (that I use in compiled mode) doesn't work in Dev 
 Mode, I want to use Object.clone(), which is available in Dev Mode, to 
 perform the clone operation. However, I'm not sure how to accomplish this 
 as every approach I try hits a problem.

- I can't seem to use deferred binding (i.e. GWT.create() and 
replace with in the module gwt.xml file), for two reasons:


1. Even in Dev Mode, when I replace a class using replace with, the 
   class I swap in seems not to be able to use JRE-only methods, such as 
   reflection or Object.clone.  I get an error that the source code for 
 the 
   method is not available.  I don't want this class compiled, but it 
 seems 
   to want to compile it to JS.
   2. If I solve #1, then I have to figure out how to get the 
   replace with to be conditional based on being in dev mode.  I'm 
 using ant 
   to build the compiled-mode stuff and I'm using Eclipse to run dev 
 mode.  Is 
   there way to make this automatic so I can use the same module gwt.xml 
 in 
   Eclipse and for an ant build?  I guess I'd need an ant property that 
   automatically is set by compiled but not by development mode, or vice 
 versa?
   

- I also tried simply using new Foo() (rather than GWT.create() and 
deferred binding), placing the JS-copying/GWT-compile-friendly version of 
Foo in the normal location.  This works for GWT compiled mode obviously.  
Then for Dev Mode, I add a new source directory to the class path in 
Eclipse and stick a different class Foo there that uses the JRE-only APIs 
(such as Object.clone).  However, this hits the same problem as deferred 
binding - I still get an error that the source code is not available 
 for 
various APIs I use in that version of Foo (e.g. reflection APIs).

 Right now, I've managed to use the Eclipse expression panel to manually 
 load the JRE-version of Foo I mentioned above (in the special class path 
 segment).  So I know it's possible for it to coexist with other Dev Mode 
 classes, but how do I load it programmatically as part of starting GWT 
 DevMode class?


 It seems like you're looking for super-source and @GwtScriptOnly.

 In your standard source location you'll put the class you want to use in 
 DevMode, then in the super-source (you have to declare a super-source 
 path=super / in your gwt.xml) you put the version of the class you want 
 to use in web mode, and you annotate it with 
 @com.google.gwt.core.client.GwtScriptOnly (note: that class only exists in 
 super-source too, so you won't find it by auto-complete in your IDE). See 
 http://www.gwtproject.org/doc/latest/DevGuideOrganizingProjects.html#DevGuideModuleXml
 This is used in many places in GWT if you need examples: WeakMapping, 
 StringCase, SafeHtmlHostedModeUtils, etc.

 (that said, I suspect you're doing something Wrong™ if you need this for 
 Object.clone(), and you'd better try to find an alternative)


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


Re: How to load a JRE-dependent/non-compile-mode-supported class in GWT Dev Mode

2014-02-25 Thread Benjamin Bitdiddle
On Tuesday, February 25, 2014 3:19:29 AM UTC-6, Thomas Broyer wrote:



 On Tuesday, February 25, 2014 8:53:39 AM UTC+1, Benjamin Bitdiddle wrote:

 For a particular GWT module, I'm able to solve a problem in compiled mode 
 by manipulating the JS object representing the Java object.  (Specifically, 
 I need to clone the object, so I simply create a new JS object, copy the 
 properties from the original JS object, and assign a new hash value.)  I've 
 tested this an it works OK.

 Since that approach (that I use in compiled mode) doesn't work in Dev 
 Mode, I want to use Object.clone(), which is available in Dev Mode, to 
 perform the clone operation. However, I'm not sure how to accomplish this 
 as every approach I try hits a problem.

- I can't seem to use deferred binding (i.e. GWT.create() and 
replace with in the module gwt.xml file), for two reasons:


1. Even in Dev Mode, when I replace a class using replace with, the 
   class I swap in seems not to be able to use JRE-only methods, such as 
   reflection or Object.clone.  I get an error that the source code for 
 the 
   method is not available.  I don't want this class compiled, but it 
 seems 
   to want to compile it to JS.
   2. If I solve #1, then I have to figure out how to get the 
   replace with to be conditional based on being in dev mode.  I'm 
 using ant 
   to build the compiled-mode stuff and I'm using Eclipse to run dev 
 mode.  Is 
   there way to make this automatic so I can use the same module gwt.xml 
 in 
   Eclipse and for an ant build?  I guess I'd need an ant property that 
   automatically is set by compiled but not by development mode, or vice 
 versa?
   

- I also tried simply using new Foo() (rather than GWT.create() and 
deferred binding), placing the JS-copying/GWT-compile-friendly version of 
Foo in the normal location.  This works for GWT compiled mode obviously.  
Then for Dev Mode, I add a new source directory to the class path in 
Eclipse and stick a different class Foo there that uses the JRE-only APIs 
(such as Object.clone).  However, this hits the same problem as deferred 
binding - I still get an error that the source code is not available 
 for 
various APIs I use in that version of Foo (e.g. reflection APIs).

 Right now, I've managed to use the Eclipse expression panel to manually 
 load the JRE-version of Foo I mentioned above (in the special class path 
 segment).  So I know it's possible for it to coexist with other Dev Mode 
 classes, but how do I load it programmatically as part of starting GWT 
 DevMode class?


 It seems like you're looking for super-source and @GwtScriptOnly.

 In your standard source location you'll put the class you want to use in 
 DevMode, then in the super-source (you have to declare a super-source 
 path=super / in your gwt.xml) you put the version of the class you want 
 to use in web mode, and you annotate it with 
 @com.google.gwt.core.client.GwtScriptOnly (note: that class only exists in 
 super-source too, so you won't find it by auto-complete in your IDE). See 
 http://www.gwtproject.org/doc/latest/DevGuideOrganizingProjects.html#DevGuideModuleXml
 This is used in many places in GWT if you need examples: WeakMapping, 
 StringCase, SafeHtmlHostedModeUtils, etc.

 (that said, I suspect you're doing something Wrong™ if you need this for 
 Object.clone(), and you'd better try to find an alternative)


Thanks for the quick response.  I haven't tried it yet, but will soon.

I want to use Object.clone() because I have a situation where I need to 
create a (shallow) duplicate of a Java class that differs from the original 
only by virtue of pointing to a different JS object (with one member).  *The 
class may be one I have no control over, such as something user writes*, so 
I can't insist that it implement any particular API.  (I guess the ideal 
situation would be to have my root class A implement myClone(), which 
clones by just calling a constructor for that class with the right 
arguments, and then require that any class B that a user writes to extend A 
override myClone().  However, I don't think I can require that.)

[Yikes.  It seems as if I can't edit my own post. :-)] 

-- 
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: Development Mode will not be supported in Firefox 27+

2014-02-25 Thread Benjamin Bitdiddle
Would anyone like to follow up the last comment on the bugzilla thread, 
where a FF dev claims that:

Most C++ JSAPI usage in extensions can in fact be replaced by a combination of 
privileged script and the debugger APIs


I assume we wouldn't be seeing this thread if that was really true as you 
guys would have just updated the plugin.

-- 
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: Create ImageResource from URL derived from DB?

2013-12-15 Thread Benjamin Possolo
This is not what ImageResource was designed for. ImageResource is part of 
ClientBundle and is intended for bundling images into a single sprite map 
to reduce the number of network requests between the user's browser and 
your server. The artifacts are generated at compile time.

If you want to define the background image of your GWT Button widget (which 
is just a button or input element), use the DOM api and CSS to set the 
background to the desired image url.

String urlToImage = http://www.foo.com/your-image.png;;
Button b = new Button();
b.getElement().getStyle().setProperty(background, url(' + urlToImage + 
') no-repeat);

Here is a stackoverflow post that talks about setting background images on 
input elements
http://stackoverflow.com/questions/2738920/background-image-for-input-type-button


On Saturday, December 7, 2013 9:18:06 AM UTC-8, Nolan Brassard wrote:

 Is there a way to create an ImageResource from a URL?

 I have a scenario where I'd like to allow the user to give me a URL to an 
 image that will then be used as the Icon of a certain button later on. The 
 only way I know how to create an ImageResource is via a client bundle and 
 setting @Source. Is there another way to do this?


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


Animate CellList (adding and removing objects via ListDataProvider)

2013-11-12 Thread Benjamin Tillman
Is it possible to animate a CellList when a new object is added to or 
removed from the list wrapped by a ListDataProvider? At the moment, the 
item just instantly appears, but since I'm using the CellList as a menu, 
I'd like to make it a little more obvious that a menu item is now 
available/unavailable.

Regards,
Ben.

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


Determining dependencies for split points

2013-10-14 Thread Benjamin Klein
In my GWT application, I have several split points. In the compile report,
it says that a certain class has some code loaded in split point 1 and some
code loaded in split point 5. How do I find out what is causing the code to
load from split point 5?

-- 
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.create conference - call for presentations

2013-07-06 Thread Benjamin Possolo
Hey Joonas,

I currently live in San Diego but am considering a relocation to San 
Francisco so either way, it should be possible for me to attend the 
conference in SF.
I built this website http://markteplace.styleguise.net entirely in core GWT 
(running on GAE + java) and I use a lot of the fancier GWT features 
extensively.
If you are interested, I could probably give a presentation on a lot of the 
best practices I use within my application.
Here are some example topics:


   - Making a GWT application Google crawl-able (using #! notation, 
   Activities/Places and HtmlUnit).
   - Best practices when using UiBinder (ui:with, ui:text, anchors with 
   SafeUris, html templates, HTMLPanel, preferring native html elements over 
   widgets, nesting ui:binder based widgets)
   - Using the Editor Framework with UiBinder, jsr303 and field decorators 
   for rendering validation errors.
   - Introducing split points into an app that uses Activites/Places using 
   AsyncProxy and viewing the build artifacts using SOYC.
   - Stylizing CellTables with CSS, custom Cells, html templates
   - Embedding javascript libraries like Google Analytics, jquery and 
   jquery plugins like CuteTime, fancybox, qtip (and maybe managing script 
   injection at runtime).

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




Re: I/O 2013 - GWT Sessions?

2013-05-19 Thread Benjamin Possolo
I think a GWT conference would be great as well.
It would probably make more sense to occur somewhere on the west coast 
though since it is much closer to silicon valley.

The San Diego Convention Center is always a great place for conventions.

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




Re: The app is not loading in Safari?

2013-05-02 Thread Benjamin Possolo
Try completely deleting the safari browser cache, cookies, history, etc. then 
verify you have all the latest safari updates. 

I'm guessing u have some deferred binding issue as well but if not, the above 
may kickstart the browser. 

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




Re: GWT dev plugin for Chrome 21.0.1180.60 m not installing

2013-02-07 Thread Benjamin Possolo
First off, what a nightmare it is just to get the plugin working on chrome.
the chrome store kept failing to install the plugin with a worthless error 
message.
So i defaulted back to my old habit of opening the chrome extensions tab 
and then dragging the CRX file directly onto the browser.
But that was failing now too due to a incorrect magic number error.
I finally figured out i need to be logged into my google account in order 
to install the plugin directly from the google chrome store.
Why doesn't the plugin install screen just say you must be logged in to 
install the plugin rather than the worthless message it does now??

On Tuesday, October 2, 2012 11:12:04 AM UTC-7, Chris Calabro wrote:

 that is bizarre.  it did not work last night even with many attempts, but 
 the exact same operation this morning worked!
 i didn't even restart chrome or anything.  btw i'm using chrome Version 
 22.0.1229.64 beta.

 - chris



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




Re: Ultimate GWT + GAE + Datanucleus + Eclipse + Maven Guide

2013-01-12 Thread Benjamin Possolo
Awesome! The archetype is a great idea!

-- 
You received this message because you are subscribed to the Google Groups 
Google Web Toolkit group.
To view this discussion on the web visit 
https://groups.google.com/d/msg/google-web-toolkit/-/3WD1o_VWBOoJ.
To post to this group, send email to google-web-toolkit@googlegroups.com.
To unsubscribe from this group, send email to 
google-web-toolkit+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/google-web-toolkit?hl=en.



Re: Ultimate GWT + GAE + Datanucleus + Eclipse + Maven Guide

2013-01-10 Thread Benjamin Possolo
Thank you! It took me quite a while.

Does your project have a similar setup?

-- 
You received this message because you are subscribed to the Google Groups 
Google Web Toolkit group.
To view this discussion on the web visit 
https://groups.google.com/d/msg/google-web-toolkit/-/mBjcQcdru1AJ.
To post to this group, send email to google-web-toolkit@googlegroups.com.
To unsubscribe from this group, send email to 
google-web-toolkit+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/google-web-toolkit?hl=en.



Ultimate GWT + GAE + Datanucleus + Eclipse + Maven Guide

2013-01-07 Thread Benjamin Possolo
Hey all,

I wrote this guide on setting up a project that uses GAE, GWT, Datanucleus, 
Eclipse and Maven.
It is a case study of a complicated project and should be useful to those 
of you wishing to move to a Maven-based build system.

http://bpossolo.blogspot.com/2013/01/the-ultimate-guide-to-gwt-gae-maven.html

Benjamin

-- 
You received this message because you are subscribed to the Google Groups 
Google Web Toolkit group.
To view this discussion on the web visit 
https://groups.google.com/d/msg/google-web-toolkit/-/_UD2VBmwUH8J.
To post to this group, send email to google-web-toolkit@googlegroups.com.
To unsubscribe from this group, send email to 
google-web-toolkit+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/google-web-toolkit?hl=en.



Re: How to center an Image?

2013-01-07 Thread Benjamin Possolo
an img element is, by default, an inline element (as opposed to a block 
element).
That means you can simply use the following css property to center it:

.myImage {

text-align: center;

}

g:SimplePanel

g:Image styleName={style.myImage}/

/g:SimplePanel

the image will be centered within the simple panel.

-- 
You received this message because you are subscribed to the Google Groups 
Google Web Toolkit group.
To view this discussion on the web visit 
https://groups.google.com/d/msg/google-web-toolkit/-/xwzpsyw6HQoJ.
To post to this group, send email to google-web-toolkit@googlegroups.com.
To unsubscribe from this group, send email to 
google-web-toolkit+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/google-web-toolkit?hl=en.



Re: GWT application runtime memory size is too large (client side)

2013-01-07 Thread Benjamin Possolo
+1 to this
code splitting will be the biggest improvement you can make. if you are 
using activities/places then it is easy to introduce split points around 
every activity (using AsyncProxy).

If your UiBinder templates are innefficiently written then it will impact 
memory a lot. prefer using HTMLPanel at the top of most uibinder views and 
then use raw html as often as possible instead of gwt widgets.

also when gwt compiling, make sure you are producing obfuscated javascript 
rather than pretty or detailed

-- 
You received this message because you are subscribed to the Google Groups 
Google Web Toolkit group.
To view this discussion on the web visit 
https://groups.google.com/d/msg/google-web-toolkit/-/BVxbeElth9gJ.
To post to this group, send email to google-web-toolkit@googlegroups.com.
To unsubscribe from this group, send email to 
google-web-toolkit+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/google-web-toolkit?hl=en.



Re: ByteBuffer to String

2013-01-07 Thread Benjamin Possolo
ByteBuffer is not supported in GWT client code as documented here
https://developers.google.com/web-toolkit/doc/latest/RefJreEmulation#Package_java_io
so you should re-evaluate whatever you are doing with those first.

I dont know if that google library you are using for the charsets class 
works gwt client code either.
i would guess not.

-- 
You received this message because you are subscribed to the Google Groups 
Google Web Toolkit group.
To view this discussion on the web visit 
https://groups.google.com/d/msg/google-web-toolkit/-/QfjVAFz9pXoJ.
To post to this group, send email to google-web-toolkit@googlegroups.com.
To unsubscribe from this group, send email to 
google-web-toolkit+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/google-web-toolkit?hl=en.



Re: GWT Crawlable (SEO)

2012-12-31 Thread Benjamin Possolo
Jan

you seem to be kind of trolling; duplicate thread created 5 days ago by 
yourself and you clearly didnt bother to use the search feature but I will 
answer anyways

Just copy the filter I wrote:
https://groups.google.com/forum/#!topic/google-web-toolkit/aBt-QCCQkKY

On Thursday, December 27, 2012 3:36:17 AM UTC-8, Jan wrote:

 Hi

 I like to make my GWT-App by the google bot. I found this article (
 https://developers.google.com/webmasters/ajax-crawling/). It states there 
 should be a servlet filter, that serves a different view to the google bot. 
 But how can this work? If i use for example the activities and places 
 pattern, than the page changes are on the client-side only and there is no 
 servlet involved - servlet filter does not work here.

 Can someone give me an explanation? Or is there another good tutorial 
 tailored to gwt how to do this?

 Thanks and best regards
 Jan



-- 
You received this message because you are subscribed to the Google Groups 
Google Web Toolkit group.
To view this discussion on the web visit 
https://groups.google.com/d/msg/google-web-toolkit/-/VqqvW4u0QmUJ.
To post to this group, send email to google-web-toolkit@googlegroups.com.
To unsubscribe from this group, send email to 
google-web-toolkit+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/google-web-toolkit?hl=en.



Re: execute priority ServletContextEvent handler and static block

2012-12-31 Thread Benjamin Possolo
do not put code in a static block in your servlet context listener.
the context initialized method is guaranteed to be called exactly once for 
a servlet context listener before any of your servlets are initialized

-- 
You received this message because you are subscribed to the Google Groups 
Google Web Toolkit group.
To view this discussion on the web visit 
https://groups.google.com/d/msg/google-web-toolkit/-/VdaSfaAVqZoJ.
To post to this group, send email to google-web-toolkit@googlegroups.com.
To unsubscribe from this group, send email to 
google-web-toolkit+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/google-web-toolkit?hl=en.



Re: how to add meta tag in the header's page [with uibinder ?]

2012-12-31 Thread Benjamin Possolo
Here is an example for setting the description meta element

public static void setMetaDescription(String description){

 NodeListElement nodes = Document.get().getElementsByTagName(meta);

 for( int i = 0; i  nodes.getLength(); i++ ){

MetaElement meta = (MetaElement)nodes.getItem(i);

if( description.equals(meta.getName()) ){

meta.setContent(description);

break;

}

}

}

-- 
You received this message because you are subscribed to the Google Groups 
Google Web Toolkit group.
To view this discussion on the web visit 
https://groups.google.com/d/msg/google-web-toolkit/-/gH8DbwD85tcJ.
To post to this group, send email to google-web-toolkit@googlegroups.com.
To unsubscribe from this group, send email to 
google-web-toolkit+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/google-web-toolkit?hl=en.



Re: The Future of GWT Report 2012 Published

2012-12-04 Thread Benjamin DeLillo
There's a mention about very good tools for automated tests, such as 
Jucikito but Google doesn't find anything for Jucikito, is there a typo? 
I'd love to know what this very good tool is exactly.

On Tuesday, December 4, 2012 6:19:05 AM UTC-5, Joonas Lehtinen wrote:

 *The GWT community have been having many questions about the Future of 
 GWT. Questions like: Where is GWT going? How is GWT used today? What are 
 the challenges they are facing? What is the competition? Should I build my 
 next project with GWT?

 When joining the GWT steering committee and deciding to include a full 
 copy of GWT into Vaadin 7 we had the same questions. In the end we stepped 
 forward and asked the GWT community. Now after 2 months of asking and 
 receiving responses to the dozens of questions we had from over over 1300 
 GWT users, we compiled all of this together and are proud to present you 
 with some answers in for of 30 page long report. We would like to thank 
 everyone who participated: You - the very active GWT community who 
 answered, GWT steering committee members and other GWT experts who helped 
 create the questions and analyze the answers, Vaadin team and David Booth 
 who coordinated the effort.

 Enough talking, download your personal copy of The Future of GWT Report at:
 *
 *
 https://vaadin.com/gwt/report-2012

 *


-- 
You received this message because you are subscribed to the Google Groups 
Google Web Toolkit group.
To view this discussion on the web visit 
https://groups.google.com/d/msg/google-web-toolkit/-/m5TI0OAd9-sJ.
To post to this group, send email to google-web-toolkit@googlegroups.com.
To unsubscribe from this group, send email to 
google-web-toolkit+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/google-web-toolkit?hl=en.



Re: rpc serialization without the rpc

2012-11-02 Thread Benjamin Possolo
Correct me if I am wrong but it sounds like your idea will only have one 
advantage over a traditional caching layer on the server: avoiding 
serialization costs. You will still have deserialization costs which are 
likely a lot more time consuming since they happen in javascript in the 
browser versus in the JVM on the server.

I think what you are suggesting is dangerously bordering along the lines of 
ghetto.
I feel like caching on the client (using a Command like design pattern and 
local storage) plus a normal caching layer on the server will vastly 
outweigh the benefits and hassle of creating and maintaining an 
GWT-RPC-HTTP frankenstein.

-- 
You received this message because you are subscribed to the Google Groups 
Google Web Toolkit group.
To view this discussion on the web visit 
https://groups.google.com/d/msg/google-web-toolkit/-/X1X0L3B0JLEJ.
To post to this group, send email to google-web-toolkit@googlegroups.com.
To unsubscribe from this group, send email to 
google-web-toolkit+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/google-web-toolkit?hl=en.



Re: how to pass a String[] array in the declarative UI

2012-10-31 Thread Benjamin Possolo
You are trying to add logic to your UiBinder XML file which is not what it 
is intended to do. View-specific logic goes in the java code.

Just do it in the constructor or if you are caching your views (which is 
good for performance) in a dedicated method that can be called before the 
view is rendered by your Activity.

For the sake of an example, lets assume your UiBinder class is called 
MyView.

public class MyView extends Composite {

//definition of UiBinder interface and instance

@UiField
FinishButton finish;

public MyView(){

initWidget(binder.initAndBindUi(this));

}


public MyView(Rights permissions){

this();

updateUi(permissions);

}

 

public void updateUi(Rights permissions){

if( permissions == FINISH_ORDER || permissions == CANCEL_ORDER ) 

finish.setVisible(true);

}

@UiHandler(finish)
void onClickFinish(ClickEvent e){

//handle the click

}

}

-- 
You received this message because you are subscribed to the Google Groups 
Google Web Toolkit group.
To view this discussion on the web visit 
https://groups.google.com/d/msg/google-web-toolkit/-/3M-vQeFosXAJ.
To post to this group, send email to google-web-toolkit@googlegroups.com.
To unsubscribe from this group, send email to 
google-web-toolkit+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/google-web-toolkit?hl=en.



Re: Destroy a widget

2012-10-31 Thread Benjamin Possolo
I can't really understand what you are asking or saying.

If you want the widget to remain visible but to stop receiving events, do 
what Jens said: suppress the event handling logic in the event handler.
If you want the widget to stop being visible and to stop receiving events, 
just do what I said: remove the widget from it's container.

and yes, javascript also has garbage collection otherwise every web 
application would be one giant memory leak

-- 
You received this message because you are subscribed to the Google Groups 
Google Web Toolkit group.
To view this discussion on the web visit 
https://groups.google.com/d/msg/google-web-toolkit/-/zfufHmcP2kgJ.
To post to this group, send email to google-web-toolkit@googlegroups.com.
To unsubscribe from this group, send email to 
google-web-toolkit+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/google-web-toolkit?hl=en.



Re: Cross field validation on client

2012-10-31 Thread Benjamin Possolo
I am not familiar with the GWT Validation framework.
I'm not really sure why people use it considering vanilla GWT supports 
JSR303 (the documentation is pretty bad admittedly).

Using plain GWT you would have a class-level validation annotation:

@Target(ElementType.TYPE)@Retention(RetentionPolicy.RUNTIME)@Constraint(validatedBy
 = PasswordsEqualValidator.class)@Documentedpublic @interface PasswordsEqual {  
  String DEFAULT_MESSAGE = Passwords must be the same;
String message() default DEFAULT_MESSAGE;Class?[] groups() 
default {};Class? extends Payload[] payload() default {};}


Then you would need a custom validator. Mine looks like this:


public class PasswordsEqualValidator implements 
ConstraintValidatorPasswordsEqual, CreateAccountBean {@Override   
 public void initialize(PasswordsEqual constraintAnnotation) {}
@Overridepublic boolean isValid(CreateAccountBean value, 
ConstraintValidatorContext context) {if( value 
== null )return true;
String password = value.getPassword();String confirmPassword = 
value.getConfirmPassword();if( password == null 
 confirmPassword == null )return true;
if( password != null  password.equals(confirmPassword) )  
  return true;return false; 
   }}


Then annotate the javabean class being validated with @PasswordsEqual


This works on the client and server.

-- 
You received this message because you are subscribed to the Google Groups 
Google Web Toolkit group.
To view this discussion on the web visit 
https://groups.google.com/d/msg/google-web-toolkit/-/X7QzUe1UblcJ.
To post to this group, send email to google-web-toolkit@googlegroups.com.
To unsubscribe from this group, send email to 
google-web-toolkit+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/google-web-toolkit?hl=en.



Re: Can't get Google Crawler to index my GWT-based site no matter what I do. Help!

2012-10-29 Thread Benjamin Possolo
On Monday, October 29, 2012 4:28:11 AM UTC-7, Gonzalo Ferreyra Jofré wrote:

 Hello,
 the hashbang is inverted (!#) in your URLs in the xml. Should be this way 
 #!
 Try switching the position of the hash

 
Oh wow! big mistake on my behalf. thank you for catching that!!
i wonder if that will do the trick. google always plays down the importance 
of sitemaps.
I'm fixing, uploading, resubmitting and ill report back

-- 
You received this message because you are subscribed to the Google Groups 
Google Web Toolkit group.
To view this discussion on the web visit 
https://groups.google.com/d/msg/google-web-toolkit/-/F6-vcYd6gVAJ.
To post to this group, send email to google-web-toolkit@googlegroups.com.
To unsubscribe from this group, send email to 
google-web-toolkit+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/google-web-toolkit?hl=en.



Re: Can't get Google Crawler to index my GWT-based site no matter what I do. Help!

2012-10-29 Thread Benjamin Possolo
It looks like that may have done the trick. I am not 100% certain if it was 
that because my app engine log files are showing a ton of traffic from the 
google bot yesterday at night. either way, thanks for finding that major 
mistake.

googling site:marketplace.styleguise.net is now finally showing entries!!

-- 
You received this message because you are subscribed to the Google Groups 
Google Web Toolkit group.
To view this discussion on the web visit 
https://groups.google.com/d/msg/google-web-toolkit/-/j3JsQRP_9A0J.
To post to this group, send email to google-web-toolkit@googlegroups.com.
To unsubscribe from this group, send email to 
google-web-toolkit+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/google-web-toolkit?hl=en.



Re: caching background image

2012-10-29 Thread Benjamin Possolo
If you can, use a ClientBundle. That will ensure the background image only 
gets downloaded once with the rest of your image resources and the 
spritemap produced by the client bundle should be cached by the browsers.

create an interface called AppImages that extends ClientBundle (class must 
be in part of your apps 'client' and visible to the gwt compiler).

public interface AppImages extends ClientBundle {

@Source(background.png)

ImageResource background();

}


put the PNG in your source folder alongside the AppImages interface.

ideally you would do this for all small-to-moderate sized image resources that 
your app uses.


When you want to set the background image of an element, you have several ways 
of doing it (note: i'm writing this without actually testing so it may not be 
perfect).


1) Use an HTML template to create the element with the background image


public interface HtmlTemplates extends SafeHtmlTemplates {

@Template(div style=\background-image: {0};\/)

SafeHtml backgroundDiv(SafeUri imageUrl);

}


HtmlTemplates templates = GWT.create(HtmlTemplates.class);

AppImages images = GWT.create(AppImages.class);


SafeUri backgroundImage = images.background().getSafeUri();

SafeHtml backgroundDiv = templates.backgroundDiv(backgroundImage);


2) Set the background-image css property on the element that underlies the GWT 
widget.


AppImages images = GWT.create(AppImages.class);

SafeUri backgroundImage = images.background().getSafeUri();


FlowPanel panel = new FlowPanel(); //this creates a div

panel.getElement().getStyle().setBackgroundImage(backgroundImage.asString());



Remember, you'll probably also want to set the other important css properties 
like background-repeat, background-position, etc.

Finally, if you want the image to be available publicly on the web, use the 
public declaration in your GWT module descriptor. This will tell the compiler 
to dump the background PNG into your war/MODULE_NAME/background.png folder so 
you can access it out on the web like 
www.yourdomain.biz/yourmodule/background.png

-- 
You received this message because you are subscribed to the Google Groups 
Google Web Toolkit group.
To view this discussion on the web visit 
https://groups.google.com/d/msg/google-web-toolkit/-/ktSjQdQcEO4J.
To post to this group, send email to google-web-toolkit@googlegroups.com.
To unsubscribe from this group, send email to 
google-web-toolkit+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/google-web-toolkit?hl=en.



Re: Destroy a widget

2012-10-29 Thread Benjamin Possolo
I presume by uibinder owner you mean your HelloWorld class overrides the 
onEvent() method, is that correct?

I also presume that you have some other component that is using the 
HelloWorld objects and attaching them to the view.
For example, in your EntryPoint:

HelloWorld h1 = new HelloWorld();
HelloWorld h2 = new HelloWorld();

FlowPanel panel = new FlowPanel();
panel.add(h1);
panel.add(h2);

GWT.getRoot().add(panel);

If you want to destroy h1, and have it stop reacting to events, simply 
remove it from the dom and ensure it is garbage collected (ie. set your 
reference to null):

panel.remove(h1);
h1 = null;

-- 
You received this message because you are subscribed to the Google Groups 
Google Web Toolkit group.
To view this discussion on the web visit 
https://groups.google.com/d/msg/google-web-toolkit/-/o6TIayyZhVIJ.
To post to this group, send email to google-web-toolkit@googlegroups.com.
To unsubscribe from this group, send email to 
google-web-toolkit+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/google-web-toolkit?hl=en.



Re: Destroy a widget

2012-10-29 Thread Benjamin Possolo
Sorry there is a typo there.

GWT.getRoot().add(panel);
should be
RootPanel.get().add(panel);

-- 
You received this message because you are subscribed to the Google Groups 
Google Web Toolkit group.
To view this discussion on the web visit 
https://groups.google.com/d/msg/google-web-toolkit/-/U6PTh3qWnIkJ.
To post to this group, send email to google-web-toolkit@googlegroups.com.
To unsubscribe from this group, send email to 
google-web-toolkit+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/google-web-toolkit?hl=en.



Re: GWT vs SmartGWT

2012-10-29 Thread Benjamin Possolo
I recommend straight GWT for almost everything. The other frameworks just 
add abstractions on top of GWT that confuse things a lot more.

Designing screens: UI Binder
Client-side validation: Editor framework + JSR303 validation using 
HibernateValidator 4.0.2GA
Performance: AsyncProxy, ClientBundle, stick to concrete collections in 
data transfer objects, etc
Communicate with server over WSDL: you are kind of fucked on this one. I 
don't know why you would want your javascript to talk WSDL with a server. 
While I appreciate SOAP/WSDL, that is just way too much overhead for your 
javascript client to deal with. Your server's WSDL layer likely uses some 
sort of business interface written in Java. Create a new backend endpoint 
using REST or for even easier GWT-integration using GWT-RPC. This endpoint 
should just reuse the same business interface that your WSDL endpoint uses.

-- 
You received this message because you are subscribed to the Google Groups 
Google Web Toolkit group.
To view this discussion on the web visit 
https://groups.google.com/d/msg/google-web-toolkit/-/LewlhrMuFccJ.
To post to this group, send email to google-web-toolkit@googlegroups.com.
To unsubscribe from this group, send email to 
google-web-toolkit+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/google-web-toolkit?hl=en.



Re: ListDataProvider.addDataDisplay() and setRowData

2012-10-29 Thread Benjamin Possolo
ListDataProvider wraps a list collection. It allows you to modify the 
wrapped collection and to automatically propagate those changes to the UI.

If you do not use the ListDataProvider (and just call setRowData()) 
directly, then you will need to call setRowData() whenever you make changes 
to your list.

So basically, if you intend on modifying the list (adding/deleting) after 
it is rendered, use the ListDataProvider.
If you are just setting the list data to show it, then just use setRowData()

-- 
You received this message because you are subscribed to the Google Groups 
Google Web Toolkit group.
To view this discussion on the web visit 
https://groups.google.com/d/msg/google-web-toolkit/-/R5kHsRt4vQgJ.
To post to this group, send email to google-web-toolkit@googlegroups.com.
To unsubscribe from this group, send email to 
google-web-toolkit+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/google-web-toolkit?hl=en.



Re: Can't get Google Crawler to index my GWT-based site no matter what I do. Help!

2012-10-28 Thread Benjamin Possolo
On Sunday, October 28, 2012 8:50:27 AM UTC-7, Joseph Lust wrote:

 I see you're using places and the url tokens, are you using GWTP? There is 
 some built in crawler support there that you could use, or at least 
 investigate if you're not using GWTP.

 http://code.google.com/p/gwt-platform/wiki/CrawlerSupport

 SIncerely,
 Joseph


Thanks for responding!

Yes you are correct. I am using places and activities (but not GWTP). I use 
straight GWT throughout the entire app (including all the editor + 
validation stuff).

GWTP does include a canned filter for handling crawlability. I have a very 
similar one albeit slightly optimized.

/**
 * Special filter that adds support for Google crawling as outlined here 
 * ({@link 
https://developers.google.com/webmasters/ajax-crawling/docs/getting-started}
 * 
 * @author Benjamin Possolo
 */
public class GoogleCrawlerFilter implements Filter {
 private static final Logger log = 
Logger.getLogger(GoogleCrawlerFilter.class.getName());

private static final ThreadLocalWebClient webClient = new 
ThreadLocalWebClient(){
@Override
protected WebClient initialValue() {
log.info(Instantiating headless browser);
WebClient wc = new WebClient(BrowserVersion.FIREFOX_3_6);
wc.setThrowExceptionOnScriptError(false);
wc.setThrowExceptionOnFailingStatusCode(false);
wc.setCssEnabled(false);
return wc;
};
};
 @Override
public void init(FilterConfig config) throws ServletException {}
 @Override
public void doFilter(ServletRequest request, ServletResponse response, 
FilterChain chain)
throws IOException, ServletException {
 HttpServletRequest req = (HttpServletRequest)request;
HttpServletResponse resp = (HttpServletResponse)response;
String queryString = req.getQueryString();
 if( queryString != null  queryString.contains(_escaped_fragment_) ){
 log.info(Detected request from Google Crawler);
 //google requests the URL with the place fragment as a query parameter.
//they do this because URL fragments (the portion after the hash #) are
//not sent with an HTTP request.
//convert the ugly URL to the real url that uses the hashbang
queryString = queryString.replaceFirst(?_escaped_fragment_=, #!);
queryString = URLDecoder.decode(queryString, UTF-8);
 StringBuilder pageToCrawlSb = new 
StringBuilder(req.getScheme()).append(://).append(req.getServerName());
if( req.getServerPort()  0 )
pageToCrawlSb.append(':').append(req.getServerPort());
pageToCrawlSb.append(req.getRequestURI());
if( ! queryString.startsWith(#!) )
pageToCrawlSb.append('?');
pageToCrawlSb.append(queryString);
 String pageToCrawl = pageToCrawlSb.toString();
log.log(Level.INFO, Page being crawled: {0}, pageToCrawl);
 //check if a snapshot of the requested page already exists
String htmlSnapshot = MemcacheUtil.getHtmlSnapshot(pageToCrawl);
if( htmlSnapshot == null ){
try{
//use HtmlUnit to render the requested page
long start = System.currentTimeMillis();
log.info(Using headless browser to fetch page);
HtmlPage page = webClient.get().getPage(pageToCrawl);
log.info(Pumping javascript event loop for 8 seconds);
webClient.get().getJavaScriptEngine().pumpEventLoop(8000); //execute 
javascript for 8 seconds
long end = System.currentTimeMillis();
log.log(Level.INFO, Time to generate page snapshot: {0} seconds, ((end - 
start) / 1000L));
 //we add a special message to the top of the page so that anyone seeing 
the snapshot will
//know it is meant for Google crawling
String snapshotMsg = new StringBuilder(body\n\n)
.append(hr /\n)
.append(center\n)
.append(  h3\n)
.append(You are viewing a non-interactive page that is intended for 
the crawler.br/\n)
.append(You probably want to see this page: a href=\ + pageToCrawl 
+ \ + pageToCrawl + /a\n)
.append(  /h3\n)
.append(/center\n)
.append(hr /\n)
.toString();
htmlSnapshot = page.asXml();
htmlSnapshot = htmlSnapshot.replaceFirst(body[^]*, snapshotMsg);
 //store the rendered page in memcache
MemcacheUtil.putHtmlSnapshot(pageToCrawl, htmlSnapshot);
}
finally{
webClient.get().closeAllWindows();
}
}
 //send the html snapshot back to the crawler
resp.setContentType(text/html; charset=UTF-8);
PrintWriter writer = resp.getWriter();
writer.print(htmlSnapshot);
}
else{
chain.doFilter(request, response);
}
}

@Override
public void destroy() {
//this is never called on Google App Engine
}
}

-- 
You received this message because you are subscribed to the Google Groups 
Google Web Toolkit group.
To view this discussion on the web visit 
https://groups.google.com/d/msg/google-web-toolkit/-/00Zmn6IfmrgJ.
To post to this group, send email to google-web-toolkit@googlegroups.com.
To unsubscribe from this group, send email to 
google-web-toolkit+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/google-web-toolkit?hl=en.



Re: Can't get Google Crawler to index my GWT-based site no matter what I do. Help!

2012-10-28 Thread Benjamin Possolo
On Sunday, October 28, 2012 7:28:05 AM UTC-7, ant...@gmail.com wrote:

 Your URLs could be further improved if you go through the proposal in 
 http://carlosaguayo.posterous.com/html5-history-in-gwt
 Was i in your position, i would do the above and then generate a 
 sitemap.xml for search engine submittion
 Antonios [dot] Chalkiopoulos [at] keepitcloud [dot] com


Thank you for taking the time to respond.

I presume you are suggesting I get rid of the hash-bang entirely from my 
URLs. I didn't know that was possible yet (apparently the HTML5 History API 
permits this; thanks for pointing that out to me). However, by doing that, 
Google would no longer consider my site an ajax site. I am following the 
ajax crawlability guidelines they document 
herehttps://developers.google.com/webmasters/ajax-crawling/docs/getting-started.
 
So when they send the special query parameter (_escaped_fragment_) my 
server knows that it should generate and return an HTML snapshot of 
whatever page/gwt-place is being crawled.

If I removed the hash-bang, google would no longer send the 
_escaped_fragment_ query parameter with their crawl requests and it would 
be near-impossible for me to know when I should generate a snapshot versus 
just returning the normal content.

-- 
You received this message because you are subscribed to the Google Groups 
Google Web Toolkit group.
To view this discussion on the web visit 
https://groups.google.com/d/msg/google-web-toolkit/-/UDUOXYl7L1QJ.
To post to this group, send email to google-web-toolkit@googlegroups.com.
To unsubscribe from this group, send email to 
google-web-toolkit+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/google-web-toolkit?hl=en.



Re: Can't get Google Crawler to index my GWT-based site no matter what I do. Help!

2012-10-28 Thread Benjamin Possolo
On Sunday, October 28, 2012 7:28:05 AM UTC-7, ant...@gmail.com wrote:

 Your URLs could be further improved if you go through the proposal in 
 http://carlosaguayo.posterous.com/html5-history-in-gwt

 Was i in your position, i would do the above and then generate a 
 sitemap.xml for search engine submittion
 Antonios [dot] Chalkiopoulos [at] keepitcloud [dot] com


I forgot to add, I already have a sitemap which I submitted to the 
Webmaster Tools. It's really short...only 15 URLs. Doesn't seem to help at 
all though.
http://marketplace.styleguise.net/sitemap.xml 

-- 
You received this message because you are subscribed to the Google Groups 
Google Web Toolkit group.
To view this discussion on the web visit 
https://groups.google.com/d/msg/google-web-toolkit/-/lOA2QLYOMl8J.
To post to this group, send email to google-web-toolkit@googlegroups.com.
To unsubscribe from this group, send email to 
google-web-toolkit+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/google-web-toolkit?hl=en.



Re: How to make ValueBoxEditorDecorator error message positionate to the right?

2012-10-27 Thread Benjamin Possolo


Add a style name to your decorator div element. i call mine textBoxDecorator 
then use the following css selectors:

.textBoxDecorator div:first-child {
float: right;
}
.textBoxDecorator div:last-child {
float: left;
}

.textBoxDecorator::after {

content: ;

display: block;

clear: both;

}

-- 
You received this message because you are subscribed to the Google Groups 
Google Web Toolkit group.
To view this discussion on the web visit 
https://groups.google.com/d/msg/google-web-toolkit/-/RqTp7xle9BoJ.
To post to this group, send email to google-web-toolkit@googlegroups.com.
To unsubscribe from this group, send email to 
google-web-toolkit+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/google-web-toolkit?hl=en.



Can't get Google Crawler to index my GWT-based site no matter what I do. Help!

2012-10-27 Thread Benjamin Possolo


I am unable to get my GWT-based site to be indexed by Google no matter what 
I do.

My URLs all look like this:

http://marketplace.styleguise.net/#!/home
http://marketplace.styleguise.net/#!/new-listings
http://marketplace.styleguise.net/#!/item/172001
http://marketplace.styleguise.net/#!/about

and so on.

I have a URL servlet handler that properly returns static HTML snapshots of 
my site (using HtmlUnit) when they are requested as:

http://marketplace.styleguise.net/?_escaped_fragment_=/home
http://marketplace.styleguise.net/?_escaped_fragment_=/new-listings
http://marketplace.styleguise.net/?_escaped_fragment_=/item/172001
http://marketplace.styleguise.net/?_escaped_fragment_=/about

My host HTML page has the special meta tag:

meta name=fragment content=!

Finally, I have a sitemap with about 15 URLs. One of them is the host page, 
the rest are all hash-bang based URLs.

Within the Webmaster Tools, Google is reporting only one page as having 
been indexed (the home page without a hash-bang). I've tried submitting my 
URLs individually using the Fetch As Googlebot tool but that seems to 
disallow one from submitting hash-bang URLs to the index, even if they 
fetch properly and the preview is correct. I've tried both with and without 
a robots.txt file as well. Nothing works!

This is driving me mad! Has anyone managed to get Google to index their GWT 
site? If so, I would REALLY appreciate any advice.

-- 
You received this message because you are subscribed to the Google Groups 
Google Web Toolkit group.
To view this discussion on the web visit 
https://groups.google.com/d/msg/google-web-toolkit/-/CWL6DtYRa8AJ.
To post to this group, send email to google-web-toolkit@googlegroups.com.
To unsubscribe from this group, send email to 
google-web-toolkit+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/google-web-toolkit?hl=en.



Re: GWT Dev Plugin broke (Chrome/mac osx)

2012-10-15 Thread Benjamin Possolo
Reverting to Chrome 21 worked for me but the fact that Google Chrome 
auto-updates means I always have to use this browser and I can never quit 
the browser either.
This is so stupid. Google, please allow users to easily disable auto-update 
for christ's sake. Its ridiculous that we always have to auto-update all 
Google products or none. This has bitten me so many times at work too.

-- 
You received this message because you are subscribed to the Google Groups 
Google Web Toolkit group.
To view this discussion on the web visit 
https://groups.google.com/d/msg/google-web-toolkit/-/sIaBAvZJch0J.
To post to this group, send email to google-web-toolkit@googlegroups.com.
To unsubscribe from this group, send email to 
google-web-toolkit+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/google-web-toolkit?hl=en.



Re: Local data cache when using AsyncDataProvider (CellTable)

2012-10-02 Thread Benjamin D.
Hello,

1)Your use of AsyncDataProvider seems interesting to me but I have a few 
questions. My Celltable also use sorting. But then when you change sorting 
order the same method (onRangeChange) is called as when you change page. 
Problem is that the behavior must be different: when I change page I'd 
should check if the data is availlable in the local client cache, but when 
sorting change I have to send a new request to the server as sorting is 
managed server side. How do you differentiate those 2 cases? Is there a 
good way to do it? Should I customize the pager?

Thanks for your help

Ben


On Saturday, January 28, 2012 6:46:14 PM UTC+1, Ümit Seren wrote:

 Well I have an application in which I display 1.2 million items in a 
 CellTable (50 items at a time). 
 I solved that by using AsyncDataProvider and doing bulk-requests of around 
 2000 items (you can play with that vaue).

 I have a SimplePager which displays 50 of them at a time and when the user 
 pages through it it won't do any server request until the list of 2000 is 
 completed. Then I request the next 2000 items (actually that is 
 automatically taken care of by the AsyncDataProvider interface). 

 For filtering/searching I implemented a hybrid approach. For example if 
 the user types in a string for a name it will first search on the server. 
 Again only 2000 items will be sent back from the backend. For each new 
 character I will do another server-request. However I also return the 
 number of hits (which the search returns). If the number of hits is smaller 
 than 2000 the next time the user types in another character it will only 
 search on the client side (because I already have the whole search set 
 transfered to the client). 

 For sorting you can take the same path. 

 To be honest I am not sure if it's worth just sending the IDs and then 
 replacing it later with a second call with the missing real objects. I 
 don't think it will be much of a performance problem even when you have a 
 lot of user requests at the same time. You can try to solve that problem on 
 the backend (via caching, etc) and if you still have an issue you can 
 implement your approach.
 Don't forget Knuth famous quote: *Premature optimization is the root of 
 all evil*



-- 
You received this message because you are subscribed to the Google Groups 
Google Web Toolkit group.
To view this discussion on the web visit 
https://groups.google.com/d/msg/google-web-toolkit/-/mEFB8TQLB50J.
To post to this group, send email to google-web-toolkit@googlegroups.com.
To unsubscribe from this group, send email to 
google-web-toolkit+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/google-web-toolkit?hl=en.



Re: Java 7

2012-09-25 Thread Benjamin Wolff
Hi,

sorry for gravedigging, but the title of this thread seems suitable.

Since Java 6 reaches its End-Of-Life cycle at the beginning of next year, 
does the GWT team has concrete plans to support Java 7?

See: http://www.oracle.com/technetwork/java/eol-135779.html

Cheers,
Ben

-- 
You received this message because you are subscribed to the Google Groups 
Google Web Toolkit group.
To view this discussion on the web visit 
https://groups.google.com/d/msg/google-web-toolkit/-/buQJiZhy3m4J.
To post to this group, send email to google-web-toolkit@googlegroups.com.
To unsubscribe from this group, send email to 
google-web-toolkit+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/google-web-toolkit?hl=en.



AutoBean Category Implementation Inheritance

2012-07-19 Thread Benjamin DeLillo

When using AutoBean Categories

Given:
I have two interfaces, A and B
B extends A

I have a Category class for each, ACategory and BCategory 

I have an @Category annotation on my ObjectFactory for each

Question:
will the AutoBean produced by factory.b() have the methods implemented 
in ACategory and in BCategory, or only those in BCategory?

-- 
You received this message because you are subscribed to the Google Groups 
Google Web Toolkit group.
To view this discussion on the web visit 
https://groups.google.com/d/msg/google-web-toolkit/-/thOpW1s5cIEJ.
To post to this group, send email to google-web-toolkit@googlegroups.com.
To unsubscribe from this group, send email to 
google-web-toolkit+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/google-web-toolkit?hl=en.



Re: To any Editors Gurus: I could use some ListEditor use help for the GWT demo I've made...

2012-02-11 Thread Benjamin Seber
Thanks for all your stuff Brandon!

I also got stuck with the Editor Framework over the last days...
And I still have one problem...

ListEditor#getList#remove does not really work if you use constraint 
annotations.
AbstractRequestContext#create puts the entity in a map. But it will never 
be removed from it, not until AbstractRequestContext#processPlayload is 
finished successfully. So AbstractRequestContext#makePayload uses all 
created proxies which will be validated.

Am I wrong? Should it work or does anyone have a solution?

-- 
You received this message because you are subscribed to the Google Groups 
Google Web Toolkit group.
To view this discussion on the web visit 
https://groups.google.com/d/msg/google-web-toolkit/-/UK7RzIGt6_wJ.
To post to this group, send email to google-web-toolkit@googlegroups.com.
To unsubscribe from this group, send email to 
google-web-toolkit+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/google-web-toolkit?hl=en.



Re: SubmitCompleteEvent.getResults() is null in devmode

2011-12-06 Thread Benjamin Seber
Thank you, Thomas. As so often, i've found a posting on stackoverflow after 
i asked here...
http://stackoverflow.com/questions/7476420/gwt-blobstore-error-calling-createuploadurl

Will try things out tomorrow.

-- 
You received this message because you are subscribed to the Google Groups 
Google Web Toolkit group.
To view this discussion on the web visit 
https://groups.google.com/d/msg/google-web-toolkit/-/vtS6wiYkdxgJ.
To post to this group, send email to google-web-toolkit@googlegroups.com.
To unsubscribe from this group, send email to 
google-web-toolkit+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/google-web-toolkit?hl=en.



SubmitCompleteEvent.getResults() is null in devmode

2011-12-05 Thread Benjamin Seber
Hi,

I'd like to upload an image and get it's serving URL through GAE 
ImagesServiceFactory.
I've found this tutorial: 
http://ikaisays.com/2010/09/08/gwt-blobstore-the-new-high-performance-image-serving-api-and-cute-dogs-on-office-chairs/
Deployed on GAE it works perfectly. But running locally in devmode, there 
occurs following error in the javascript console:

*Unsafe JavaScript attempt to access frame with URL 
http://t410:/upload?uploadedImageKey=xxx from frame with URL 
http://127.0.0.1:/photosharing/hosted.html?photosharing. Domains, 
protocols and ports must match.*
*
*
Is there any workaround for devmode?

-- 
You received this message because you are subscribed to the Google Groups 
Google Web Toolkit group.
To view this discussion on the web visit 
https://groups.google.com/d/msg/google-web-toolkit/-/PR7A3l0iFnEJ.
To post to this group, send email to google-web-toolkit@googlegroups.com.
To unsubscribe from this group, send email to 
google-web-toolkit+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/google-web-toolkit?hl=en.



entry point being ignored

2011-07-14 Thread Benjamin
Hi All,

I was happily coding away in IntelliJ and moved a large chunk of code
into another module, and then added that module to my main GWT project
as a dependency. Everything works perfectly in dev mode when I run the
debugger etc. When I deploy to app engine it's as if my Entry Point
module is never called.  The HTML welcome page loads but the entry
point doesn't do anything. No errors or anything - it's very hard to
debug since i can't even get my java to run.

any thoughts?!

Ben

-- 
You received this message because you are subscribed to the Google Groups 
Google Web Toolkit group.
To post to this group, send email to google-web-toolkit@googlegroups.com.
To unsubscribe from this group, send email to 
google-web-toolkit+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/google-web-toolkit?hl=en.



Re: RemoteService referencing another RemoteService

2011-05-06 Thread Benjamin S.
What do you exactly mean by dependeny injection? Might you have a
little example for me?

On 5 Mai, 16:30, Juan Pablo Gardella gardellajuanpa...@gmail.com
wrote:
 In server side is plain Java. Use of DI can help you

 2011/5/5 Benjamin S. b.stei...@gloeckle-direct.de







  I have multiple RemoteServices in my project. Now I need to call a
  method from another RemoteService, so a RemoteService should call
  another RemoteService. I tried to create the service with GWT.create,
  but this seems only possible on clientside. Is this somehow possible?

  --
  You received this message because you are subscribed to the Google Groups
  Google Web Toolkit group.
  To post to this group, send email to google-web-toolkit@googlegroups.com.
  To unsubscribe from this group, send email to
  google-web-toolkit+unsubscr...@googlegroups.com.
  For more options, visit this group at
 http://groups.google.com/group/google-web-toolkit?hl=en.

-- 
You received this message because you are subscribed to the Google Groups 
Google Web Toolkit group.
To post to this group, send email to google-web-toolkit@googlegroups.com.
To unsubscribe from this group, send email to 
google-web-toolkit+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/google-web-toolkit?hl=en.



RemoteService referencing another RemoteService

2011-05-05 Thread Benjamin S.
I have multiple RemoteServices in my project. Now I need to call a
method from another RemoteService, so a RemoteService should call
another RemoteService. I tried to create the service with GWT.create,
but this seems only possible on clientside. Is this somehow possible?

-- 
You received this message because you are subscribed to the Google Groups 
Google Web Toolkit group.
To post to this group, send email to google-web-toolkit@googlegroups.com.
To unsubscribe from this group, send email to 
google-web-toolkit+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/google-web-toolkit?hl=en.



Re: GWT Validator

2010-10-22 Thread Benjamin Papez
Hello Nick,

thanks for the infos. For now we have implemented just limited
validation possibilities (mandatory, ranges and regexp) and will go
with that for the next release of our product. We will add more
sophisticated validation capabilities later then, I don't know yet if
the GWT validator will be suitable. I was wrapping the JCR nodes with
DynaBeans before, but AFAIK this is not possible with GWT as Java
reflection is not supported on client side and would need to be dealt
with while compiling. So, it looks quite complex.

Regards,
Benjamin

On 21 Okt., 01:23, Nick Chalko n...@chalko.com wrote:
 Hi Benjamin,
 Thanks for you interest in GWT Validation.
 I am excited to work on it, but it is my 20% project not my normal
 project, so the progress on this will be slow at times.

 The first thing to remember is that this is PRE ALPHA code.  While it
 will do constraint checking on the client side right now,  There are
 so many constraints that make it basically unusable.

 Seehttps://wave.google.com/wave/waveref/googlewave.com/w+yAUzf_-lA/~/con...

 On Oct 20, 1:26 pm, Benjamin Papez jahia.pa...@gmail.com wrote:

  Hello,

  I saw the recent ongoing work on GWT validation  
  (http://gwt-code-reviews.appspot.com/863801). I am currently in the
  process of evaluating how to best implement validations into our CMS
  product (http://www.jahia.org) as we offer content editing via GWT
  panels. The only problem is that we do not really have beans, but as
  the product is based on JCR, we have JCR nodes, which can be asked for
  properties with getProperty(propertyName).

  1.) Do you perhaps know if the GWT validation will solely be based
  on Java Beans or will it also be possible to define the validations in
  an XML file, where the beans / properties are not necessarily
  JavaBeans, but can be JCR nodes and properties ? In previous versions
  I used commons-validator and DynaBean interface to wrap around our JCR
  nodes and act as a bean, but I guess that hibernate validator and GWT
  validation needs real bean classes.

 I am doing my best to implement JSR-303 bean validation.  Which is
 based on beans, but it does have a way of expressing constraints in
 XML.  I am a long way from being able to support that in GWT.  so for
 now wrapping you JCR may be the best choice.



  2.) We are using GWT 2.0.4, can your work also be used with this
  version or do we need to wait and upgrade to a future version ?

 I suppose you could try to pull out the parts from head and use it.

 With the current state I would wait.  Unless you want to help be get
 checkout GWT from svn HEAD and help me make it 
 work.http://code.google.com/webtoolkit/makinggwtbetter.html

 R,
 Nick



  Regards,
  Benjamin

-- 
You received this message because you are subscribed to the Google Groups 
Google Web Toolkit group.
To post to this group, send email to google-web-tool...@googlegroups.com.
To unsubscribe from this group, send email to 
google-web-toolkit+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/google-web-toolkit?hl=en.



GWT Validator

2010-10-20 Thread Benjamin Papez
Hello,

I saw the recent ongoing work on GWT validation  (
http://gwt-code-reviews.appspot.com/863801 ). I am currently in the
process of evaluating how to best implement validations into our CMS
product ( http://www.jahia.org ) as we offer content editing via GWT
panels. The only problem is that we do not really have beans, but as
the product is based on JCR, we have JCR nodes, which can be asked for
properties with getProperty(propertyName).

1.) Do you perhaps know if the GWT validation will solely be based
on Java Beans or will it also be possible to define the validations in
an XML file, where the beans / properties are not necessarily
JavaBeans, but can be JCR nodes and properties ? In previous versions
I used commons-validator and DynaBean interface to wrap around our JCR
nodes and act as a bean, but I guess that hibernate validator and GWT
validation needs real bean classes.

2.) We are using GWT 2.0.4, can your work also be used with this
version or do we need to wait and upgrade to a future version ?

Regards,
Benjamin

-- 
You received this message because you are subscribed to the Google Groups 
Google Web Toolkit group.
To post to this group, send email to google-web-tool...@googlegroups.com.
To unsubscribe from this group, send email to 
google-web-toolkit+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/google-web-toolkit?hl=en.



Re: My app - shameless plug :-)

2010-02-14 Thread Benjamin
Hi Cris, thanks!

To be honest, i've been working on a data historian for over 6 years
in one form or another. I always ran into problems with either
scalability or delivery. Always ended up having to tell a client they
needed to build a huge server to run my code - and i was just another
expensive historian.  It wasn't until the advent of cloud computing
that I was able to deliver the service.

I couldn't even begin to calculate how much time i put into the
compression algorithms, calculation engine and all of the things i put
into the back end and how much time I put into the app itself. Since
the hard part was done, it only took me two days to put together the
android piece, and about two weeks to create with the windows desktop
client. That's the great thing about SOA.

-Ben

On Feb 14, 5:43 am, Chris Lercher cl_for_mail...@gmx.net wrote:
 Looks good, great idea! First question: How many hours did you invest
 to develop the AppEngine/GWT app? And how many additionally for the
 Android interface?

 Chris

-- 
You received this message because you are subscribed to the Google Groups 
Google Web Toolkit group.
To post to this group, send email to google-web-tool...@googlegroups.com.
To unsubscribe from this group, send email to 
google-web-toolkit+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/google-web-toolkit?hl=en.



Re: My app - shameless plug :-)

2010-02-14 Thread Benjamin
Duong, if your question was for me - i'm seriously considering going
open source with Nimbits. There are a few reasons i have to keep parts
of it proprietary. I will almost certainly release to source to all of
the client interfaces - in fact, i put a lot of free code on my blog:
http://nimbits.blogspot.com/

The whole point of nimbits is to provide a single place to store and
share historical data - and it provides web services you can program
on top of - i'm posting code on how to do this every day.

There are a couple of parts of the backend platform i spent so much
time on, it's hard to open it up to the world - but it gives me
something to think about. Thanks for your post.

Ben



On Feb 14, 11:43 am, John Denley johnvden...@googlemail.com wrote:
 LOL, well firstly my source code is probably not at all well written!

 I am looking to employ a real programmer to completely rewrite my
 application in the next few months though, assuming that someone doesnt buy
 us! ;)

 On the other hand if someone can either point me to a really good website,
 or write to me offline and explain to me why open source is a good way to
 go, and how I can protect my product from being stolen if I do put it open
 source?

 On 14 February 2010 16:34, Duong BaTien duong.bat...@gmail.com wrote:



  Hi:

  Is there any thought of Sharing the source code for the community
  benefits? It is very easy with athttp://code.google.com/p/yourProject

  Duong Batien
  DBGROUPS and BudhNet

  On Sun, 2010-02-14 at 06:48 -0800, Benjamin wrote:
   Hi Cris, thanks!

   To be honest, i've been working on a data historian for over 6 years
   in one form or another. I always ran into problems with either
   scalability or delivery. Always ended up having to tell a client they
   needed to build a huge server to run my code - and i was just another
   expensive historian.  It wasn't until the advent of cloud computing
   that I was able to deliver the service.

   I couldn't even begin to calculate how much time i put into the
   compression algorithms, calculation engine and all of the things i put
   into the back end and how much time I put into the app itself. Since
   the hard part was done, it only took me two days to put together the
   android piece, and about two weeks to create with the windows desktop
   client. That's the great thing about SOA.

   -Ben

   On Feb 14, 5:43 am, Chris Lercher cl_for_mail...@gmx.net wrote:
Looks good, great idea! First question: How many hours did you invest
to develop the AppEngine/GWT app? And how many additionally for the
Android interface?

Chris

  --
  You received this message because you are subscribed to the Google Groups
  Google Web Toolkit group.
  To post to this group, send email to google-web-tool...@googlegroups.com.
  To unsubscribe from this group, send email to
  google-web-toolkit+unsubscr...@googlegroups.comgoogle-web-toolkit%2Bunsubs 
  cr...@googlegroups.com
  .
  For more options, visit this group at
 http://groups.google.com/group/google-web-toolkit?hl=en.

-- 
You received this message because you are subscribed to the Google Groups 
Google Web Toolkit group.
To post to this group, send email to google-web-tool...@googlegroups.com.
To unsubscribe from this group, send email to 
google-web-toolkit+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/google-web-toolkit?hl=en.



My app - shameless plug :-)

2010-02-13 Thread Benjamin
Hey Guys,

Well i'm pretty much ready to release my app engine / GWT app to the
world so i thought i would put out a quick post about the Beta to you
guys.

I've worked for 12 years in the process control / manufacturing
industry and I've done a lot of work with Data Historians - these are
huge systems that cost tens of thousands of $ - I always wanted a
small / cheaper data historian i could hook my Aquarium up to so I
made one.

http://www.nimbits.com is online and provides a service for
efficiently storing time series data (such as a changing temperature)
on App Engine. You can code against it as a service or use one of our
UIs. I posted a Windows Desktop App, An Android Interface, and a lot
of sample code on the web site.

As you feed time series data into data points, you can perform
calculations on the data, get email alerts, and see your changing
values in spreadsheets, diagrams and your phone.  There is also a
social networking aspect to it; you can share your datapoints with
friends.

Check out the website, it's all free - i hope you guys can get some
use out of it and as always, i appreciate any feedback.  I'd also be
happy to answer any questions if you'd like to know how any of the GWT
functionality was developed.

Here is a blog posting of mine that has some screen shots and more
info:

http://nimbits.blogspot.com/2009/11/quick-view-of-nimbits.html

Ben

-- 
You received this message because you are subscribed to the Google Groups 
Google Web Toolkit group.
To post to this group, send email to google-web-tool...@googlegroups.com.
To unsubscribe from this group, send email to 
google-web-toolkit+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/google-web-toolkit?hl=en.



Re: username/password when using GAE

2010-02-13 Thread Benjamin
John,

I put a lot of time putting together this blog posting to consolidate
the process of authenticating a client to app engine - the sample i
posted definitely works - it's tailored for Android clients but i hope
it helps you - all about getting the auth token.

http://javagwt.blogspot.com/2009/12/authenticating-android-app-to-google.html

On Feb 13, 1:55 pm, gengstrand gengstr...@gmail.com wrote:
 First, take a look at this article and see if it covers your needs.
 This is the official position on GAE and authentication.

 http://code.google.com/appengine/articles/auth.html

 If that's not going to cut it for you, then take a look 
 athttp://www.mindrot.org/projects/jBCrypt/

 If you were using GWT and weren't going to deploy for a while, then
 you might want to take a look 
 athttp://code.google.com/p/google-web-toolkit/wiki/RpcAuth

 I hope this helps.

 On Feb 12, 9:14 pm, John V Denley johnvden...@googlemail.com wrote:



  really no responses on this one?

  On Feb 11, 11:19 pm, John V Denley johnvden...@googlemail.com wrote:

   There are plenty of (fairly indepth  technical) conversations on here
   about the use of passwords and how to send the data/password to the
   server.

   It very much seems a consensus that unless you are using HTTPS/SSL
   then its totally pointless doing anything on the client.

   Given that Google App Engine does not support HTTPS/SSL, what is
   everyones opinion on this matter, what IS the best practice?

   As a side bar on this, up to now I have been using the google account
   login to deal with all this, but have been getting a LOT of resistance
   from my potential user community who get very lost and confused about
   the process when having to create a google account, prior to being
   able to create an account in my system, hence the need to look at
   having my own security, which scares me as I dont know anything about
   this subject, but I want my users logons/data to be safe and secure.

-- 
You received this message because you are subscribed to the Google Groups 
Google Web Toolkit group.
To post to this group, send email to google-web-tool...@googlegroups.com.
To unsubscribe from this group, send email to 
google-web-toolkit+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/google-web-toolkit?hl=en.



NT User name

2009-11-19 Thread Benjamin
A little stuck on this today, there are some posts on the subject but
the seem outdated.

I'm building a web app using GWT the is running internally on a JBOSS
Server. I need to get the user name of the current user logged into
the XP Workstation (via Active Directory) who is viewing the web
site.

In ASP.NET i would have set IIS to NT authentication and used
request.servervaraibles(LOGON_USER) to get it

I'm having trouble finding out the equivilitent in this framework. Any
guidence would be much appreciated. I just need their user name and
don't need to pass on any security tokens etc)


Ben

--

You received this message because you are subscribed to the Google Groups 
Google Web Toolkit group.
To post to this group, send email to google-web-tool...@googlegroups.com.
To unsubscribe from this group, send email to 
google-web-toolkit+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/google-web-toolkit?hl=.




Re: rpc serialization problem

2009-10-26 Thread Benjamin

I'm passed these problems now - a couple of things i learned when
creating object and storing in data nucleus for later retrieval over
an RPC call

- Most importantly, if you are returning a complex object (like one
with a list of another type of object) you need to return a copy, not
the object data nucleus returns - return persitenceManager.detachCopy
(object)  - the object returned by PM has all sorts of stuff in it
that can't be serialized, the detached copy does not.

Next, if your are creating an object with lists of other object that
are not necessarily parent/child relationships or anything you want to
persist, you need to decorate it with @NotPersistent because app
engine will mark things as persistent for you even if you don't want
it or mark it as persistent. See this note in the doc:

Tip: JDO specifies that fields of certain types are persistent by
default if neither the @Persistent nor @NotPersistent annotations are
specified, and fields of all other types are not persistent by
default. See the DataNucleus documentation for a complete description
of this behavior. Because not all of the App Engine datastore core
value types are persistent by default according to the JDO
specification, we recommend explicitly annotating fields as
@Persistent or @NotPersistent to make it clear.
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
Google Web Toolkit group.
To post to this group, send email to google-web-toolkit@googlegroups.com
To unsubscribe from this group, send email to 
google-web-toolkit+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/google-web-toolkit?hl=en
-~--~~~~--~~--~--~---



Problem using PagingScrollTable

2009-10-09 Thread benjamin strappazzon

Hi group,

I'm looking for a simple piece of code which shows how to use
PagingScrollTable from GWT incubator. Especially I'd like to
understand how TableModel and TableDefinition work?

I've looked at the documentation on GWT incubator web site but it is
still in progress and I didn't find the informations I was looking
for.

I've tried to create my own PagingScrollTable but it remains empty, I
think that I don't use it the right way.

Thank you for your help







--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
Google Web Toolkit group.
To post to this group, send email to google-web-toolkit@googlegroups.com
To unsubscribe from this group, send email to 
google-web-toolkit+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/google-web-toolkit?hl=en
-~--~~~~--~~--~--~---



Re: rpc serialization problem

2009-10-06 Thread Benjamin

I'm struggeling with this now - did you guys solve it?  I have a
simple client class that will be a parent in a simple parent-child
relationship.  If i add an ArrayList property to the parent class (i
don't even have to decorate it as persistant) i get

EVERE: [1254861190636000] javax.servlet.ServletContext log: Exception
while dispatching incoming RPC call
com.google.gwt.user.client.rpc.SerializationException: Type
'org.datanucleus.sco.backed.List' was not included in the set of types
which can be serialized by this SerializationPolicy or its Class
object could not be loaded. For security purposes, this type will not
be serialized.

i've tried java.util.list and java.util.arraylist with same result -
defiitly not a 'org.datanucleus.sco.backed.List'

what's odd is that the RPC call runs in a way and the object is
persisted but without the list field.

Anyway - this seems like something that can't be passed in an RPC call
but i don't see why

@PersistenceCapable(identityType = IdentityType.APPLICATION)
public class Catagory extends BaseTreeModel implements Serializable {

public  Catagory() {}

private static final long serialVersionUID = 1L;
@PrimaryKey
@Persistent(valueStrategy = IdGeneratorStrategy.IDENTITY)
@Extension(vendorName=datanucleus, key=gae.encoded-pk,
value=true)
private String key;

 @Persistent(mappedBy = catagory)
   private  ListSubCatagory subcatagories;


}



On Sep 22, 5:43 am, Angel gonzalezm.an...@gmail.com wrote:
 i have the same problem

 On 5 ago, 04:52, mike m...@introspect.com wrote:



  I have a simple one-to-many betwen two entities.  The parent entity
  uses List to contain the child entities.  I am able to persist these
  entities in the datastore without problems.

  However, when reading a root entity at the server, I get:

  rpc.SerializationException: Type 'org.datanucleus.sco.backed.List' was
  not included in the set of types  which can be serialized...

  The entities are successfully read from the datastore, but something
  in Datanucleus doesn't build the List correctly.

  Has anyone found a workaround for this serialization problem.

  Thanks

  GWT 1.7 GAE 1.2.2- Hide quoted text -

 - Show quoted text -
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
Google Web Toolkit group.
To post to this group, send email to google-web-toolkit@googlegroups.com
To unsubscribe from this group, send email to 
google-web-toolkit+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/google-web-toolkit?hl=en
-~--~~~~--~~--~--~---



Re: How to handle Multiple Modules at run time?

2009-09-23 Thread benjamin strappazzon

I group,

Just for information, I carry out a study on integrating GWT on an
home made framework and I have the same issue. Application written
with the framework can be quite huge and I'm wondering if it'is
possible to load module on demand?

On 23 sep, 04:12, ak kondal...@gmail.com wrote:
 Depending on user selection, I need to handle multiple applications at
 runtime. I don't want load all modules at startup, because this takes
 long time to load.

 Can some one help me to resolve this?

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
Google Web Toolkit group.
To post to this group, send email to google-web-toolkit@googlegroups.com
To unsubscribe from this group, send email to 
google-web-toolkit+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/google-web-toolkit?hl=en
-~--~~~~--~~--~--~---



Reading a file on the server

2009-09-11 Thread Benjamin

Hey guys - this has been driving me nuts all day.  Should be simple.
My GWT project works with data on a SQL server and I use the MS SQL
jdbc drivers.  I want to keep my connection string in a configuration
file instead of hardcoded in the java. (in my old .net days i would
use the web.config)

1 - what's the best place to keep this data? (I wouldn't just want an
xml file in the path that could be downloaded).

2 - when i have the right place in the project to keep this info, how
do i retrieve it in *.server code?

thanks!

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
Google Web Toolkit group.
To post to this group, send email to google-web-toolkit@googlegroups.com
To unsubscribe from this group, send email to 
google-web-toolkit+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/google-web-toolkit?hl=en
-~--~~~~--~~--~--~---



[gwt-contrib] Re: Better support of IE6 for ImageResourceGenerator

2009-08-07 Thread Benjamin Lerman

 Hi,

 As for the question on adding another permutations... I think that
 adding an ie7 permutation might be not necesarry. I posted a small
 example on how I handle ie6/7(or 8 in ie7 mode) in my application...
 it just means a small extra indirection but the cost is very low. It's
 not like we are creating ImageBundles in a tight loop in our
 applications (that is a bit against the whole idea of using them in
 the first place).

 Your remark just made me think to something.

 The problem with extra permutations is mainly compile time.

 When 2 permutations are very close to one another (a lot of deferred
binding will lead to the same implementation for the 2 permutations),
dynamic selection through indirection might not be that costly in
performance. There is also a loss because of some optimization that will
not take place, but one will have to accept that.

 Then GWT could have an option to say that such and such permutation
must be separated at runtime instead of compile time. That will allow
the compilation to be as quick as now, but the designers will still be
able to use the deferred binding mechanism to handle ie6/ie7 (for
example).

 Moreover, one can imagine an option to have all permutations separated
at runtime for speeding up the compilation in development mode.

 Did I miss something obvious?

-- 
Benjamin Lerman

--~--~-~--~~~---~--~~
http://groups.google.com/group/Google-Web-Toolkit-Contributors
-~--~~~~--~~--~--~---



[gwt-contrib] Re: support for internationalized svninfo

2009-07-07 Thread Benjamin Lerman

 Description:
 This is in response to Sebastien's complaint of 1jul09, that trunk
 didn't compile because his French svn info gave output that didn't match
 our English regexps.
 
 There are two parts to this:
1. If the output propety is already defined, don't
   run svn, don't match the output, don't risk failing.
   That would have given Sebastien a workaround, by
   defining gwt.svnrev in local.ant.properties.
2. Change the regexps to be word-neutral, so that they
   don't care about the language of the tags, just the
   shape of the values.  This trades a language
   sensitivity for a positional one.

 Wouldn't using svn info --xml solve those problems?

-- 
Benjamin Lerman

--~--~-~--~~~---~--~~
http://groups.google.com/group/Google-Web-Toolkit-Contributors
-~--~~~~--~~--~--~---