Re: Call client method from server

2016-03-15 Thread Greg
Don't forget about EventSource / Server Sent Events. 

Browser support: http://caniuse.com/#search=eventsource
There are polyfills for IE/Edge: https://github.com/Yaffle/EventSource (there 
are other mentioned in README.md)

The advantage over websockets is that it uses plain http connection, just 
long lived and managed by the browser itself (do not mistake it for long 
polling). That means it should not be affected by firewalls.

On Tuesday, March 15, 2016 at 10:21:46 AM UTC+1, subhro wrote:
>
> U can also look at Errai Framework. It allows client specific messaging as 
> well as server push.
> http://erraiframework.org/
>
> Its built on top of GWT, so u dont have to do JSNI mess.
>
> HTH, 
> Subhro.
>
> On Tue, Mar 15, 2016 at 2:37 PM, Frank  
> wrote:
>
>> signalR (although from Microsoft) works really well in my opinion.
>> And is pretty straight forward to wrap in GWT.
>>
>> Op maandag 14 maart 2016 09:28:04 UTC+1 schreef Łukasz Drzyzga:
>>>
>>> Hi, I wonder if it's possibile to call method of specific client from 
>>> server eg. using RPC? I have to do something in client nr 1 after another 
>>> client send some data to server? 
>>>
>> -- 
>> 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-we...@googlegroups.com 
>> .
>> Visit this group at https://groups.google.com/group/google-web-toolkit.
>> For more options, visit https://groups.google.com/d/optout.
>>
>
>

-- 
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: Deploy GWT App to Google App Engine

2016-03-06 Thread Greg
https://cloud.google.com/appengine/docs/java/tools/maven#uploading_your_app_to_production_app_engine

On Sunday, March 6, 2016 at 9:05:53 PM UTC+1, Stefan Falk wrote:
>
> Well, I don't know. I can remember when I did it last time it was a 
> one-liner in the command line. I think I had something like a secret or API 
> key or something like that and I could deploy the web application to GAE. 
>
> I was searching and searching but I can't find that anymore. How do you 
> deploy your gwt-maven-archetype to GAE (if you do)?
>
> On Sunday, 6 March 2016 18:22:27 UTC+1, Thomas Broyer wrote:
>>
>> Isn't the appengine-maven-plugin offering a goal to do the upload?
>
>

-- 
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: Use synchronous RPC on browser close ?

2016-02-15 Thread Greg
Take a look at http://caniuse.com/#search=beacon

Support across browsers is average but at least on Chrome and FF you will 
get proper behavior.

On Monday, February 15, 2016 at 4:03:50 PM UTC+1, Rocco De Angelis wrote:
>
> Hi Dominic, 
> This is not necessary. Simply create a package with the name com.google in 
> your project that's all! 

-- 
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: Is there any GWT library to be used in client side that does the same thing as Scalr (scale and reduze image file sizes)?

2016-01-25 Thread Greg
Just use context.getCanvas().toDataUrl(); which will return data uri with 
the contents of the canvas. You can use it directly in  element 
or send it to server.

On Monday, January 25, 2016 at 3:19:03 PM UTC+1, Julio Heitor Nobrega wrote:
>
> I have just found an example (http://c.gwt-examples.com/home/ui/canvas).
>
> The only problem is to convert ImageData to an byte array :)
>
> Regards!
>
>
>
> 2016-01-25 12:08 GMT-02:00 Julio Heitor Nobrega <julioh...@gmail.com 
> >:
>
>> Does anyone have some examples regarding the Canvas class?
>>
>> I've seen the java doc API but the only methods i think that could be 
>> useful was:
>>
>> Context2d 
>> <http://www.gwtproject.org/javadoc/latest/com/google/gwt/canvas/dom/client/Context2d.html>
>>  *getContext2d 
>> <http://www.gwtproject.org/javadoc/latest/com/google/gwt/canvas/client/Canvas.html#getContext2d%28%29>*
>> () 
>>   Returns a 2D rendering context. 
>>  void *setCoordinateSpaceHeight 
>> <http://www.gwtproject.org/javadoc/latest/com/google/gwt/canvas/client/Canvas.html#setCoordinateSpaceHeight%28int%29>*
>> (int height) 
>>   Sets the height of the internal canvas coordinate space.  
>> void *setCoordinateSpaceWidth 
>> <http://www.gwtproject.org/javadoc/latest/com/google/gwt/canvas/client/Canvas.html#setCoordinateSpaceWidth%28int%29>*
>> (int width) 
>>   Sets the width of the internal canvas coordinate space. 
>>
>> 2016-01-14 16:36 GMT-02:00 Kirill Prazdnikov <pki...@gmail.com 
>> >:
>>
>>> Canvas is an DOM Element.
>>> It can render Image Elements to itself in any resolution.
>>> However it may produce not nice results.
>>>
>>> It depends on what you need.
>>>
>>> On Thursday, January 14, 2016 at 9:17:36 PM UTC+3, Julio Heitor Nobrega 
>>> wrote:
>>>>
>>>> Hi guys,
>>>>
>>>> thanks everyone for the answers!
>>>>
>>>> Greg,  is Canvas a GWT framework or its a class that belong to GWT 
>>>> itself?
>>>>
>>>> Do you have any example of use?
>>>>
>>>> Regards
>>>>
>>>>
>>>>
>>>> Em quinta-feira, 14 de janeiro de 2016 11:25:29 UTC-2, Julio Heitor 
>>>> Nobrega escreveu:
>>>>>
>>>>> Hi guys,
>>>>>
>>>>> i am trying to upload images with 2mb size but i don't want to send 
>>>>> the whole original image to the server. 
>>>>>
>>>>> What i would like to do is reduce the image dimensions from, for 
>>>>> example, *1000x1000* to *50x50* and reduce the file size
>>>>> from *2mb* to *~25kb* as well and at the end send the *~25kb* image 
>>>>> to the server.
>>>>>
>>>>> I know there is the Scalr framework that does that in java, but its no 
>>>>> compatible with GWT clients.
>>>>>
>>>>> Is there any client side GWT library that does the same thing as Scalr?
>>>>>
>>>>> Best Regards!
>>>>>
>>>>>
>>>>> -- 
>>> You received this message because you are subscribed to a topic in the 
>>> Google Groups "GWT Users" group.
>>> To unsubscribe from this topic, visit 
>>> https://groups.google.com/d/topic/google-web-toolkit/8OfazCLtcLA/unsubscribe
>>> .
>>> To unsubscribe from this group and all its topics, send an email to 
>>> google-web-toolkit+unsubscr...@googlegroups.com .
>>> To post to this group, send email to google-we...@googlegroups.com 
>>> .
>>> Visit this group at https://groups.google.com/group/google-web-toolkit.
>>> For more options, visit https://groups.google.com/d/optout.
>>>
>>
>>
>

-- 
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: Is there any GWT library to be used in client side that does the same thing as Scalr (scale and reduze image file sizes)?

2016-01-14 Thread Greg
Hi

Yes, it's possible. You have to read the contents of selected file first 
and then use Canvas to resize it (link 

).

On Thursday, January 14, 2016 at 2:25:29 PM UTC+1, Julio Heitor Nobrega 
wrote:
>
> Hi guys,
>
> i am trying to upload images with 2mb size but i don't want to send the 
> whole original image to the server. 
>
> What i would like to do is reduce the image dimensions from, for example, 
> *1000x1000* to *50x50* and reduce the file size
> from *2mb* to *~25kb* as well and at the end send the *~25kb* image to 
> the server.
>
> I know there is the Scalr framework that does that in java, but its no 
> compatible with GWT clients.
>
> Is there any client side GWT library that does the same thing as Scalr?
>
> Best Regards!
>
>
>

-- 
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: Compile a Java application into a single JavaScript file?

2015-12-14 Thread Greg
You could use Single Script Linker instead of default Cross Site IFrame 
Linker by adding this into your module.gwt.xml:




You have to collapse all properties because sso linker doesn't generate 
permutation selection script. After compilation you should get single js 
file which contains all the logic for different browsers / languages etc. 
Alternatively you could explicitly specify properties but it would mean you 
would get js file for single browser / language.

On Sunday, December 13, 2015 at 2:58:21 AM UTC+1, Michael Zhou wrote:
>
> I have used GWT to compile a Java application (Google's Closure Compiler 
> ) into a GWT application 
> .
> Currently, GWT outputs a .cache.js file and a .nocache.js file. I wonder 
> if it's possible to output a single .js file instead of two?
> We might switch to J2CL when it's ready, but just in case it's possible to 
> do so with GWT 2.8.
>

-- 
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: Progress bar during GWT bootstrap process?

2015-10-27 Thread Greg
Hi

I used GWT Lightweight Metrics in several of my projects. The progress 
looks real and gives some idea to a user how long he has to wait.

More info here:
http://www.gwtproject.org/doc/latest/DevGuideLightweightMetrics.html

Basically you have to put static script before nocache.js file that 
registers for metric events and from it updates the length of the progress 
bar.

Most of the time I just counted the amount of events required to show the 
actual app (I used a splash div with progress bar which hides the app until 
it's ready) including bootstrap and rpc events and used it as total amount 
for progress bar.

The drawback is, there are only 2 events fired when GWT loads scripts from 
gwt.xml. If you load big js libraries let me know so I can post a 
workaround for that :)

Greg

On Tuesday, October 27, 2015 at 7:26:33 PM UTC+1, Vassilis Virvilis wrote:
>
> As I said check that the content you serve is compressed.
>
> One other idea that pops to mind is the browser's developer's tools net 
> tab to make sure that the problem is indeed in the loading of resources. 
> Maybe you can identify a problematic resource? Or that the problem is not 
> in the GWT script?
>
> Otherwise I agree with Peter Donald post above for the most effective way 
> to have a spinner/blocker element during load.
>
> On Tue, Oct 27, 2015 at 8:16 PM, Ali Akhtar <ali.r...@gmail.com 
> > wrote:
>
>> I use cssresource, etc. With all the images, etc combined, the size can 
>> be pretty high.
>> On Oct 27, 2015 11:15 PM, "Vassilis Virvilis" <vas...@gmail.com 
>> > wrote:
>>
>>> That's weird,,,
>>>
>>> What is the size *.cache.js?
>>>
>>> Make sure your webserver/tomcat serves compressed content. 
>>>
>>>
>>> On Tue, Oct 27, 2015 at 8:11 PM, Ali Akhtar <ali.r...@gmail.com 
>>> > wrote:
>>>
>>>> It can take up to 10 seconds on slow connections. May be even more on 
>>>> mobile connections.
>>>> On Oct 27, 2015 11:07 PM, "Vassilis Virvilis" <vas...@gmail.com 
>>>> > wrote:
>>>>
>>>>> Just to make sure we are on the same page.
>>>>>
>>>>> How much time does it take to load?
>>>>>
>>>>> This looks serious overkill to me...
>>>>>
>>>>> On Tue, Oct 27, 2015 at 6:43 PM, Ali Akhtar <ali.r...@gmail.com 
>>>>> > wrote:
>>>>>
>>>>>> This is what I am doing currently. But its not the most user friendly.
>>>>>>
>>>>>> I'd like to show a progress bar which indicates how much longer there 
>>>>>> is to go.
>>>>>>
>>>>>> Worst case, I can override the Dom function for injecting a script, 
>>>>>> and use that to request the scripts over websockets, and update the 
>>>>>> progress with each frame sent.
>>>>>>
>>>>>> Is that what I have to do, or is there a better way?
>>>>>> On Oct 27, 2015 3:51 PM, "Frank" <frank@gmail.com > 
>>>>>> wrote:
>>>>>>
>>>>>>> Like Peter and Jens said, put a loading indicator in your host html 
>>>>>>> page, and remove it in onModuleLoad.
>>>>>>>
>>>>>>> For example. Put in your html :
>>>>>>>
>>>>>>> 
>>>>>>>
>>>>>>>   
>>>>>>>   Launching applicationPlease wait
>>>>>>>
>>>>>>> 
>>>>>>>
>>>>>>>
>>>>>>> And then in your onModuleLoad
>>>>>>>
>>>>>>> RootPanel.getBodyElement().removeChild(DOM.getElementById("splash"));
>>>>>>>
>>>>>>> -- 
>>>>>>> You received this message because you are subscribed to a topic in 
>>>>>>> the Google Groups "GWT Users" group.
>>>>>>> To unsubscribe from this topic, visit 
>>>>>>> https://groups.google.com/d/topic/google-web-toolkit/Cr8DuGnX1lk/unsubscribe
>>>>>>> .
>>>>>>> To unsubscribe from this group and all its topics, send an email to 
>>>>>>> google-web-toolkit+unsubscr...@googlegroups.com .
>>>>>>> To post to this group, send email to google-we...@googlegroups.com 
>>>>>>> .
>>>>>>> Visit this group at 
>>>&g

Re: SuperDevMode and same origin policy

2015-10-23 Thread Greg
Thomas, you are right. I had some conditional logic which chose which 
scripts should be loaded in production or dev mode (original or minified 
and merged) but I used GWT.isProdMode() and forgot that in SDM it returns 
true... Sorry for that.

On Thursday, October 22, 2015 at 10:36:57 PM UTC+2, Thomas Broyer wrote:
>
> Aren't public sources copied to launcherDir on startup? Isn't it possible 
> to load the files from the appropriate origin?

-- 
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 http://groups.google.com/group/google-web-toolkit.
For more options, visit https://groups.google.com/d/optout.


Re: SuperDevMode and same origin policy

2015-10-22 Thread Greg
Thanks JonL,

I'm aware of CORS headers, but unfortunately this case is different. 
Currently WebWorker will not start if it's not in the same origin as the 
context that wants to start it... According to the spec it should start in 
different security context but that's not yet supported in browsers.

The other idea I came up was to fetch worker code with ajax and use it as a 
blob: uri, but I would have to do the same for all imported scripts which 
is not that nice considering the fact that I already have a fallback for a 
situation when workers are not supported.

On Thursday, October 22, 2015 at 3:34:26 PM UTC+2, JonL wrote:
>
> Greg,
>
> You can create a filter that will set the appropriate headers for things 
> served from the CodeServer with a filter like the one below (from 
> https://spring.io/guides/gs/rest-service-cors/) .
>
>
> public class SimpleCORSFilter implements Filter {
>
>   public void doFilter(ServletRequest req, ServletResponse res, 
> FilterChain chain) throws IOException, ServletException {
>   HttpServletResponse response = (HttpServletResponse) res;
>   response.setHeader("Access-Control-Allow-Origin", "*");
>   response.setHeader("Access-Control-Allow-Methods", "POST, GET, 
> PUT, OPTIONS, DELETE");
>   response.setHeader("Access-Control-Max-Age", "3600");
>   response.setHeader("Access-Control-Allow-Headers", "Origin, 
> X-Requested-With, Content-Type, Accept");
>   chain.doFilter(req, res);
>   }
>
>   public void init(FilterConfig filterConfig) {}
>
>   public void destroy() {}
> }
>
>
>
> Only use this filter in dev mode though, remove it from the web.xml for 
> production.
>
> On Wednesday, October 21, 2015 at 8:02:56 AM UTC-7, Greg wrote:
>>
>> Hi
>>
>> This is an old thread but I have similar SOP issue:
>>
>> I have a host page in the root of the webapp: /index.html
>> I also have a web worker on public path which ends up in 
>> /worker/Name.worker.js
>>
>> I'm starting the worker using 'new Worker(); 
>> which is based on GWT.getModuleBaseUrlForStaticFiles();
>>
>> The problem is when running in SDM public path is hosted from CodeServer 
>> and not from DevMode server where host page is located:
>> http://localhost:/index.html
>> http://localhost:9876//worker/Name.worker.js
>>
>> Is there any workaround for this except moving worker file from public 
>> path to webapp directory?
>>
>> Greg
>>
>> On Monday, March 4, 2013 at 11:22:45 AM UTC+1, Thomas Broyer wrote:
>>>
>>>
>>>
>>> On Monday, March 4, 2013 10:45:35 AM UTC+1, Harold wrote:
>>>>
>>>> Hi Thomas,
>>>>
>>>> Thanks for you answer.
>>>>
>>>> Following your suggestion ( new Image(myImageResource) ), there is no 
>>>> more security error :)
>>>>
>>>> All my textures are loaded but are almost empties. According to 
>>>> WebGLInspector all textures have size 1x1 with a transparent pixel.
>>>> It looks like that the HTMLImageElement obtained via image.getElement() 
>>>> is not properly filled now.
>>>>
>>>> An idea about that ?
>>>>
>>>
>>> The image then is probably a "clipped image" using a sprited image: the 
>>> image itself is a 1×1px transparent gif (clear.cache.gif, served from the 
>>> same origin as the app) and the image is set as its background, with 
>>> background-position and clip to only show the portion of the sprited image 
>>> that corresponds to the original image. That makes me think we should add a 
>>> isComplete() or isSprited() to ImageResource to "optimize" the way we 
>>> create Image widgets out of ImageResources (which I happen to have already 
>>> proposed in issue 7403 
>>> <https://code.google.com/p/google-web-toolkit/issues/detail?id=7403>).
>>>
>>> Anyway, that explains why the security error has vanished.
>>> So in the mean time, revert to "new Image(myImageResource.getSafeUri())" 
>>> (no need to use asString(), there's an overload taking a SafeUri argument), 
>>> but then I bet you'll have the security error back…
>>>
>>>>

-- 
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 http://groups.google.com/group/google-web-toolkit.
For more options, visit https://groups.google.com/d/optout.


Re: SuperDevMode and same origin policy

2015-10-21 Thread Greg
Hi

This is an old thread but I have similar SOP issue:

I have a host page in the root of the webapp: /index.html
I also have a web worker on public path which ends up in 
/worker/Name.worker.js

I'm starting the worker using 'new Worker(); 
which is based on GWT.getModuleBaseUrlForStaticFiles();

The problem is when running in SDM public path is hosted from CodeServer 
and not from DevMode server where host page is located:
http://localhost:/index.html
http://localhost:9876//worker/Name.worker.js

Is there any workaround for this except moving worker file from public path 
to webapp directory?

Greg

On Monday, March 4, 2013 at 11:22:45 AM UTC+1, Thomas Broyer wrote:
>
>
>
> On Monday, March 4, 2013 10:45:35 AM UTC+1, Harold wrote:
>>
>> Hi Thomas,
>>
>> Thanks for you answer.
>>
>> Following your suggestion ( new Image(myImageResource) ), there is no 
>> more security error :)
>>
>> All my textures are loaded but are almost empties. According to 
>> WebGLInspector all textures have size 1x1 with a transparent pixel.
>> It looks like that the HTMLImageElement obtained via image.getElement() 
>> is not properly filled now.
>>
>> An idea about that ?
>>
>
> The image then is probably a "clipped image" using a sprited image: the 
> image itself is a 1×1px transparent gif (clear.cache.gif, served from the 
> same origin as the app) and the image is set as its background, with 
> background-position and clip to only show the portion of the sprited image 
> that corresponds to the original image. That makes me think we should add a 
> isComplete() or isSprited() to ImageResource to "optimize" the way we 
> create Image widgets out of ImageResources (which I happen to have already 
> proposed in issue 7403 
> <https://code.google.com/p/google-web-toolkit/issues/detail?id=7403>).
>
> Anyway, that explains why the security error has vanished.
> So in the mean time, revert to "new Image(myImageResource.getSafeUri())" 
> (no need to use asString(), there's an overload taking a SafeUri argument), 
> but then I bet you'll have the security error back…
>
>>

-- 
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 http://groups.google.com/group/google-web-toolkit.
For more options, visit https://groups.google.com/d/optout.


Re: GWT Cross Site Iframe Linker and Script Tags

2015-09-24 Thread Greg
Hi

I know it's an old thread but I used few hours to quickly implement a 
linker and special entry point class that uses script tags from gwt.xml 
files and injects them automatically using ScriptInjector. There are few 
changes required in EntryPoint classes but they are not that intrusive.

Could you tell me if such approach is sensible? Do you see any problems it 
could cause (except difference in performance - scripts have to be loaded 
one after another instead of almost concurrently).

Link to repo: https://github.com/metteo/gwt-si

Greg

On Monday, November 12, 2012 at 5:54:57 PM UTC+1, Thomas Broyer wrote:
>
>
>
> On Monday, November 12, 2012 4:55:58 PM UTC+1, googelybear wrote:
>>
>> I have the same error when running the code server and this limitation 
>> effectively prevents me from using superdevmode, as in my case the problem 
>> is with an external library that I include which then uses the 

Re: Recommended GWT Map Library?

2015-08-28 Thread Greg
In my projects I used mostly OpenLayers 2 with custom bindings for GWT (At 
the beginning I used GWT-OpenLayers but then I switched to own impl.).

OpenLayers 3 looks very nice and it's built with performance and new 
technologies in mind so you could check that.
Other alternative is Leaflet - very simple but maybe it will be enough for 
your purposes.

BTW I'm not sure but I think that gwt-google-apis were not created / are 
maintained by GWT Team.

On Tuesday, August 25, 2015 at 8:16:34 PM UTC+2, Kevin Workman wrote:

 I've been using gwt-google-apis 
 https://code.google.com/p/gwt-google-apis/ as a GWT wrapper of the 
 Google Maps JavaScript API. I've been using the jar from here 
 https://code.google.com/p/gwt-google-apis/downloads/list.

 It works okay, but I'm starting a new GWT project that requires a map 
 display, and I noticed that the jar hasn't been updated since 2012.

 I'm starting a new project from scratch, so I'm in a position to start 
 over with a new wrapper, if that's the correct way to go. I've come across 
 GWT-OpenLayers http://www.gwt-openlayers.org/, which looks promising, 
 but I'm not sure how much of a change it will be from using the Google API 
 wrapper. I've also come across branflake2267's wrapper 
 https://github.com/branflake2267/GWT-Maps-V3-Api, but that hasn't been 
 updated in over a year.

 So, my question is: what would you consider the best approach to 
 displaying a map in a GWT application? Should I stick with the official 
 google product? All I really need to do is display some polygons and 
 circles on the map, but adding stuff like weather would be a really nice 
 feature as well. Are there any libraries that I missed that are worth 
 checking out?


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


Re: Gwt with Rest Architecture problem

2015-06-25 Thread Greg
Hi

Vassillis is right. You can configure CORS filter in a way that it will 
only allow requests from whitelisted domains instead of all (by using wild 
card *).

This filter allows such 
config: http://software.dzhuvinov.com/cors-filter-configuration.html

You can just specify cors.allowOrigin parameter in web.xml to a list of 
your client side domains. Remember that CORS applies only in browsers. If 
you make requests from code say Java (using HttpURLConnection) they are not 
needed. So your concern about security is invalid. If somebody will want to 
make requests to your rest service he will be able to do that from any 
place.

One side note. If you test your service make sure to use sth different than 
'localhost' in url to rest service (ip and proper host name should work). 
At least chrome has issues with that when making CORS 
requests: 
http://stackoverflow.com/questions/10883211/deadly-cors-when-http-localhost-is-the-origin

Greg

On Tuesday, June 23, 2015 at 2:45:44 PM UTC+2, Vassilis Virvilis wrote:

 About CORS: 
 You don't need to add anything to your REST headers. Tomcat can handle it 
 for you assuming that the url of the gwt application is known to the the 
 tomcat serving the REST backend. See 
 https://tomcat.apache.org/tomcat-7.0-doc/config/filter.html#CORS_Filter

 Vassilis

 On Tue, Jun 23, 2015 at 2:55 PM, Jens jens.ne...@gmail.com javascript: 
 wrote:

 Its because of same origin policy enforced by browsers and not because of 
 cross site scripting (which is an attack).

 If you don't want to make your REST service JSONP compatible and you 
 don't want to use CORS headers then you must make sure that your GWT app 
 can access the REST service through the same domain/origin that the GWT app 
 is served from. Usually you can do that by configuring a reverse proxy on 
 http://gwt-domain.com that redirects your GWT server requests from 
 http://gwt-domain.com/api/* to http://rest-backend.com/* or similar.

 Such a proxy also gives you the freedom to move your backend to other 
 locations without updating the GWT app itself. We use NGINX as such a proxy.

 The only other alternative is that the GWT app makes requests to a 
 servlet running on the host that serves the GWT app and that servlet then 
 makes a request to the REST backend. So that servlet then also acts as a 
 proxy. For example you could install such a servlet on 
 http://gwt-domain.com/api/*

 -- J.

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




 -- 
 Vassilis Virvilis
  

-- 
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: server push example with GWT?

2015-06-01 Thread Greg
Take a look at https://github.com/Atmosphere/atmosphere 

They have a GWT API for their js 
component: 
https://github.com/Atmosphere/atmosphere-extensions/wiki/Atmosphere-GWT-2.0

On Monday, June 1, 2015 at 8:14:54 PM UTC+2, Edward Montgomery wrote:

 Can anyone point me to a tutorial or example of how to implement server 
 push with a GWT application?

 Is this typically done by somehow matching a JavaScript socket on one end 
 to a Java socket on the other?

 Thanks.


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


Re: MVP Pattern Without History Mechanism?

2015-03-12 Thread Greg
When passing the state of the screen in the url you shouldn't embed whole 
data in it. Instead you should pass some references to it like ids etc. The 
screen you want to display should use that references to fetch the actual 
data (from LocalStorage / IndexedDB / Server)

On Wednesday, March 11, 2015 at 3:12:29 PM UTC+1, Abdullah wrote:

 Because of History Mechanism,When Switching from one Screen to other 
 screen i need to pass some data to that Screen that i am unable to achieve 
 using History Mechanism.Will it possible to pass the data?Is there any 
 example code?

 On Wednesday, March 11, 2015 at 12:56:01 PM UTC+5:30, Abdullah wrote:

 Hi,
   Is any Impact Implementing MVP Pattern Without History Mechanism?



-- 
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: Problems with super dev mode: Can't find any GWT Modules on this page

2013-11-03 Thread Greg
Hi

I had similar issue lately. Important thing is that after switching to 
xsiframe linker you have to compile your application and use it for 
starting sdm. This way your app.nocache.js file will be built by that newly 
set linker and sdm scripts will detect it. Without that step nocache.js 
file will be old (created by std linker) - hence the error.

Good thing after changing linker is cleaning the project (and also removing 
gwt-unitCache folder). Without doing it I had some compilation issues.

Greg

On Thursday, October 17, 2013 8:11:02 PM UTC+2, crojay78 wrote:

 Thanks for the reply, Yes I added it my app.gwt.xml

 Am Donnerstag, 17. Oktober 2013 19:43:13 UTC+2 schrieb crojay78:

 Hi, 

 i followed a lot of threads at stackoverflow and here in this group 
 concerning the super dev mode. But it still does not work on my side. I 
 have a multi module maven gwt project and want to use super dev with it. 

 Actually it works to start the codeserver with the mvn gwt:run-codeserver 
 and I can see the output

 [INFO]
 [INFO] The code server is ready.
 [INFO] Next, visit: http://localhost:9876/


 I started this page and bookmarked the links. After this I am starting my 
 tomcat with eclipse wtp plugin where my application is running. Then I 
 connect to this application my tomcat server. The app is available and 
 works, but for my understanding it should be able to use there the dev on 
 link. But this shows me only the message 

 Can't find any GWT Modules on this page.


 Any idea what the problem is?

 Thanks



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


Re: Logging to the server side

2013-11-03 Thread Greg
Hi

You may check this first: 
http://www.gwtproject.org/doc/latest/DevGuideLogging.html especially this 
section: 
http://www.gwtproject.org/doc/latest/DevGuideLogging.html#Remote_Logging
Then this: 
https://gwt.googlesource.com/gwt/+/master/user/src/com/google/gwt/logging/server/RemoteLoggingServiceImpl.java
 - 
it's a source for GWT-RPC service which allows remote logging on the server.

As the documentation says: GWT currently contains a SimpleRemoteLogHandler 
which 
will do this in the simplest possible way (using GWT-RPC) and no 
intelligent batching, exponential backoffs in case of failure, and so 
forth. So it's possible but you have to implement it yourself.

Greg

On Wednesday, October 16, 2013 11:56:07 AM UTC+2, paulo...@gmail.com wrote:

 Hi, I'm a gwt newbie and i want to send whatever log messages are created 
 on the client side to the server side. My backend is grails and i have 
 implemented a service that receives the logs. Is there any way to implement 
 a gwt rpc async call that will not wait for any answer back?


-- 
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: Issue with development mode plugin and Custom selection script / hosted.html that allows separate debugging of multiple GWT applications on a single page

2013-11-03 Thread Greg
Hi

Please check this: 
https://groups.google.com/d/msg/google-web-toolkit/5XzZrpBjxnY/IJzN2Z6tfawJhttps://groups.google.com/forum/#!topic/google-web-toolkit/5XzZrpBjxnY

On Tuesday, October 8, 2013 7:07:34 PM UTC+2, Jamie Cramb wrote:

 Hi all,

 I have a page which has multiple GWT applications running on it.  When it 
 comes to development mode / debugging from eclipse (using the dev mode 
 plugin in chrome) we start to hit issues because if we put the 
 gwt.codesvr param in the URL then all of the GWT applications on the page 
 will try to debug and will fail (because the debugger we have running only 
 has the source code for one of the applications in its classpath).

 My goal is to update the implementation of the bootstrapping process for 
 dev mode to achieve the following:

1. Externalize the decision on which GWT applications on a page should 
debug based on some other JS function that is resident on the page so it 
can be controlled via a custom mechanism / server-side decision.
2. Have the ability to assign a custom $hosted URL (e.g. 
localhost:9997) for each of the GWT applications on a page that should 
 be 
debugging.

 I have achieved the first goal by:

- Providing my own primary linker (an extension of the IFrameLinker) 
that overrides the location of the selection script template so that it 
uses my modified selection script
- Making my modified selection script provide a custom 
isHostedMode() implementation that calls out to a JS function that is 
resident on the host page for the decision of whether or not to go into 
 dev 
mode:

 function isHostedMode() {
 $wnd.shouldDebug('__MODULE_NAME__');
 }


 I thought I was close to achieving my second goal by:

- Using the same primary linker to override the hosted.html location 
with my own custom hosted.html page.
- Making my hosted.html pickup the $hosted URL from a global var 
resident in the host page instead of trying to pick it up from the 
gwt.codesvr param:

 $hosted = decodeURIComponent(parent.debugHostUrl);



 However, I get a failure (return false) from the following line of code 
 unless I have the gwt.codesvr param in the URL:

 if (plugin.connect(url, topWin.__gwt_SessionID, $hosted, $moduleName, 
 $hostedHtmlVersion)) { ... } else { ...}


 On debugging the code everything looks fine going into the 
 plugin.connect() call.

 Does anyone know:

1. If there is a better approach to achieving my goals?
2. If the dev mode plugin is hard coded in someone to expect the 
gwt.codesvr param to be in the URL even though the $hosted var is passed 
in on the call to connect?


 Thanks in advance.

 Cheers,
 Jamie


-- 
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: get IP address

2013-10-01 Thread Greg Smith
Hilco Wijbenga hilco.wijbenga@... writes:

 
 On 6 February 2012 14:25, IHateSoda mguillaume21@... wrote:
  I'm trying to get my IP address (192.168..) but I always get the
  localhost IP (127.0.0.1).
 
 You are presumably running your appserver (Tomcat, Jetty, ...)  as
 localhost. If you want the servlet to return something else then do
 not run as localhost.
 


I think this is what you're looking for...

HttpServletRequest request = perThreadRequest.get();
String ipAddress = request.getRemoteAddr()

-Greg

-- 
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: jsni - overlay types - js arrays Java API

2013-09-27 Thread Greg
This will now work in GWT  2.2

See: https://code.google.com/p/google-web-toolkit/issues/detail?id=6594

Workaround provided there works.

On Monday, December 24, 2012 3:22:11 AM UTC+1, Sebastián Gurin wrote:

 Thank you Thomas for your reply, I learned new things. Didn't know about 

 if ( GWT.isScript() ) {you can cast the js array to java arrays directly 
 }. 

 I will definetly use those classes for my projects. Thanks again



-- 
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: jsni - overlay types - js arrays Java API

2013-09-27 Thread Greg
This will NOT work in GWT  2.2

See: https://code.google.com/p/google-web-toolkit/issues/detail?id=6594

Workaround provided there works.

On Monday, December 24, 2012 3:22:11 AM UTC+1, Sebastián Gurin wrote:

 Thank you Thomas for your reply, I learned new things. Didn't know about 

 if ( GWT.isScript() ) {you can cast the js array to java arrays directly 
 }. 

 I will definetly use those classes for my projects. Thanks again



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


GWT - Label not wrapping text/resizing properly?

2013-08-16 Thread Greg Olmschenk
I've got Labels within the cell of a FlexTable inside of a ScrollPanel 
which is inside of LayoutPanels. The size of the ScrollPanel (and it's 
parent LayoutPanels) is set dynamically based on the size of the window of 
the user's device (so exact CSS sizing is not used). The FlexTable, it's 
cells, and the Labels are set to have a width of 100%. Also, the FlexTable 
is set to have a fixed table layout. And the Labels are given the word-wrap 
setting of break-word. In most cases, this works fine. Sentences with short 
words are wrapped to the next line without a problem and Label remains the 
same size as it's containing table cell. However, when a word would need to 
broken onto two lines to fit (which happens often since links to pages are 
frequently placed here) the Label's width is automatically extended beyond 
the size of the cell that contains it. I know this is the result of GWT 
resizing the Label by itself, but I'm not sure how to prevent this. I've 
tried setting the word-break to break-all, but this results in short words 
reaching the end of the line to be broken (like this into th and is) 
which is just silly. Is there anyway I can force the GWT Label to only be 
100% of the width of it's containing cell and not let it extend beyond that 
while still keeping this setting dynamic? Thank you much!

-- 
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 change the application locale dynamically

2013-06-04 Thread Greg
Another nicer (imho) solution is to use cookie.

In your gwt.xml (locale.cookie could be whatever you want):

set-configuration-property name=locale.cookie value=gwtLocale/

By default GWT uses following search order:

set-configuration-property name=locale.searchorder 
value=queryparam,cookie,meta,useragent/

You can modify it according to your needs. To actually change the locale 
you have to: 

Cookies.setCookie(gwtLocale, ja_JP);
Window.Location.reload();

Greg

On Monday, June 3, 2013 4:32:48 PM UTC+2, David Levesque wrote:

 Here's how I do it from a ClickHandler:

 UrlBuilder builder = Window.Location.createUrlBuilder();
 builder.setParameter(locale, localeName);
 String url = URL.decodeQueryString(builder.buildString());
 Window.Location.replace(url);

 where *localeName* is the locale code, e.g. en_US.


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




SplitLayoutPanel not working for me in GWT 2.5.1

2013-04-12 Thread Greg George


https://lh6.googleusercontent.com/-f8wTPD-UpyA/UWb87ts1tUI/BN0/S0dOrfVVnfw/s1600/BadSplitLayoutPanel.png

I've created the GWT 2.5.1 sample project in Eclipse (Indigo) and tried 
replacing the sample GWT code with the SplitLayoutPanel code sample from 
http://gwt.googleusercontent.com/samples/Showcase/Showcase.html#!CwSplitLayoutPanel.
  
But when I run, I don't get anything that looks like the sample page.  
Instead I get the attached image.  Any help is appreciated.




-- 
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: SplitLayoutPanel not working for me in GWT 2.5.1

2013-04-12 Thread Greg George
Thanks for the pointer.  Using RootLayoutPanel instead of LayoutPanel did 
the trick for my problem.  I just always used LayoutPanel because that's 
what the GWT sample does.

On Friday, April 12, 2013 3:43:32 AM UTC-4, Thomas Broyer wrote:

 Are you fulfilling the RequiresResize requirements?

 https://developers.google.com/web-toolkit/doc/latest/DevGuideUiPanels#Resize
 Also look for the Using a LayoutPanel without RootLayoutPanel recipe in 
 this page.

 On Thursday, April 11, 2013 8:13:53 PM UTC+2, Greg George wrote:


 https://lh6.googleusercontent.com/-f8wTPD-UpyA/UWb87ts1tUI/BN0/S0dOrfVVnfw/s1600/BadSplitLayoutPanel.png

 I've created the GWT 2.5.1 sample project in Eclipse (Indigo) and tried 
 replacing the sample GWT code with the SplitLayoutPanel code sample from 
 http://gwt.googleusercontent.com/samples/Showcase/Showcase.html#!CwSplitLayoutPanel.
   
 But when I run, I don't get anything that looks like the sample page.  
 Instead I get the attached image.  Any help is appreciated.






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




Setting widget position based on percentage of container?

2013-01-27 Thread Greg Olmschenk
I'm just starting off with GWT and I'm having trouble setting up the 
position of widgets within a panel. I would like to set the widget position 
based on a percentage of the container. For example, how would I go about 
creating a label 25% of the way from the top of a vertical panel if the 
height of this panel is able to be of different values? I'm hoping there's 
some direct method, but I'm guessing a possible workaround would be 
creating some other object (say a horizontal panel) which has a size of 25% 
of the vertical panel. Is there a more direct method of making this work? 
Thank you for your time.

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




ScrollPanel Question

2012-11-04 Thread Greg Laird
Hello,
I have a ScrollPanel enclosing a Grid Widget.  The ScrollPanel is a child 
of a DockLayoutPanel (West, 50%) which is a child of a RootLayoutPanel. 
 The DockLayoutPanel is configured to take up the complete browser window 
and this works fine.  Browser window vertical and horizontal resizes work 
fine.

The issue that I am trying to solve is that when I expand my browser window 
horizontally, the West ScrollPanel expands as it should.  My Grid Widget, 
inside the scroll panel expands to its maximum horizontal size and as I 
keep expanding the browser horizontally, the Scroll Panel keeps expanding 
and the ScrollPanel's vertical scroll bar moves further and further away 
from my Grid Widget.  After a while, the scroll bar is quite a ways from 
the Grid Widget.

Is there some way that I can force the ScrollPanel's width to be only 
slightly larger than the width of the Grid Widget inside.  I have tried to 
get the Grid Widgets width (getOffsetWidth) but this does not work--as I 
don't think the widget is rendered when I make the call.

Any insight would be helpful.
Thanks,
Greg Laird

-- 
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/-/j_-CboHATlMJ.
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.



Using GWT Designer with UIBinder and Internaltionalization

2011-07-11 Thread Greg
Hi,
I'm trying to start a new application using the new UIBinder with help
of GWT Designer. Moreover, the application needs to support a few
locales, so I'm trying to use the Internationalization feature.
The problem is that in the gwt designer the icon for the
internationalization window is not available when building a UiBinder
composite. My questions:  is this a missing feature in GWT Designer?
If yes, will it be available soon? or am I doing something wrong?
Thanks in advance.

-- 
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: Composite Primary Keys (Many-to-Many relationship)

2011-07-06 Thread Greg Naidu
Aldo Neto tumolin@... writes:

 
 
 Hi,
 
 Thanks you all for your help. My problem was that I was mapping my Client side
incorrectly - I now understand how to use the ValueProxy. In case someone else
is having similar problems, I suggest reading Thomas'
post: http://tbroyer.posterous.com/gwt-211-requestfactory 
 
 It helped me a lot.
 
 Cheers 
 

Hi Aldo,

I'm not using GWT but I am trying to implement a many-to-many relationship using
the same article you stated earlier with exactly the same results.

I'd really appreciate your help regarding the mapping changes that resolved the
error.

Cheers,
Greg

-- 
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: Competitor for world's most useless JavaDoc comment

2011-05-17 Thread Greg Dougherty
Hi Jeff,

 It may not be completely obvious what is going on here

Congratulations, you win understatement of the day. :-)

And that's my point.  The purpose of a JavaDoc comment is to make it
so people CAN understand what's going on.  Those comments say
nothing.  They don't say this is a locale dependent format, go here
to figure out what that format will be in your locale, they don't say
ANYTHING.

 that format changes based on the locale

If that format changes with the locale, why am I getting an entirely
non-US format?

 While it probably makes sense to you to put the format into US standards, it
 would totally trip up people writing GWT in french or some other standard.

If it's locale dependent, then, since I'm writing in a US locale,
that's what I should be seeing.  If it's not locale dependent, I don't
see why defaulting to a non-US representation is better than
defaulting to a US one.

 The short answer is, it isn't a useless javadoc comment, it is a
 non-existent comment.

Well, I don't know how anyone else codes, but from my perspective, an
undocumented constant in a library is a useless constant, since the
amount of time and effort spent figuring out what it is and what it
does could better be spent just making my own constant that does what
I want.  Which is what I've now done in this case.

 As always, you're welcome to submit a patch with javadoc.

Well, my understanding is that I can't do that w/o writing to the GWT
Coding Standards.  They require you to write hideously ugly code,
and I only do that when someone pays me, extra.  So I don't foresee
myself ever writing anything for GWT.

Aside from that, I'd have to spend a fair amount of time trying to
figure out what each of those constants MEAN.  Presumably the person /
people who wrote those comments did that in the first place.  Which
leaves me with the question of why they didn't write that information
down, instead of writing down that some day they needed to do that?
And the other question of why the GWT Team allowed them to submit the
code when it was so obviously incomplete.  Yes, I know that there's a
lot of volunteer labor that goes into GWT.  But I would expect that
the pride and professionalism of all involved would demand that things
be done right, or not at all.

Greg

On May 16, 1:12 pm, Jeff Larsen larse...@gmail.com wrote:
 It may not be completely obvious what is going on here, but that format
 changes based on the locale, so it isn't exactly easy or maintainable to
 actually specify what each format is doing for each locale.

 While it probably makes sense to you to put the format into US standards, it
 would totally trip up people writing GWT in french or someother standard.

 While this does add to the complexity, it also removes problems of if you're
 writing an i18n application, you can just use datetimeformat and get the
 desired results in the formats that you want.

 Also, if you look at the code, there is a TODO there to get the formats
 documented. So they are already aware that they need documentation.

 The short answer is, it isn't a useless javadoc comment, it is a
 non-existent comment.

 As always, you're welcome to submit a patch with javadoc.  

-- 
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: Competitor for world's most useless JavaDoc comment

2011-05-17 Thread Greg Dougherty
Hi John,

Actually, I must entirely disagree with you.  The CLDR
{SHORT,MEDIUM,LONG,FULL} format, as defined here (give URL to the
definition) would be a perfectly valid comment.  Most importantly, it
would tell users where to go when they need more information, rather
than requiring us to guess.

Now, it would be nice if you included that it was locale specific, or
what some useful date (like Jan 5, 2002 (month name w/ more than three
characters in it, month, day and year w/ only 1 significant digit when
in 2 digit format) looked like under the format if it isn't locale
specific.  But if you don't want to write in all the details, telling
users exactly where to go to find the details is a perfectly valid
second choice.  (Note that means a URL that gets the user to the
definition of interest.  Saying go to the W3C specification doesn't
count.  Since you were presumably looking at the specification of
interest while writing the constant, I don't think it's unreasonable
to expect you to pass on that specific URL.)

 The other predefined formats, which are also derived from CLDR data via
 ICU4J, seem self-explanatory.  Is there really much value in a Javadoc for
 the HOUR_MINUTE_SECOND format that says A format containing the hour,
 minute, and second?

Is there really much COST to writing /** A format containing the hour,
minute, and second, in the form hh:mm:ss */?  Especially considering
that you had to write SOMTHING, or else there wouldn't have been a
JavaDoc entry in the first place.  If you're going to write something,
why not take an extra 15 seconds, and write the right thing?

For that matter, doesn't Code Tools Pro default to putting the value
of the constant in the auto-generated JavaDoc?  If you can have some
code generation tool generate a more useful comment for no effort, why
spend person time to generate a less useful comment?

  As always, there is a limited amount of hours in the day and decisions must
 be made on where to spend that time.

Of course.  But, ESPECIALLY in an open source project, there's no
point in writing something unless people can use it.  If you want
people to use your code, they've got to be able to figure out what it
does, and how they should use it.  If you're not willing to document
something well enough so that other people can use it, why are you
wasting your time writing it in the first place?  (This is not a
rhetorical question.  When I writing code that I want other people to
use, I make sure that everything I want them to use is clearly
documented.  If the writers of open source code aren't writing code
because they want other people to use it, why ARE they writing it?)

Personally, I don't use any of the PredefinedFormats. I don't
understand them, and it wasn't clear to me that it would take me less
time to figure them out, than it would take me to write my own.  Were
those formats written for internal GWT use only, and any external use
considered gravy?  Or were they written for GWT users to use them?
Because if it's teh second, the JavaDoc is the most important thing
about those constants.  Since that's going to be the major deciding
point WRT whether or not the constants actually get used.

Greg

On May 16, 3:48 pm, John A. Tamplin j...@google.com wrote:
 On Monday, May 16, 2011 1:22:43 PM UTC-4, Greg Dougherty wrote:

  It's too bad that there a 2 valid comments, and 34 worthless ones.

  Might I suggest that the GWT Coding Standards would do well to focus
  on requiring people to write readable and understandable code (which
  means having comments that explain what you're doing and why), rather
  than merely obsessing on whether people use tabs or spaces?

 See the TODO at the beginning of PredefinedFormat -- patches welcome.

 The *_{SHORT,MEDIUM,LONG,FULL} formats are harder to describe the other
 formats like the ISO_8601 and RFC_2822 formats, since they will vary
 significantly across locales.  Basically, for these we just use whatever
 those are defined as in CLDR.  AFAIK, there is no documentation on exactly
 what the criteria are for those lengths, which means the Javadoc that would
 go there would be either A short date format or The CLDR short date
 format, which doesn't seem more useful than the name itself which is why it
 hasn't been written yet.

 The other predefined formats, which are also derived from CLDR data via
 ICU4J, seem self-explanatory.  Is there really much value in a Javadoc for
 the HOUR_MINUTE_SECOND format that says A format containing the hour,
 minute, and second?

 Regarding the overall quality of doc in the GWT codebase, my personal
 experience is that it is far better than most open-source projects -- of
 course it can always be improved and anyone can submit such improvements.
  As always, there is a limited amount of hours in the day and decisions must
 be made on where to spend that time.

-- 
You received this message because you are subscribed to the Google Groups 
Google Web Toolkit group.
To post to this group

Competitor for world's most useless JavaDoc comment

2011-05-16 Thread Greg Dougherty
I was looking through com.google.gwt.i18n.client : Enum
DateTimeFormat.PredefinedFormat, because I wanted to figure out why my
dates were coming out in such a useless format (sorry, but while -
mm-dd is a lovely format if you want dates that can be textually
sorted by a computer, it's a crappy format if you want the dates read
by a human).  So I clicked on the JavaDoc for DATE_SHORT.  What did I
get?

public static final DateTimeFormat.PredefinedFormat DATE_SHORT

Wow, thank you.  How completely useless.  That doesn't even rise to
the lovel of phoning it in.

I know the person responsible for DateTimeFormat.PredefinedFormat
knows how to write a reasonable JavaDoc, because it includes this:

RFC_2822

public static final DateTimeFormat.PredefinedFormat RFC_2822

RFC 2822 date format, fixed across all locales.
Example: Thu, 20 May 2010 17:54:50 -0700
http://tools.ietf.org/html/rfc2822#section-3.3

It's too bad that there a 2 valid comments, and 34 worthless ones.

Might I suggest that the GWT Coding Standards would do well to focus
on requiring people to write readable and understandable code (which
means having comments that explain what you're doing and why), rather
than merely obsessing on whether people use tabs or spaces?

Greg

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



Hover text / Help Text for a Cell Tables

2011-05-05 Thread Greg Dougherty
The user interface for my current app is built around a Cell Table.
I'd like to put hover text over the elements in several of my
columns.  If they were UIObjects, I'd simply call setTitle ().  What
do I call to do this for Cell columns (I'm perfectly fine with the
text being the same for every cell in the column, I'd just like to be
able to put SOMETHING up to explain t ousers why they might click on
that cell, and what they need to do first).

TIA,

Greg

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



Can not export to IE 7

2011-05-05 Thread Greg Dougherty
I have a web app that mostly works with IE 7.  However, when I try to
export results to IE, I get the following error message:


Internet Explorer cannot download (URL name) from (web address).

Internet Explorer was not able to open this internet site.  The
requested web site is either unavailable or cannot be found.  Please
try again later.


Export works by having a frame with a URL.  That part works, because
my servlet gets called.  My servlet calls
response.setContentType (text/tsv);  and
response.addHeader (Content-Disposition, attachment; filename=\ +
fileName + \);

gets the response Writier, wraps the writer with a BufferedWriter,
writes some data to it, and then calls flush on the BufferedWriter,
which gets to the download dialog to pop up for IE.  However, at some
point while I'm sending it data over that BufferedWriter (and it's
pretty early in the process, because it never gives me a chance to
specify where I want to save the file), IE gives me the above error
message.

Any suggestions for what's going on, and how to fix it?

TIA,

Greg

-- 
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: Can not export to IE 7

2011-05-05 Thread Greg Dougherty
Nope.  It works just fine for Firefox and Sea Monkey,  it's just with
IE that there's a problem.

On May 5, 2:37 pm, Juan Pablo Gardella gardellajuanpa...@gmail.com
wrote:
 Checkhttp://code.google.com/webtoolkit/doc/latest/FAQ_Server.html#What_is_...

 http://code.google.com/webtoolkit/doc/latest/FAQ_Server.html#What_is_...Is
 relate to this?

 2011/5/5 Greg Dougherty dougherty.greg...@mayo.edu

  I have a web app that mostly works with IE 7.  However, when I try to
  export results to IE, I get the following error message:

  Internet Explorer cannot download (URL name) from (web address).

  Internet Explorer was not able to open this internet site.  The
  requested web site is either unavailable or cannot be found.  Please
  try again later.
  

  Export works by having a frame with a URL.  That part works, because
  my servlet gets called.  My servlet calls
  response.setContentType (text/tsv);  and
  response.addHeader (Content-Disposition, attachment; filename=\ +
  fileName + \);

  gets the response Writier, wraps the writer with a BufferedWriter,
  writes some data to it, and then calls flush on the BufferedWriter,
  which gets to the download dialog to pop up for IE.  However, at some
  point while I'm sending it data over that BufferedWriter (and it's
  pretty early in the process, because it never gives me a chance to
  specify where I want to save the file), IE gives me the above error
  message.

  Any suggestions for what's going on, and how to fix it?

  TIA,

  Greg

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



Re: How does my servlet cleanly throw an exception

2011-04-25 Thread Greg Dougherty
Thank you.

On Apr 20, 5:32 pm, Jens jens.nehlme...@gmail.com wrote:
 Take a look
 at:http://code.google.com/intl/de-DE/webtoolkit/doc/latest/tutorial/RPC

 J.

-- 
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 does my servlet cleanly throw an exception

2011-04-20 Thread Greg Dougherty
No.  Because doPost, which is what calls all our RPC code, throws
ServletException or IOException, and if you try to throw anything
else, Tomcat reports an error to its log about an unexpected
exception.  Which is one of the things I dont' want.

Greg

On Apr 12, 12:04 pm, Christien Lomax thecatwhispe...@gmail.com
wrote:
 I created an exception that my app uses (eg: MyAppException) that extends
 serializable.  Then when I need to throw an exception, I catch any other
 exceptions and throw MyAppException instead, passing in the message from the
 caught exception(s).

 Make sense?

-- 
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: CellTable Dynatable SimplePager last Button

2011-04-14 Thread Greg Dougherty
Great!  Thanks, that worked.

Even better, I now have two simple pagers, one above my table, the
other below, that play nice' with each other (hit an arrow on one,
both update).

Greg

On Apr 13, 10:46 am, Ahmed Mohammed ahmedmohiud...@gmail.com wrote:
 Create instance of simplepager resources and pass to the SimplePager
 Constructor. Try below lines.
 SimplePager.Resources pagerResources =
 GWT.create(SimplePager.Resources.class);
  SimplePager pager= new CustomSimplePager(TextLocation.CENTER,
 pagerResources, false, 0, true);

 P.S : From GWT Showcase example CwCellTable, if you want to take a
 look at it.

 gwt-2.2.0\samples\Showcase\src\com\google\gwt\sample\showcase\client
 \content\cell\CwCellTable.java

 Hope this helps.
 -Ahmed
 On Apr 12, 12:47 pm, Metronome  Basic

 metronome.ba...@worldonline.fr wrote:
  It was already constructed that way !
  but () is disabled and (| ) is hidden

  may be you somehow have to tell the pager what is the last page ?

  thanks

  Patrick

    - Original Message -
    From: John LaBanca
    To: google-web-toolkit@googlegroups.com
    Sent: Tuesday, April 12, 2011 5:45 PM
    Subject: Re: CellTable Dynatable SimplePager last Button

    The  is a fast forward button that defaults to 1000 rows.  Use the 
  overloaded SimplePager constructor to specify that you want to use a last 
  page button instead of a fast forward button.

    Thanks,
    John LaBanca
    jlaba...@google.com

    On Tue, Apr 12, 2011 at 11:41 AM, Metronome  Basic 
  metronome.ba...@worldonline.fr wrote:

      I've a CellTable using the example code in DynaTable

      but as in DynaTable the last () Button of th Pager is disabled

      in my case , as I know the row count , is there anyway to enable the 
  button

      thanks

      Patrick

      --
      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 
  athttp://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 
  athttp://groups.google.com/group/google-web-toolkit?hl=en.

  --- 
  ---

  --- 
  ---

    Aucun virus trouvé dans ce message.
    Analyse effectuée par AVG -www.avg.fr
    Version: 10.0.1209 / Base de données virale: 1500/3568 - Date: 12/04/2011

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



How does my servlet cleanly throw an exception

2011-04-12 Thread Greg Dougherty
I'm trying to throw an exception from my servlet back to the client
without breaking anything along the way, and having no success.

First I was throwing an InvocationException, but this created an error
it was an unrecognized exception.

So I threw a ServletException.  This is acceptable on the Servlet
side, because doPost is specified to throw ServletException.  But on
the Client side it creates a problem, because ServletException is not
IsSerializable.  And I can't create a Shared Exception that
IsSerializable and inherits from ServletException, because
ServletException is not defined on the Client side.

So, how DOES my RPC code pass an exception back to the client without
generating any errors for the servlet code?

TIA,

Greg

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



IE v Firefox

2011-03-28 Thread Greg Dougherty
So, I have a quirks mode web app using GWT 2.1.2.  It runs just fine
under Firefox, Sea Monkey (Mozilla derivative), and even Safari (on my
iPhone).  On IE, however, it pops up the password dialog box, accepts
a user id and password, then gives a completely blank screen.  On
errors on the server side.

How do I go about debugging this sort of problem?

TIA,

Greg

-- 
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: IE v Firefox

2011-03-28 Thread Greg Dougherty
 One more thing - why are you using quirks mode?
Because I'm utterly uninterested in trying to figure out what the
dimensions of my panels should be, so I don't ever use any of the
*LayoutPanels.

Every web app I've ever written has had its size dependent upon the
user's input.  I can write a lot of code to try to figure out how big
things should be, and then resize everything appropriately, or I can
use Quirks mode and have the Panels do that for me, while I focus on
the issues that are specific to my app.

Which do you think is a better use of my time?

I've never seen an explanation of why the *LayoutPanels are the way
they are (just the bald statement can't give you Swing like sizing in
Standards mode), but even if it's a really good reason, it wouldn't
really matter.  Because as long as I can simply focus my efforts on
the problems important to me, that's what I'm going to do.

Greg

On Mar 28, 10:04 am, Jeff Chimene jchim...@gmail.com wrote:
 One more thing - why are you using quirks mode?

-- 
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: IE v Firefox

2011-03-28 Thread Greg Dougherty
- Install firebug-lite
Well, I've taken a look at it, and maybe after I figure out what a
bookmarklet is I might feel more comfortable using it.  But thanks
for the pointer.

- Use development mode to step through your code after the login process
completes.

Yeah, 30 seconds after I posted this it occurred to me that I COULD
test this under development mode, not just as a deployed app. :-(

What's worse, is that I found the problem, and it's one I'd previously
discovered on Dec 8: IE 7 throws an exception when you try to add
something to a HorizontalPanel whose horizontal alignment is set to
ALIGN_JUSTIFY.

Ah, well, at least this time I submitted a bug report.

Thanks Jeff,
Greg

On Mar 28, 10:03 am, Jeff Chimene jchim...@gmail.com wrote:
 On Mon, Mar 28, 2011 at 7:41 AM, Greg Dougherty
 dougherty.greg...@mayo.eduwrote:

  So, I have a quirks mode web app using GWT 2.1.2.  It runs just fine
  under Firefox, Sea Monkey (Mozilla derivative), and even Safari (on my
  iPhone).  On IE, however, it pops up the password dialog box, accepts
  a user id and password, then gives a completely blank screen.  On
  errors on the server side.

  How do I go about debugging this sort of problem?

 A few ideas:

    - Install firebug-lite
    - Use development mode to step through your code after the login process
    completes.
    - Are you using Gin? If so, create a mock login authentication module to
    save yourself that step
    - Which version of IE? Six? Good luck.
    - JSNI code? I'd start there.
    - Custom attribute settings? element.setAttribute... Review those.
    - GWT.log or logger is your friend

-- 
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: Part III of RequestFactory article

2011-03-28 Thread Greg Dougherty
Would it really be too much to expect you to post what language the
article is in (since, unlike the post announcing the article, the
article's not in English)?

Greg

On Mar 28, 10:30 am, Luca luca.mas...@gmail.com wrote:
 Hi, on our Google Tech User group blog:

 http://firenze-gtug.blogspot.com/2011/03/requestfactory-framework-par...

 Hope can be useful for someone.
 Ciao.

-- 
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: One GWT WebApp but more than one WAR files

2011-03-28 Thread Greg Dougherty
The question is, why do you want to do it that way?

You can develop separate modules, and include all those modules in one
project / war file.  You can build multiple libraries, and include
them in multiple projects / war files.

What are you doing that requires you to have multiple war files?

Greg

On Mar 28, 8:49 am, deejay j.plessm...@googlemail.com wrote:
 Sorry i think the question was unclear. Of course, we need a shared
 repository.

 The main question was, how to develop a GWT application which is
 splitted in MULTIPLE war files which could be deployed separately in
 the webapp server...

 On 28 Mrz., 15:39, Juan Pablo Gardella gardellajuanpa...@gmail.com
 wrote:

  You can use a SCM repository, for ex. SVN, Mercurial

  Juan

  2011/3/28 deejay j.plessm...@googlemail.com

   Is it possible to create one Webapp which is splitted into multiple
   WAR files (e.g. every module in one WAR file)?
   Is this a bad approach?
   How to develop a gwt application with more than one developer?

   Thanks,
   Jay

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



Re: How can I put Hyperlinks inside a CellTable, which behave the same as the Hyperlink widget?

2011-03-14 Thread Greg Dougherty
Does that allow for right-clicking?  Because high on my list of HTML
Tricks the piss me off is when websites have javascript links
rather than real links that I can select, and do an Open New Tab /
Open New Window.

Greg

On Mar 14, 9:58 am, John LaBanca jlaba...@google.com wrote:
 You can render an anchor tag with a no-op href:
 a href=javascript:;Click Me/a

 In your Cell, catch the click event and call History.newItem(myToken).
  This is basically what the Hyperlink Widget does.

 Thanks,
 John LaBanca
 jlaba...@google.com

 On Sat, Mar 12, 2011 at 1:07 PM, Jake carolinespe...@yahoo.com wrote:
  I want to create a CellTable with a column of Hyperlinks.
  I'm trying to get the same behavior as the Hyperlink widget - e.g.: If
  you click it, it'll call History.newItem(), but a user is also able to
  do 'right-click, open link in new window'.

  The two possibilities seem to be
  1) put plain text into a column, and implement the selection model to
  trigger History.newItem.  Unfortunately, if you do this, 'right click,
  open link in new window' does not work, as it is not a 'true'
  hyperlink
  2) Put HTML into a column, using a a tag with a # URL.
  Unfortunately, this causes a page reload in IE, as per Issue #2152 in
  GWT's issue tracker.

  Has anyone found a solution to 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.

-- 
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: Upgrading from 2.1 to 2.2 and changing environment

2011-03-14 Thread Greg Dougherty
3. Does GWT support running on an embedded web server on Linux ? The only
choice I get is run as a web application on external server ?

If you want to run on your own server, turn off AppEngine.

Greg

On Mar 14, 4:34 pm, BobbyGrace oskare...@gmail.com wrote:
 I've had my project running on a Windows computer using Eclipse 3.6 and GWT
 2.1

 This day I set up Eclipse 3.5 and GWT 2.2 on my Ubuntu comp, using the
 Eclipse version from official repositories and the GWT plugin from the
 update site (http://dl.google.com/eclipse/plugin/3.5). First time I checked
 out the project from SVN on my Ubuntu comp and compiled it I noticed that
 the entire war/WEB-INF/lib directory has changed,

 New items:
 appengine-api-1.0-sdk-1.4.2.jar
 appengine-api-labs-1.4.2.jar
 appengine-jsr107cache-1.4.2.jar
 Deleted items:
 datanucleus-appengine-1.0.8.final.jar
 datanucleus-core-1.1.5.jar
 datanucleus-jpa-1.1.5.jar
 geronimo-jpa_3.0_spec-1.1.1.jar
 geronimo-jta_1.1_spec-1.1.1.jar
 gwt-servlet.jar
 jdo2-api-2.3-eb.jar
 jsr107cache-1.1.jar

    1. Don't know if these changes are from the 2.2 upgrade or environment
    change ?
    2. Is it necesarry to put libraries (except from manual added ones) in
    SVN, will GWT recreate them at compile time ?
    3. Does GWT support running on an embedded web server on Linux ? The only
    choice I get is run as a web application on external server ?

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



Jetty Context v. Tomcat Context

2011-03-10 Thread Greg Dougherty
The production version of my GWT app runs under Tomcat, with the
following settings:
context.xml:
Context path=/AppName docBase=webapps/AppName debug=5
reloadable=true
 crossContext=true
Resource
  type=javax.sql.DataSource
  auth=Container
  name=jdbc/Exome
  factory=org.apache.commons.dbcp.BasicDataSourceFactory
  maxActive=100
  maxIdle=30
  maxWait=1
  username=username
  password=password
  driverClassName=com.microsoft.sqlserver.jdbc.SQLServerDriver
  url=ServerURL
  removeAbandoned=true
  removeAbandonedTimeout=3600
  logAbandoned=true/
/Context

This allows my app to connect to a SQL Server database maintained by
IT.

I would like to be able to debug client side code in my app, which
means I need to get this working in development mode w/ Jetty.  I
wrote the following jetty-web.xml file.
?xml version=1.0  encoding=ISO-8859-1?
!DOCTYPE Configure PUBLIC -//Mort Bay Consulting//DTD Configure//
EN
  http://jetty.mortbay.org/configure.dtd;

Configure class=org.mortbay.jetty.webapp.WebAppContext
New class=org.mortbay.jetty.plus.naming.Resource
Argjava:/comp/env/Arg
Arg
New
class=org.apache.commons.dbcp.BasicDataSourceFactory
 Set name =
driverClassNamecom.microsoft.sqlserver.jdbc.SQLServerDriver/Set
 Set name = urlServerURL/Set
 Set name = usernameusername/Set
 Set name = passwordpassword/Set
 Set name = namejdbc/Exome/Set
/New
/Arg
/New
/Configure

I added Apache commons-dbcp-1.4.jar and commons-pool-1.5.5.jar to
Tomcat (and to my classpath) to get JDBC 4 DataSource (I have the SQL
Server JDBC 4 driver).  I added jetty-naming-6.1.11.jar and jetty-
plus-6.1.11.jar to my classpath.  When I launch my app, I get the
following error:


Starting Jetty on port 
   [WARN] Config error at Set
name=driverClassNamecom.microsoft.sqlserver.jdbc.SQLServerDriver/
Set
   [WARN] Config error at New
class=org.mortbay.jetty.plus.naming.ResourceArgjava:/comp/env/
ArgArg
New
class=org.apache.commons.dbcp.BasicDataSourceFactorySet
name=driverClassNamecom.microsoft.sqlserver.jdbc.SQLServerDriver/
SetSet name=urlServerURL/SetSet name=usernameusername/
SetSet name=passwordpassword/SetSet name=namejdbc/Exome/
Set/New
/Arg/New
   [WARN] Failed startup of context
com.google.gwt.dev.shell.jetty.JettyLauncher
$WebAppContextWithReload@180b22e{/,C:\Path\war}
java.lang.NoSuchMethodException: class
org.apache.commons.dbcp.BasicDataSourceFactory.setDriverClassName(class
java.lang.String)
at org.mortbay.xml.XmlConfiguration.set(XmlConfiguration.java:416)
at org.mortbay.xml.XmlConfiguration.configure(XmlConfiguration.java:
240)
...
at
org.mortbay.jetty.webapp.JettyWebXmlConfiguration.configureWebApp(JettyWebXmlConfiguration.java:
109)
at
org.mortbay.jetty.webapp.WebAppContext.startContext(WebAppContext.java:
1217)
...

Any suggestions as to what's going wrong / what I've done wrong?

Thanks!

Greg

-- 
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: help sending emails in GWT

2011-03-01 Thread Greg Dougherty
Graham,

From isn't your email account, From is which half of your
application, the client, or the server?

You can NOT send email from the client, but that so0und't like what
you're trying to do.

Greg

On Feb 28, 8:27 pm, Graham Haroldson gharold...@gmail.com wrote:
 Again,  im not quite sure what im trying to send emails from,  i can
 probably use my email, which is a gmail account.  I tried that and i also
 tried adding my account and password to the properties but it still does
 nothing

 On Mon, Feb 28, 2011 at 3:04 PM, Greg Dougherty
 dougherty.greg...@mayo.eduwrote:

   When i GWT Compile i get no errors at all.

  GWT Compile is client side.  What you're doing is done, and can only
  be done, on the server.  Where are you trying to send the mail from?

  Greg

  On Feb 28, 4:28 pm, GrahamH gharold...@gmail.com wrote:
   Hi all,

   Im trying to set up my GWT app so that it can send emails.

   I have the code to send the email in a server-side servlet class.  I
   have downloaded the Java Mail API and the JAF and included both the
   mail.jar and the activation.jar files to the external jars.

   Here is my Code:

   import java.util.Properties;

   import javax.mail.Message;
   import javax.mail.MessagingException;
   import javax.mail.Session;
   import javax.mail.Transport;
   import javax.mail.Message.RecipientType;
   import javax.mail.internet.AddressException;
   import javax.mail.internet.InternetAddress;
   import javax.mail.internet.MimeMessage;
   import javax.activation.*;

   import com.google.gwt.user.server.rpc.RemoteServiceServlet;

   import cs.ubc.ca.cs310.HockeyPool.client.EmailService;

   public class EmailServiceImpl extends RemoteServiceServlet implements
   EmailService  {
           /**
            *
            */
           private static final long serialVersionUID = 1L;

           public void sendEmail(String email){
                   Properties props = System.getProperties();
                   props.put(mail.smtp.host, smtp.gmail.com);
                   props.put(mail.smtp.port, 465);

                   Session mailSession = Session.getDefaultInstance(props);
                   Message simpleMessage = new MimeMessage(mailSession);

                   InternetAddress fromAddress = null;
                   InternetAddress toAddress = null;
                   try {
                           fromAddress = new InternetAddress(
  gharold...@gmail.com);
                           toAddress = new InternetAddress(email);
                   } catch (AddressException e) {
                           // TODO Auto-generated catch block
                           e.printStackTrace();
                   }

                   try {
                           simpleMessage.setFrom(fromAddress);
                           simpleMessage.setRecipient(RecipientType.TO,
  toAddress);
                           simpleMessage.setSubject(HockeyPool PoolAdmin
  Invitation);
                           simpleMessage.setText(Hello,br /br /You have
  been added as a
   Pool Administrator for our Hockey Pool System);

                           Transport.send(simpleMessage);
                           System.out.println(email sent);
                   } catch (MessagingException e) {
                           // TODO Auto-generated catch block
                           e.printStackTrace();
                   }
           }

   }

   When i GWT Compile i get no errors at all.
   Even when i debug the program it executes all of this code just fine
   and never hits an exception but the email is NEVER sent.

   Another thing is every single post about using Java Mail tells me i
   need the activation.jar but the following line gives me a warning that
   the activiation is never used anywhere in my class

   import javax.activation.*;

   Any help is much appreciated
   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.

-- 
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: help sending emails in GWT

2011-03-01 Thread Greg Dougherty
Yep, it's easy to forget the difference.

On Mar 1, 2:10 pm, Hilco Wijbenga hilco.wijbe...@gmail.com wrote:
 On 1 March 2011 19:38, Dougherty, Gregory T. dougherty.greg...@mayo.edu 
 wrote:

  Wow, so you're saying you think that randomly picked up bits of
  JavaScript should be able to take over your computer and send emails
  from your computer to whomever they want?

  Every spammer in the world must love you.

  Fortunately, the browser makers disagree.

 Sigh, yes of course. I saw client and wasn't thinking browser + SOP. :-)

-- 
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: Upadate Data of CellList

2011-02-28 Thread Greg Dougherty
Well, I haven't looked at the Showcase example, but I'd bet good money
that those null pointers are the result of your actions, not anything
in GWT.

Are you disposing of the data you got from the server after your call
to updateRow?  Remember, YOU are providing the data to the renderer.
That means you have to keep a copy of the data around for the renderer
whenever it wants it.

Greg

On Feb 25, 9:59 am, Andreas koebe...@gmail.com wrote:
  If you're only adding to the end of the list, then keep track of how
  many items you've already added, and call updateRowData (prevNumAdded
  - 1, newData);

 Unfortunately this works only on initial filling. The second time I
 call this I've got nullPointers in my cell.render method for the first
 items added. This is another thing I dont understand: why is the
 render method call for my whole list and not only for the one that
 I've added in the updateRowData method and why the first 10 are null.

 Also I dont understand which method forces the list to re render?

  If you're changing things / adding things in the middle, you can do
  all sorts of complicated things to figure out where the changes are,
  and only give your CellList the changes, but you're probably better
  off simply replacing everything and letting CellList worry about it.

 Draw the whole list is not that good cause you have a short delay
 where the list disappears. And there must be  a way to get it work, as
 shown in the showcase example.

-- 
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: help sending emails in GWT

2011-02-28 Thread Greg Dougherty
 When i GWT Compile i get no errors at all.

GWT Compile is client side.  What you're doing is done, and can only
be done, on the server.  Where are you trying to send the mail from?

Greg

On Feb 28, 4:28 pm, GrahamH gharold...@gmail.com wrote:
 Hi all,

 Im trying to set up my GWT app so that it can send emails.

 I have the code to send the email in a server-side servlet class.  I
 have downloaded the Java Mail API and the JAF and included both the
 mail.jar and the activation.jar files to the external jars.

 Here is my Code:

 import java.util.Properties;

 import javax.mail.Message;
 import javax.mail.MessagingException;
 import javax.mail.Session;
 import javax.mail.Transport;
 import javax.mail.Message.RecipientType;
 import javax.mail.internet.AddressException;
 import javax.mail.internet.InternetAddress;
 import javax.mail.internet.MimeMessage;
 import javax.activation.*;

 import com.google.gwt.user.server.rpc.RemoteServiceServlet;

 import cs.ubc.ca.cs310.HockeyPool.client.EmailService;

 public class EmailServiceImpl extends RemoteServiceServlet implements
 EmailService  {
         /**
          *
          */
         private static final long serialVersionUID = 1L;

         public void sendEmail(String email){
                 Properties props = System.getProperties();
                 props.put(mail.smtp.host, smtp.gmail.com);
                 props.put(mail.smtp.port, 465);

                 Session mailSession = Session.getDefaultInstance(props);
                 Message simpleMessage = new MimeMessage(mailSession);

                 InternetAddress fromAddress = null;
                 InternetAddress toAddress = null;
                 try {
                         fromAddress = new 
 InternetAddress(gharold...@gmail.com);
                         toAddress = new InternetAddress(email);
                 } catch (AddressException e) {
                         // TODO Auto-generated catch block
                         e.printStackTrace();
                 }

                 try {
                         simpleMessage.setFrom(fromAddress);
                         simpleMessage.setRecipient(RecipientType.TO, 
 toAddress);
                         simpleMessage.setSubject(HockeyPool PoolAdmin 
 Invitation);
                         simpleMessage.setText(Hello,br /br /You have 
 been added as a
 Pool Administrator for our Hockey Pool System);

                         Transport.send(simpleMessage);
                         System.out.println(email sent);
                 } catch (MessagingException e) {
                         // TODO Auto-generated catch block
                         e.printStackTrace();
                 }
         }

 }

 When i GWT Compile i get no errors at all.
 Even when i debug the program it executes all of this code just fine
 and never hits an exception but the email is NEVER sent.

 Another thing is every single post about using Java Mail tells me i
 need the activation.jar but the following line gives me a warning that
 the activiation is never used anywhere in my class

 import javax.activation.*;

 Any help is much appreciated
 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.



Re: can we print page without open print dialog

2011-02-25 Thread Greg Dougherty
Would you want some random web page to be able to start your printer
going, printing out whatever the writer of that web page wants,
without any warning to you, or any way to stop it?

No?

Then no, you can't print from a web application running in a properly
functioning web browser w/o first putting up a print dialog that lets
teh user control what you're doing.  :-)

Greg

On Feb 25, 3:53 am, Neel neel.3.ka...@gmail.com wrote:
 Hi

 Is it possible  to print page without open Print Dialog.

-- 
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 implement Enter Key Submit Form in GWT

2011-02-25 Thread Greg Dougherty
Search for EnterButton in this group.  At the top is a class
everyone should have.  Below that is a discussion of using sinkEvents
to get key down events from Widgets that normally don't pass them.

Greg

On Feb 25, 7:59 am, El Mentecato Mayor rogelio.flo...@gmail.com
wrote:
 If you want to do it when a PasswordTextBox is on focus for example
 (this is from my sign-in page):

 passwordTextBox.addKeyPressHandler(new KeyPressHandler() {
          public void onKeyPress(KeyPressEvent event) {
             if (((int)event.getCharCode()) == 13) {  // User hit
 Enter key
                submitForm();
             }
          }

 });

 On Feb 24, 4:55 pm, Néstor Boscán nesto...@gmail.com wrote:

  Hi

  I need to simulate the Enter Key submit form in GWT where hay hit the
  enter key and the form is submitted. Any ideas on how to acomplish this?

  Regards,

  Néstor Boscán

-- 
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: Upadate Data of CellList

2011-02-24 Thread Greg Dougherty
If you're only adding to the end of the list, then keep track of how
many items you've already added, and call updateRowData (prevNumAdded
- 1, newData);

If you're changing things / adding things in the middle, you can do
all sorts of complicated things to figure out where the changes are,
and only give your CellList the changes, but you're probably better
off simply replacing everything and letting CellList worry about it.

Greg

On Feb 24, 4:57 am, Andreas koebe...@gmail.com wrote:
 I have a celllist where I want add data loading from server and the
 list should show all data. I use a AnsyncProvider and when I
 succecfully get my data from the server I want to add the data to the
 celllist. The only way I got this work is to hold a list of the data
 I've got from the  server, where I add incoming data and then calling
 updateRowData with the list of all incoming data:
 ListResponse list;
 onSuccess(Response response){
 list.addAll(response.getItems());
       list.addAll(response);
       display.setVisibleRange(0, list.size());
       asyncDataProvider.updateRowData(0, list);

 }

 But this force the CellList to redraw the the list with the whole
 dataset not only the new one. Like in the showcase example of cellList
 (http://gwt.google.com/samples/Showcase/Showcase.html#!CwCellList).

 So my question how can I show all data and only the new one will be
 added to the view.

-- 
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: Image element will hang test execution

2011-02-24 Thread Greg Dougherty
Right before this object's constructor, try to create the image object
on its own.  If that doesn't work, try to create the image as the
first think your app does.  If that does work, you've got something in
your app breaking the image.  If that doesn't work, you have a bad
image.  If they both work, then you've got a problem somewhere in your
object, so try allocating the Image at different points of the
constructor, until you've found the command that breaks the Image
loading process.

You can also try a different Image, to see if the SPECIFIC Image is
the problem there, or if any image is a problem.

IOW, at this point we have no idea whether or not it's a GWT problem,
and (since you haven't given us the code necessary to replicate the
problem) noway to help you if it IS a GWT problem.

Greg

On Feb 24, 5:54 am, Alex D. alex.dobjans...@gmail.com wrote:
 Still no idea guys?

 On Feb 23, 6:19 pm, Alex D. alex.dobjans...@gmail.com wrote:

  Hi,
  The code below will not finish (gets hanged in the Image constructor):

  public class ATest extends GWTTestCase {
         // . init code  //

          public void testShouldNotHang () {
                  // Create an empty image
                  final Image img = new Image();
          }

  }

  The hang happens on Image:237 =
  Event.sinkEvents(image.getElement(), Event.ONLOAD);

  Now, I'm not trying to test the Image constructor, but I have complex
  components that cannot be modified for testing purposes, and the
  happen to have Image inside. I have searched but I couldn't find any
  answer ... nobody else had this issue?

  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.



Re: Replace Enter key by Shift + Enter

2011-02-24 Thread Greg Dougherty
Why?  What are you trying to accomplish?

On Feb 24, 7:44 am, ryan T ryanro...@gmail.com wrote:
 Hi all,

 Is there any way to replace Enter key by Shift + Enter for a widget such as
 RichTextArea?

 Thanks,

 ryan

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



Where do I put the Tomcat Context.xml file?

2011-02-24 Thread Greg Dougherty
I'm starting to use JNDI with my Servlet, for which I need to place a
context.xml file in /META-INF/context.xml for my .war file?  Where is
that in the GWT file hierarchy?  war?  war/WEB-INF?

TIA,

Greg

-- 
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: Where do I put the Tomcat Context.xml file?

2011-02-24 Thread Greg Dougherty
Thank you Alan.

On Feb 24, 3:57 pm, Alan Chaney a...@mechnicality.com wrote:
 war/META-INF/context.xml

 just create the dir and pop in the context.xml.

 You should check carefully the tomcat docs w.r.t context.xml - the spec. has 
 changed a lot between
 different versions of tomcat.

 HTH

 Alan

 On 2/24/2011 1:44 PM, Greg Dougherty wrote:

  I'm starting to use JNDI with my Servlet, for which I need to place a
  context.xml file in /META-INF/context.xml for my .war file?  Where is
  that in the GWT file hierarchy?  war?  war/WEB-INF?

  TIA,

  Greg

 --
 Alan Chaney
 CTO and Founder, Mechnicality, Inc.www.mechnicality.com

-- 
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: TabLayoutPanel + dynamic tab content + DialogBox = ?

2011-02-23 Thread Greg Dougherty
Good idea.  I've created such a request.
http://code.google.com/p/google-web-toolkit/issues/detail?id=6069q=TabPanelsort=-idcolspec=ID
Type Status Owner Milestone Summary Stars

On Feb 23, 2:42 am, Thomas Broyer t.bro...@gmail.com wrote:
 Maybe you could file a bug? They'll be undeprecating DockPanel in 2.3, and
 maybe TabPanel should be undeprecated 
 too:http://code.google.com/p/google-web-toolkit/issues/detail?id=5888

-- 
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: Sorting CellTable, AsyncData but Sort Locally

2011-02-23 Thread Greg Dougherty
Well, I'd start out by trying:
public MySortHandler(ListBook BOOKS, CellTable myCellTable,
Column columnA,  you get the picture) {
 thisList = new ArrayList (BOOKS);
 ..
}

On Feb 23, 9:56 am, Josh K kendrick.j...@gmail.com wrote:
 Ok, I got something working using the example you provided, but I
 don't like how I implemented it. It wasn't hard, but everything I've
 wanted to do in GWT so far has been easy, so this seems kind of
 messy..

 But, I guess trying to implement sorting using a ListSortHandler would
 have been just as messy since I would have had to setComparator for
 every column still right?

 Also, this is probably a stupid Java error, but I'm trying to re-use
 my SortHandler so I broke it into it's own class. In each composite
 I've got a list of what is displayed in the tables, call it BOOKS.
 What I've been trying to do is instantiate the SortHandler:

 new MySortHandler (BOOKS, myCellTable, columnA, columnB, columnC,
 etc..)

 And in class I've got something like
 public class MySortHandler {
     private ListBook thisList;

     public MySortHandler(ListBook BOOKS, CellTable myCellTable,
 Column columnA,  you get the picture) {
          thisList = BOOKS;
          ..
     }

 Down below I sort thisList, and at the end, I assign it back to BOOKS
 and do cellTable.setRowData(BOOKS);

 When I go to sort though, nothing happens. I think I narrowed it down
 to understand for some reason the list isn't getting copied over or
 something like that? If I have MySortHandler as an internal private
 class to my composite and I use the original List BOOKS, it sorts, but
 when I try to do like I was doing above, it doesn't work.

 Can anyone explain why, and give me an idea of how to fix it. I'll be
 alright without code, just don't even know how to get around this. I'd
 hate to have to stick an internal SortHandler at the end of each
 composite.

 On Feb 14, 12:19 pm, Josh K kendrick.j...@gmail.com wrote:

  What I was getting confused about doing it this way though is if I'm
  allowing the data to be sorted by 4 or 5 different columns, would I
  have to say something like:

  if (event.isSortAscending  nameColumn) {
      Collections.sort(newData, nameAscComparator)} else if (nameColumn) {

      Collections.sort(newData, nameDescComparator)} else if 
  (event.isSortAscending  timeRequestedColumn) {

      Collections.sort(newData, timeRequestedAscComparator)

  } 

  ya know where I have to have a different asc and desc comparator for
  each column and figure out which column was selected before I sort?

  I'm thinking that I'll have a small enough set of rows (probably max
  100 rows at a time), that if I just make the columns sortable, it will
  be fine if I don't use paging. So maybe I should do what Greg
  mentioned and download all the data and use a ListDataProvider. What I
  liked about the AsyncDataProvider though is that people can change the
  value of a cell and hit enter and it's updated in the database because
  this will be an application a couple are using at one time all dealing
  with the same data so I need changes to show up on what other people
  are seeing.

  BTW, thanks a lot guys!

  On Feb 14, 10:00 am, John LaBanca jlaba...@google.com wrote:

   If you are supporting paging, then a local sort will only sort the current
   page, whereas a database sort would sort the data return the results for 
   the
   current page.  For example, if you are on the first page and do a reverse
   sort, do you want to see all the names that start with z (database sort), 
   or
   do you want to see all of the names that start with a in reverse order
   (local sort of the current page).

   That being said, you can cache the values locally in a list and use
   ListSortHandler.  Alternatively, you can add a ColumnSortEvent.Handler to
   CellTable and copy and sort the return of CellTable#getVisibleItems().  
   The
   code would be something like the following:

   cellTable.addColumnSortHandler(new ColumnSortEvent.Handler() {
     public void onColumnSort(ColumnSortEvent event) {
       ListT newData = new ArrayList(cellTable.getVisibleItems()); // Copy
   the data
       if (event.isSortAscending) {
         Collections.sort(newData, myAscComparator); // Sort ascending.
       } else {
         Collections.sort(newData, myDescComparator); // Sort descending.
       }
       cellTable.setRowData(cellTable.getVisibleRange(), newData);
     }

   });

   Thanks,
   John LaBanca
   jlaba...@google.com

   On Mon, Feb 14, 2011 at 12:53 AM, Josh K kendrick.j...@gmail.com wrote:
I've been developing an application in GWT that has data I've been
displaying in a CellTable. I've set it up with a few TextColumns and a
few EditTextColumns. I've got it set up to where if someone changes
the data in an EditText cell, it sends an asynchronous request to the
database and updates that row in the DB table. In short, I've got all
this working

Re: TabLayoutPanel + dynamic tab content + DialogBox = ?

2011-02-22 Thread Greg Dougherty
You've discovered the reason why I never use TabLayoutPanel, and why
I'll need a really good reason to keep on upgrading GWT once support
for TabPanel goes away.

So it's deprecated.  Block deprication warnings, and use TabPanel.

Greg

On Feb 21, 2:30 pm, jscheller jschel...@csoftware.com wrote:
 So... I've got a TabLayoutPanel I'm trying to embed in a DialogBox,
 where the contents of the tabs are generated at runtime. I've seen the
 discussion about making sure DOCTYPE is right and that I'm pulling in
 CSS for the tabs. I've actually got another similar instance of
 TabLayoutPanel working fine as part of my main (LayoutPanel based)
 layout, but if I pop up a DialogBox with a TabLayoutPanel in it, I'm
 missing the actual tab content (the tabs themselves show up fine,
 styled just like my working instance.)

 If I explicitly set the height of the TabLayoutPanel to something, I
 can see the content fine. My problem is all my tab content is
 dynamically generated, and ideally I'd like to see the TabLayoutPanel
 (and the containing DialogBox) resize itself. Lots of gnashing of
 teeth today over this.

 And so, it occurs to me that DialogBox isn't descended from a
 LayoutPanel and I'm wondering if TabLayoutPanel is really destined to
 work in a DialogBox at all when resizing might be concerned...
 TabPanel is deprecated, and there's no LayoutDialogBox or anything
 around so I'm wondering how best to proceed.

 Is there a clean recipe for adding a bunch of content to a
 TabLayoutPanel and then explicitly getting it to resize itself (and
 it's non-Layout derived enclosures?). I tried adding all my panel
 contents and then just calling TabLayoutPanel.OnResize(), but didn't
 get anything different. Or is my best bet going back to TabPanel and
 wait for the day that blocks a GWT upgrade?

 Thoughts or insights appreciated...

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



Trying to search but nothing's happening

2011-02-22 Thread Greg Dougherty
Well, not nothing, but when I click on my profile (and other people's
profiles) I don't see any messages after Feb 1.  If I search for my
name I get the same thing.

Why can't I use Search to find my recent messages?

-- 
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: Feedback Requested: Preview of new GWT Style Theme

2011-02-22 Thread Greg Dougherty
Overall UI principle:
Good UI is unconscious UI.  If the user has to stop and think about
something (is A really different from B?), then the UI has failed.
A quick glance should, immediately and without any conscious thought,
tell the user essentially everything about the interface.  This is
disabled, that is not.  This is the foreground object, these are
background objects, and that is the overall background.  Three very
differnt things, which therefore should always LOOK very different.

Sometimes you do a good job of this (check boxes, radio buttons),
other times you do a very poor job (basic button, Tab Layout Panel).

And remember: big targets are good (and fast) targets.  Small targets
are bad (and slow) targets.

Lighting:
Your text boxes have the top bar of the box black, and the other three
gray.  it looks wrong to my eyes,  If you're trying for a 3D effect, I
can't see it.  Depth takes more than one pixel / line.  I'm perfectly
happy with 2D UI objects (which would mean all for lines being the
same color).  I'm willing to live w/ 3D.  Right now, you have a 2.5D
look that just doesn't work.  I urge you to pick one look, and stick
to it.

1: Basic Button:
It's very hard to tell the disabled and enabled buttons apart.  I
suggest either changing the background more when it's disabled, or
bolding the text when it's enabled.  (Compare with Custom Button,
where it's quick and easy to tell if it's enabled or not.)

2: Hyperlinks:
Is there a difference between followed and never visited
Hyperlinks?  Because if there is, I can't see it.  If there isn't, and
it's possible to add it, I think it should be added.

3: ListBox:
It would be good to have enough entries for one of the selections so
we can see what it looks like when the Box has to scroll its data.

5: Tree
A: While the +/- works, I certainly prefer the triangle that turns to
the side or down based on the disclosure state.
B: The disclosure box is a rather small target to hit (I missed it
several times).  It would be nice to make it bigger, and / or make it
so double-clicking on the text of the line opens / closes the
disclosure.

6: Menu Bar:
It's nice, but it COMPLETELY clashes with the menu bar on my web
browser (Sea Monkey on Windows XP).

I know you're trying to develop your own theme, but the apps created
with this theme have to live inside web browsers.  Violently clashing
with the surrounding UI is inherently bad UI, no matter how pretty the
UI might be in isolation.

7: Disclosure Panel:
When I click on the Disclosure Panel, the text of the title gets
surrounded by a gray box.  This looks OK when it closes, but looks
really ugly when it opens.

8: Tab Layout Panel:
Put me in the hate it column.  Dark Blue on Slightly Less Dark Blue
is IMO a really bad color combination (and I say this as someone who
really likes blue).  The unselected Tabs are different from the
background.  Therefore, they need to have a different, easily
distinguishable, color than the background.

9: Cell Browser
It's Browse through dynamic data, NOT BrowseR through dynamic
data :-)

Other than that it's fairly good.  But I didn't notice anything that
caused me to think hey, that's great, i want that!

Greg

On Feb 16, 12:12 pm, John LaBanca jlaba...@google.com wrote:
 The GWT team is happy to (pre)announce that we will introduce a new, more
 modern CSS style theme in GWT 2.3 called Clean.  The new theme makes
 existing widgets look cleaner (more business-like) than the standard
 theme, and replaces the thick light blue borders with thin gray borders.  We
 worked under the constraint that we would not modify the DOM structure of
 the existing widgets because we didn't want to break existing apps, so this
 new theme is purely a CSS overhaul.

 You can preview the new Clean style theme at the link 
 below:http://gwt-showcase-clean.appspot.com/

 Please let us know what you like and dislike about the new theme, and if you
 are interested in switching your app to it.  Once we release the theme, it
 becomes very difficult to change it without affecting existing apps, so
 early feedback is helpful.

 Thanks,
 John LaBanca
 jlaba...@google.com

-- 
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: Setting the name of a downloaded file

2011-02-16 Thread Greg Dougherty
Thanks, it worked!

Greg

On Feb 11, 10:19 pm, Jim Douglas jdou...@basis.com wrote:
 public class FileDownloadServlet extends HttpServlet
 {
     @Override
     protected void doGet(HttpServletRequest p_request,
                          HttpServletResponse p_response)
         throws ServletException, IOException
     {
         String filename = /* ... */;
         File file = /* ... */;
         long length = file.length();
         FileInputStream fis = new FileInputStream(file);
         p_response.addHeader(Content-Disposition,
                              attachment; filename=\ + filename +
 \);
         p_response.setContentType(application/octet-stream);
         if (length  0  length = Integer.MAX_VALUE);
             p_response.setContentLength((int)length);
         ServletOutputStream out = p_response.getOutputStream();
         p_response.setBufferSize(32768);
         int bufSize = p_response.getBufferSize();
         byte[] buffer = new byte[bufSize];
         BufferedInputStream bis = new BufferedInputStream(fis,
 bufSize);
         int bytes;
         while ((bytes = bis.read(buffer, 0, bufSize)) = 0)
             out.write(buffer, 0, bytes);
         bis.close();
         fis.close();
         out.flush();
         out.close();
     }

 }

 On Feb 11, 9:12 am, Greg Dougherty dougherty.greg...@mayo.edu wrote:

  So I have a way to get a Save As Dialog box to come up for the file
  I'm downloading from my servlet (user hits the Export Button, I
  create an invisible frame that points to my servlet with the
  parameters necessary for the servlet to generate the export file).
  Unfortunately, the file comes up with the name of my servlet.

  How do I give the Save As Dialog a better default name for the file?
  The file is generated on the fly, so putting a file name in the URL
  wouldn't work.

  TIA,

  Greg

-- 
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: Problem with AsyncCallback onSuccess result is null

2011-02-15 Thread Greg Dougherty
Is there some reason why you're implementing Serializable rather than
IsSerializable?  Have you taken care of all the fiddly bits you have
to deal with to get Serializable to work with GWT?

http://code.google.com/webtoolkit/doc/trunk/FAQ_Server.html#Does_the_GWT_RPC_system_support_the_use_of_java.io.Serializable

Greg

On Feb 12, 5:14 pm, Bastian bastian.la...@hotmail.de wrote:
 Hello,

 I hope everyone is fine. I have started to use RPC’s with GWT. I have
 worked through the examples and tutorials and I believe understand how
 it works. Now, I have created my own class to serialize and use in an
 asynchronous callback so that the client can receive data about a
 purchase from a server. Everything compiles properly and the onSuccess
 method gets executed, but when I try to read the received data, it
 only is “Null”. Does anyone have an idea what might be wrong with my
 code?

 Thanks a lot.

 Best regards,

 Bastian

 Here is my code:

 Class to store the data in client package:

 import java.io.Serializable;

 @SuppressWarnings(serial)
 public class Purchase implements Serializable {

           private String username;
           private String headline;
           private String description;

           public Purchase()
           {

           }

           public String getUsername(){
                 return username;
           }

           public String getHeadline(){
                   return this.headline;
           }

           public String getDescription(){
                   return description;
           }

           public void setUsername(String username){
                   this.username = username;
           }

           public void setHeadline(String headline){
                   this.username = headline;
           }

           public void setDescription(String description){
                   this.description = description;
           }

 }

 Service Interface in client package:

 import com.google.gwt.user.client.rpc.RemoteService;
 import com.google.gwt.user.client.rpc.RemoteServiceRelativePath;

 @RemoteServiceRelativePath(collectivePurchase)
 public interface CollectivePurchaseService extends RemoteService {
   Purchase getCollectivePurchase(String username);

 }

 Async Interface in the client package:

 import com.google.gwt.user.client.rpc.AsyncCallback;

 public interface CollectivePurchaseServiceAsync {

   void getCollectivePurchase(String username, AsyncCallbackPurchase
 callback);

 }

 Server implementation:

 import com.google.gwt.user.server.rpc.RemoteServiceServlet;

 @SuppressWarnings(serial)
 public class CollectivePurchaseServiceImpl extends
 RemoteServiceServlet implements CollectivePurchaseService {

 public Purchase getCollectivePurchase(String username) {

 com.biddrocket.secretrocket.client.Purchase collective = new
 com.biddrocket.secretrocket.client.Purchase();
                 collective.setUsername(brian);
                 collective.setHeadline(motor bike);
                 collective.setDescription(most amazing bike);

                 return collective;

         }

 }

 Client entry point:

 CollectivePurchaseServiceAsync collectivePurchaseService =
 (CollectivePurchaseServiceAsync)
 GWT.create(CollectivePurchaseService.class);

 collectivePurchaseService.getCollectivePurchase(brian ley, new
 AsyncCallbackPurchase() {
                                                 public void 
 onFailure(Throwable caught) {
                                                         
 Window.alert(caught.getLocalizedMessage());
                                                 }
                                                 @Override
                                                 public void 
 onSuccess(Purchase result) {
                                                          update(result);

                                                 }
                                         });

                   //Make the call to the RPC to get the headline for the 
 gallery
 showcase
                   //collectivePurchaseService.getHeadline(brian, callback);
           }
           public void update(Purchase collective){
                   Window.alert(collective.getHeadline());
           }

-- 
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: Sorting CellTable, AsyncData but Sort Locally

2011-02-14 Thread Greg Dougherty
Here's the question you want to ask yourself: Why am I using an
AsyncDataProvider and data paging?

Because I use one in my app with sortable columns.  And I'm using one
because I've got thousands to tens of thousands of rows of data to
display.  And since I don't want to try to download all that data in
one go, I sort things on the server (actually, I sort the data within
the database, and get a scrollable results set with everything in the
right order).

If you really have a little enough data that you want to sort it on
the client, do yourself a favor, and just download all the data and
don't use the AsyncDataProvider at all.

Greg

On Feb 13, 11:53 pm, Josh K kendrick.j...@gmail.com wrote:
 I've been developing an application in GWT that has data I've been
 displaying in a CellTable. I've set it up with a few TextColumns and a
 few EditTextColumns. I've got it set up to where if someone changes
 the data in an EditText cell, it sends an asynchronous request to the
 database and updates that row in the DB table. In short, I've got all
 this working using AsyncCallbacks and an AsyncDataProvider.

 Since 2.2 came out, I want to implement column sorting, kind of like
 is seen in this 
 example:http://gwt.google.com/samples/Showcase/Showcase.html#!CwCellTable
 , but with an AsyncDataProvider. I want to sort the columns locally
 because I think it'd be faster than making an Async DB call again each
 time someone clicks to sort (which is the impression of what was
 supposed to happen if I used an AsyncHandler.

 So I THINK what I'm looking for is some way to use a ListHandler with
 an AsyncDataProvider?

 Can anyone shed some light on this? Maybe done it before or know the
 direction I'm supposed to? If it's even do-able?

-- 
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: Create an Image from received bytes on client side - possible?

2011-02-14 Thread Greg Dougherty
I could not find any way to build an Image other than by sending one
from the server, when I tried to solve a similar problem two months
ago.

On Feb 14, 3:16 am, MJ zuti...@gmail.com wrote:
 Hey guys.

 I did some researching on this matter but besides ClientBundle I
 failed to find something that would help me here. ClientBundle would
 work OK in case I would have the images as static references, but what
 I am trying to do (just playing around, getting to know this GWT) is
 similar to file explorer. A tree on the left side of my workspace
 shows folders with files inside them. For my purposes, picture files.
 And these folders can be anywhere on the HDD. Now, how would I go
 about sending selected image (or complete folder content) to client
 side?

 What I had in mind is that I would create a widget that would hold an
 Image object on it + perhaps a label or two. Nothing fancy. This
 widget would call a asnyc service to get the picture data from the
 server. Bytes. But, once I would get the data to the client side, how
 can I create an Image object out of it? I did not find a way.

 Alternative I could probably make browsing only possible on such
 folders that are accessible over the internet (virtual folders I think
 is the correct term) and just send over appropriate URLs, since Image
 does accept such parameter. But I would really like to know if
 original idea is feasible. ImageResource from received bytes?

 Thank you all.

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



Setting the name of a downloaded file

2011-02-11 Thread Greg Dougherty
So I have a way to get a Save As Dialog box to come up for the file
I'm downloading from my servlet (user hits the Export Button, I
create an invisible frame that points to my servlet with the
parameters necessary for the servlet to generate the export file).
Unfortunately, the file comes up with the name of my servlet.

How do I give the Save As Dialog a better default name for the file?
The file is generated on the fly, so putting a file name in the URL
wouldn't work.

TIA,

Greg

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



Frame not refreshing when call setURL

2011-02-10 Thread Greg Dougherty
So, I have a hidden frame, and I set its URL to download a file from
my server.  The first time I do this, it works like a charm.

Any subsequent times I do it, my server never gets the call.  I am
changing at least one of the parameters of the URL each time, so I
don't believe that Firefox would be caching the call (and, even if it
was, shouldn't it give me the file to save again?).

Firefox 3.6.13, on Windows XP.

-- 
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: What is the correct way for CellTable cells to communicate ?

2011-02-08 Thread Greg Dougherty
What I do is make a change to the data for the row (the class T
object), then tell the data provider to refresh.

Greg

On Feb 3, 11:10 pm, zixzigma zixzi...@gmail.com wrote:
 I have a CellTable.

 when an event occurs in Cell A,
 I would like to take action and modify Cell B.
 (user clicks on Cell A, I would like to modify Cell B, in the same row to
 keep things simple)

 could you please provide some pointers on how this can be correctly
 implemented ?

 do you think we need to use DOM events or GWTEvents,
 and do you think it has to be handled at Cell level, or Table level ?

 any ideas are really appreciated.

 Thank You

-- 
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: Announcing GPE/GWT 2.2 RC1

2011-02-08 Thread Greg Dougherty
Well, leaving aside the question of why HAVEN'T you upgraded to Java
6, the various isEmpty () methods are quite cool, and wrth an upgrade
just for that.

Greg

On Feb 8, 1:47 am, stuckagain david.no...@gmail.com wrote:
 What features in Java 6 would be so fundamental to GWT that 1.5 becomes
 deprecated ?

-- 
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: Announcing GPE/GWT 2.2 RC1

2011-02-08 Thread Greg Dougherty
The other thing to remember is that if they claim to support Java 5,
then they have to test against it.  Given limited testing ability,
where would you have them spend their resources:
1: Making sure Java 1.5 still works
2: Making sure Java 6 works even better?

Greg

On Feb 8, 1:47 am, stuckagain david.no...@gmail.com wrote:
 What features in Java 6 would be so fundamental to GWT that 1.5 becomes
 deprecated ?

-- 
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: Selecting and disabling elements in CellTable

2011-02-04 Thread Greg Dougherty
Hi Jeff,

I ended up writing my own version of CheckboxCell (rather, taking the
code for it, and making my own class with modifications).

First change: I added a boolean field disabled, and a setEnabled
call.
Second change: I redid render so it has 4 options (checked | unchecked
x enabled | disabled)
Third change: removed all the code for keeping track of its value,
since my getValue and FieldUpdater take care of that.

Result, a disable able CheckboxCell that behaves the way I expect it
to.

(The purpose of the graphic was to show how hiding col 2, the checkbox
column, moves col 3, a non-checkbox column, since you didn't seem to
understand why I consider the show / hide to be a bad thing.)

Greg

On Feb 1, 2:59 pm, Jeff Schwartz jefftschwa...@gmail.com wrote:
 On Tue, Feb 1, 2011 at 3:38 PM, Greg Dougherty
 dougherty.greg...@mayo.eduwrote:

  Jeff:

  Column 1 : Column 2 ; Column 3
  Column 1 :Column 3
  Column 1 : Column 2 ; Column 3

  I thought you said column, Geg, not an individual row's cells and naturally

 I took that then to mean all check boxes within a column. Is that what you
 said or do I have a pencil sticking out of my head :)?

 In any case it's now obvious what your intention is so here's one way to do
 this but it is by no means the only way:

 Iterate row by row through your cell table and for each row iterate through
 each of its cells. If a cell contains a checkbox that needs to be disabled
 then get the cell's inner html which will be a checkbox. Once you have the
 checkbox just set it's enabled property to false or better yet hide the
 checkbox by setting its display attribute to none.

 There are numerous GWT methods that can assist you in iterating over the DOM
 and in particular a table. For instance, I use TableElement often,
 especially TableElement.as which assert that the given Element is compatible
 with a TableElement and automatically typecast it. Once I have a valid
 TableElement reference I can then get a reference to its rows by calling its
 getRows method - just remember to compensate for any table header rows you
 may have. Once you have a NodeListTableRowElement use its TableRowElements
 to obtain the cells by calling it getCells method. Once you have the cells
 you can then iterate over each one and do with them as you like.

 Jeff

 Jeff

-- 
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: TabPanel and Lazy load

2011-02-04 Thread Greg Dougherty
I just looked at it and it seems like it's all still valid (you might
want to see if you're willing to use TabLayoutPanels, rather than
TabPanels, since the later are deprecated).

What is it that you think doesn't work?

Greg

On Feb 4, 6:41 am, András Csányi sayusi.a...@gmail.com wrote:
 Hi All,

 I would like to build an application and there is and tabPanel which
 has 2 tabs. I know there is a good thing to use at different tabs. I
 search on it the internet and I found this 
 article:http://googlewebtoolkit.blogspot.com/2008/11/improving-performance-wi...

 Which is good just old a little bit. Is there a fresher article
 regarding lazy load and tabPanel with example? Basically I would like
 to see how can I place a clicklistener because I'm very new in GWT
 world.

 I'm using (Ok, I would like to use :) ) gwt-2.1.1 and gwtDesigner.

 Thanks is advance for any help!

 András

 --
 - -
 --  Csanyi Andras (Sayusi Ando)  
 --http://sayusi.hu--http://facebook.com/andras.csanyi
 --  Trust in God and keep your gunpowder dry! - Cromwell

-- 
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: Selecting and disabling elements in CellTable

2011-02-01 Thread Greg Dougherty
Jeff,

 Don't move the check boxes, just don't render them.

So, you're saying when the user selects a group they do not own, I
should make the checkboxes disappear, leaving me with an empty column
(that, somehow, I'm going to tell to take up EXACTLY as much space as
it would if it had checkboxes in it), and that having controls appear
and disappear in the middle of a table is a superior interface to
having the controls enable and disable?

Or am I just totally not understanding you?

Greg

On Jan 28, 3:53 pm, Jeff Schwartz jefftschwa...@gmail.com wrote:
 Don't move the check boxes, just don't render them. If all user interfaces
 we're as rigid as that we wouldn't need a dom api to manipulate and render
 html on the client. A ui principle you didn't mention is don't expose
 useless info/ui to users.

 Look, its your site so I'm just giving you something to think about.
 On Jan 28, 2011 3:19 PM, Greg Dougherty dougherty.greg...@mayo.edu
 wrote:

  Well, If they create a group, or select a group that they can modify,
  then they need the checkboxes. Having them disappear and reappear
  (rather than be disabled and enabled) violates the principles of UI
  design that I know and agree with. Starting with the belief that the
  UI should be stable and solid, and that controls should not move
  (muscle memory being key to accomplishing things quickly, a UI that
  moves targets around is a bad UI).

  Now, about your question
  which requires a question: Did you extend ColumnT,C to use check boxes
 in
  your cell table? If you did you can extend your implementation's api even
  further by providing it with methods to enable and disable the
 checkboxes.

  public class UserColumn extends ColumnString, Boolean implements
  FieldUpdaterString, Boolean

  My Cell is a CheckboxCell. I don't see any routines in either class
  for enabling or disabling the checkbox. So, what do I override /
  call?

  Thanks,

  Greg

  On Jan 28, 11:29 am, Jeff Schwartz jefftschwa...@gmail.com wrote:
  From a UI designer's perspective why display a column of check boxes if
 the
  user isn't allowed to click them? I wouldn't personally as a designer nor
  would I like that if I were a user.

  If the checkbox column is in a cell table that is being rendered in
 response
  to the user having selected something from somewhere else in the view
 then
  I'd first determine if the user can or cannot check the boxes and then I
  would render the table accordingly.

  But that is just me and the way I would do it. Now, about your question
  which requires a question: Did you extend ColumnT,C to use check boxes
 in
  your cell table? If you did you can extend your implementation's api even
  further by providing it with methods to enable and disable the
 checkboxes.

  Jeff

  On Fri, Jan 28, 2011 at 11:59 AM, Greg Dougherty 

 dougherty.greg...@mayo.edu



   wrote:
   Hi Jeff,

   Thank you.  I added a SingleSelectionModel to my CellTable, and now I
   can force selection of rows.

   Any idea how I tell a column of CheckBoxes that they can't accept any
   clicks?

   Greg

   On Jan 28, 10:11 am, Jeff Schwartz jefftschwa...@gmail.com wrote:
You can use one of the concrete implementations of

 AbstractSelectionModel  to
select rows and respond to row selection. CellTables and
AbstractSelectionModel instances work hand-in-hand.

You connect the selection model to the cell table by calling the
 table's
setSelectionModel method passing an instance of a selection model.

You select rows by calling the selection model's setSelected method
   passing
an instance of the data object being displayed by the table. The row
displaying that instance of the data object will then be selected

You respond to row selection by adding a

 SelectionChangeEvent.Handler()

   to
the selection model by calling the selection model's
addSelectionChangeHandler method. You can use this event, for
 instance,
   to
load a detailed view of the selected data object such as more
   information,
data from its children data objects, etc. etc.

Jeff

On Fri, Jan 28, 2011 at 10:49 AM, Greg Dougherty 
   dougherty.greg...@mayo.edu

 wrote:
 I am trying to use three CellTables to make a Users and Groups
 panel
 in my current application.  Its purpose is so users can give other
 users access to resources that they control (in this particular
 case,
 choosing which people can see the information you've uploaded to a
 database).

 The first table is the Groups table.  Groups can be added and
 selected.  If you are the owner of the current Group then you can
 modify its settings, if not, you can't.

 The second table is Users.  It has two columns, a text field with
 the
 name of the user, and a checkbox reporting whether or not the user
 is
 a member of the selected group.

 The third table is Resources.  It lists the information available
 to
 members of the current

Re: CellTable elements not updating correctly

2011-02-01 Thread Greg Dougherty
So, should I take it that this is a bug in GWT?

On Jan 28, 12:11 pm, Greg Dougherty dougherty.greg...@mayo.edu
wrote:
 // Making the cell I click on to change what Group i'm seeing:
         ClickableTextCell               groupCell = new ClickableTextCell ();
         FieldUpdaterGroupInfo, String   updater = new 
 FieldUpdaterGroupInfo,
 String () {
                 @Override
                 public void update (int index, GroupInfo theInfo, String 
 value)
                 {
                         boolean isOwner = (theInfo != null)  
 theInfo.getOwner
 ().equalsIgnoreCase (userName);

                         currentGroup = theInfo;
                         addUser.setEnabled (isOwner);

                         userProvider.refresh ();
                 }
         };

         GroupColumn     groupColumn = new GroupColumn (groupCell);
         groupColumn.setFieldUpdater (updater);

         theTable.addColumn (groupColumn, Name);

 public class UserColumn extends ColumnString, Boolean implements
 FieldUpdaterString, Boolean
 {
         private static GroupInfo        groupInfo = null;
         private static boolean          groupOwner = false;

         /* (non-Javadoc)
          * @see
 com.google.gwt.user.cellview.client.Column#getValue(java.lang.Object)
          */
         @Override
         public Boolean getValue (String user)
         {
                 if (groupInfo == null)
                         return false;

                 return groupInfo.hasUser (user);
         }

 }

 On Jan 28, 11:31 am, Jeff Schwartz jefftschwa...@gmail.com wrote:

  Code?

  On Fri, Jan 28, 2011 at 12:28 PM, Greg Dougherty dougherty.greg...@mayo.edu

   wrote:
   I have two CellTables that are logically connected together.  When I
   change the selection of the first one, I need to change the data
   representation in the second one.  When I first create the two tables,
   this works.  I call refresh on the DataProvider for the second table,
   it calls getValue for the column of check boxes, and the boxes are
   checked correctly.

   However, when I change the selection in the first table, and then call
   refresh on the DataProvider, the getValue calls are made, but their
   results are ignored.

   Is this a bug in GWT, or am I doing something wrong?

   TIA,

   Greg

   --
   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.comgoogle-web-toolkit%2bunsubscr...@googlegroups.com
   .
   For more options, visit this group at
  http://groups.google.com/group/google-web-toolkit?hl=en.

  --
  *Jeff Schwartz*

-- 
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: Sharing objects between several windows to enable interaction

2011-02-01 Thread Greg Dougherty
The first problem you face is that each browser window represents a
separate GWT application.  The second one you face is that, to the
best of my knowledge, there are only two ways those applications can
communicate with each other: via the server, and via cookies.  A third
problem you face is that you're going to run into a fair number of
users like me, who hate it when web sites try to take over their
machines and create new windows, and have their preferences set so
that you can't do that.

You can deal with the third problem by making sure that all your
window creation is done with actual HTTP links (so the user can right-
click on the link, and then tell it to open in a new window / tab).
This pretty much requires you to implement History (which is a good
thing in and of itself).

The only way I can see to deal with the first two problems is to have
a session cookie on the users machine that can be shared among
multiple running applications, and then have REALLY chatty apps that
are constantly sending updates to the server, and (by way of a Timer
task set to go off every second or so) constantly checking with the
server to see if anything has changed.

If you have few users and a server with a good network connection,
that might work.  But it's not a solution that will scale very well.

Greg

On Feb 1, 9:20 am, Terje Andre Johansen
terje.andre.johan...@gmail.com wrote:
 As far as I can see this would force me to re-render each view on
 change and also make it harder for a user to compare the different
 views. Further if the user has multiple screens, I think using several
 Windows is better than using only one. Your idea is good, however its
 not what I want to do if it is possible to do it the way I described.

 If am not mistaken, if the user is using Chrome I would actually be
 able to use several cores in the CPU for rendering if the application
 is split between different Windows? Correct me if I am mistaken.

 On 1 Feb, 15:17, Jeff Schwartz jefftschwa...@gmail.com wrote:

  Have you considered using GWT tabs or some other ui feature (roll your own
  if you have to) that would provide multiple views other than opening
  multiple browser windows or tabs? I really don't like it when applications
  open multiple browser windows or tabs and consider that a UI faux pas :).

  On Tue, Feb 1, 2011 at 8:44 AM, Terje Andre Johansen 

  terje.andre.johan...@gmail.com wrote:
   I am working on a project where I am using GWT to visualize biological
   data in several ways. This is done by searching for a gene by name,
   and what I want to happen is for each visualization to get its own
   window to display its data. The reason for this is that there is huge
   amounts of data, and trying to fit more than one visualization in one
   page is not a ideal way to do it.

   One of the goals for the project is to enable interaction between
   these visualization. In short this means that if a user clicks on a
   gene in one view, a similar event/method should be invoked in the
   other views as well. The newly opened windows will have the same
   parent and be in the same domain.

   I have looked at the GWT API, and so far only found the static void
   method Window.open(url, name, features). As far as I understand this
   means that I cannot get hold of the new window as an object to invoke
   methods on. Neither did I find the equivalent to the JS method
   window.opener() to get hold of the parent object in the newly opened
   window.

   I am wondering if anyone has worked with a similar problem and got
   some an idea of how to enable Window interaction using GWT.

   Help is appreciated.

   --
   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.comgoogle-web-toolkit%2Bunsubs­cr...@googlegroups.com
   .
   For more options, visit this group at
  http://groups.google.com/group/google-web-toolkit?hl=en.

  --
  *Jeff Schwartz*

-- 
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: Selecting and disabling elements in CellTable

2011-02-01 Thread Greg Dougherty
Ok, I've got two checkbox columns interspersed between other columns.
If I add and delete the checkbox columns based on the current user
selection in the first table, then other columns are going to be
jumping around.  No?

Which takes us back to controls moving around, destroying ability to
use muscle memory.  Which is I find that solution unacceptable.

So, is it possible for me to enable or disable controls in a column in
a CellTable?  Or does GWT lack that feature?

Greg

On Feb 1, 10:20 am, Jeff Schwartz jefftschwa...@gmail.com wrote:
 On Tue, Feb 1, 2011 at 11:06 AM, Greg Dougherty
 dougherty.greg...@mayo.eduwrote:

  Jeff,

   Don't move the check boxes, just don't render them.

  So, you're saying when the user selects a group they do not own, I
  should make the checkboxes disappear, leaving me with an empty column

 Hi Greg,

 We all have very strong beliefs when it comes to UI so I hope you understand
 that I am not trying to convert you over to my point of view. But to answer
 your question, no, I am not saying leave an empty column. I am saying don't
 display the column.

 Jeff

-- 
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: Selecting and disabling elements in CellTable

2011-02-01 Thread Greg Dougherty
Jeff:

Column 1 : Column 2 ; Column 3
Column 1 :Column 3
Column 1 : Column 2 ; Column 3

Column 3 has just jumped around.  It was at an X offset of 300, then
200, then 300

If I disable column 2, column 3 doesn't move.  If I hide column 2,
column 3 does move.  This makes hiding column 2 a BAD thing to do.

Column 2 is related to column 1.  It is NOT related to column 3.
Therefore, we cannot switch the order of columns 2 and 3 without
damaging the user's understanding of the data being presented by the
columns.

I do not, and will not, hard code the positions of user interface
elements.  I make a great deal of use of HorizontalPanel, and do not
use Standard doctype for anything (if / when GWT stops supporting
Quirks mode, I'll most likely stop upgrading GWT, because I can't
think of anything they might add that could be worth having to
explicitly tell everything where to go).

I've got three tables in an align left HorizontalPanel.  The center
table has one of the checkbox Column's that I'm concerned about.
Hiding / deleting / removing / not rendering that column causes the
table to its right to move.

All these things are the kind of reason why disabling controls was
invented way back in the early dawn of the GUI.  The question is does
GWT support that basic feature in CellTables?

Do you know the answer to that question?  If so, could you impart that
answer to the rest of us?

Greg


On Feb 1, 1:13 pm, Jeff Schwartz jefftschwa...@gmail.com wrote:
 On Tue, Feb 1, 2011 at 1:15 PM, Greg Dougherty
 dougherty.greg...@mayo.eduwrote:

  Ok, I've got two checkbox columns interspersed between other columns.
  If I add and delete the checkbox columns based on the current user
  selection in the first table, then other columns are going to be
  jumping around.  No?

 Greg,

 Use GWT's Ajax abilities to dynamically render the other cell tables with or
 without the columns in question or instead just hide and show the columns
 accordingly . It is quite simple and I don't understand what you mean by
 'then other columns are going to be jumping around. No? No, they wont.

 Good luck.

 Jeff

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



Selecting and disabling elements in CellTable

2011-01-28 Thread Greg Dougherty
I am trying to use three CellTables to make a Users and Groups panel
in my current application.  Its purpose is so users can give other
users access to resources that they control (in this particular case,
choosing which people can see the information you've uploaded to a
database).

The first table is the Groups table.  Groups can be added and
selected.  If you are the owner of the current Group then you can
modify its settings, if not, you can't.

The second table is Users.  It has two columns, a text field with the
name of the user, and a checkbox reporting whether or not the user is
a member of the selected group.

The third table is Resources.  It lists the information available to
members of the current group, and any information you control that is
not available to the current group (so you can give access to that
information to the members of the group).  It also has two fields, the
name of the resource, and a checkbox.

Issues I'm trying to solve:
1: How do I programmatically select a row in a table?  When a user
creates a new group, I wish to select it.  When the user first brings
up the panel, I'd like to select the first group (or, maybe, the first
group the person owns).

2: How do I disable a checkbox?  If the user doesn't own the group,
they shouldn't be able to change anything.

TIA,

Greg

-- 
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: Selecting and disabling elements in CellTable

2011-01-28 Thread Greg Dougherty
Hi Jeff,

Thank you.  I added a SingleSelectionModel to my CellTable, and now I
can force selection of rows.

Any idea how I tell a column of CheckBoxes that they can't accept any
clicks?

Greg

On Jan 28, 10:11 am, Jeff Schwartz jefftschwa...@gmail.com wrote:
 You can use one of the concrete implementations of AbstractSelectionModel to
 select rows and respond to row selection. CellTables and
 AbstractSelectionModel instances work hand-in-hand.

 You connect the selection model to the cell table by calling the table's
 setSelectionModel method passing an instance of a selection model.

 You select rows by calling the selection model's setSelected method passing
 an instance of the data object being displayed by the table. The row
 displaying that instance of the data object will then be selected

 You respond to row selection by adding a SelectionChangeEvent.Handler() to
 the selection model by calling the selection model's
 addSelectionChangeHandler method. You can use this event, for instance, to
 load a detailed view of the selected data object such as more information,
 data from its children data objects, etc. etc.

 Jeff

 On Fri, Jan 28, 2011 at 10:49 AM, Greg Dougherty dougherty.greg...@mayo.edu



  wrote:
  I am trying to use three CellTables to make a Users and Groups panel
  in my current application.  Its purpose is so users can give other
  users access to resources that they control (in this particular case,
  choosing which people can see the information you've uploaded to a
  database).

  The first table is the Groups table.  Groups can be added and
  selected.  If you are the owner of the current Group then you can
  modify its settings, if not, you can't.

  The second table is Users.  It has two columns, a text field with the
  name of the user, and a checkbox reporting whether or not the user is
  a member of the selected group.

  The third table is Resources.  It lists the information available to
  members of the current group, and any information you control that is
  not available to the current group (so you can give access to that
  information to the members of the group).  It also has two fields, the
  name of the resource, and a checkbox.

  Issues I'm trying to solve:
  1: How do I programmatically select a row in a table?  When a user
  creates a new group, I wish to select it.  When the user first brings
  up the panel, I'd like to select the first group (or, maybe, the first
  group the person owns).

  2: How do I disable a checkbox?  If the user doesn't own the group,
  they shouldn't be able to change anything.

  TIA,

  Greg

  --
  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.comgoogle-web-toolkit%2bunsubscr...@googlegroups.com
  .
  For more options, visit this group at
 http://groups.google.com/group/google-web-toolkit?hl=en.

 --
 *Jeff Schwartz*

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



CellTable elements not updating correctly

2011-01-28 Thread Greg Dougherty
I have two CellTables that are logically connected together.  When I
change the selection of the first one, I need to change the data
representation in the second one.  When I first create the two tables,
this works.  I call refresh on the DataProvider for the second table,
it calls getValue for the column of check boxes, and the boxes are
checked correctly.

However, when I change the selection in the first table, and then call
refresh on the DataProvider, the getValue calls are made, but their
results are ignored.

Is this a bug in GWT, or am I doing something wrong?

TIA,

Greg

-- 
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: CellTable elements not updating correctly

2011-01-28 Thread Greg Dougherty
// Making the cell I click on to change what Group i'm seeing:
ClickableTextCell   groupCell = new ClickableTextCell ();
FieldUpdaterGroupInfo, String updater = new FieldUpdaterGroupInfo,
String () {
@Override
public void update (int index, GroupInfo theInfo, String value)
{
boolean isOwner = (theInfo != null)  theInfo.getOwner
().equalsIgnoreCase (userName);

currentGroup = theInfo;
addUser.setEnabled (isOwner);

userProvider.refresh ();
}
};

GroupColumn groupColumn = new GroupColumn (groupCell);
groupColumn.setFieldUpdater (updater);

theTable.addColumn (groupColumn, Name);

public class UserColumn extends ColumnString, Boolean implements
FieldUpdaterString, Boolean
{
private static GroupInfogroupInfo = null;
private static boolean  groupOwner = false;

/* (non-Javadoc)
 * @see
com.google.gwt.user.cellview.client.Column#getValue(java.lang.Object)
 */
@Override
public Boolean getValue (String user)
{
if (groupInfo == null)
return false;

return groupInfo.hasUser (user);
}
}


On Jan 28, 11:31 am, Jeff Schwartz jefftschwa...@gmail.com wrote:
 Code?

 On Fri, Jan 28, 2011 at 12:28 PM, Greg Dougherty dougherty.greg...@mayo.edu



  wrote:
  I have two CellTables that are logically connected together.  When I
  change the selection of the first one, I need to change the data
  representation in the second one.  When I first create the two tables,
  this works.  I call refresh on the DataProvider for the second table,
  it calls getValue for the column of check boxes, and the boxes are
  checked correctly.

  However, when I change the selection in the first table, and then call
  refresh on the DataProvider, the getValue calls are made, but their
  results are ignored.

  Is this a bug in GWT, or am I doing something wrong?

  TIA,

  Greg

  --
  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.comgoogle-web-toolkit%2bunsubscr...@googlegroups.com
  .
  For more options, visit this group at
 http://groups.google.com/group/google-web-toolkit?hl=en.

 --
 *Jeff Schwartz*

-- 
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: Selecting and disabling elements in CellTable

2011-01-28 Thread Greg Dougherty
Well, If they create a group, or select a group that they can modify,
then they need the checkboxes.  Having them disappear and reappear
(rather than be disabled and enabled) violates the principles of UI
design that I know and agree with.  Starting with the belief that the
UI should be stable and solid, and that controls should not move
(muscle memory being key to accomplishing things quickly, a UI that
moves targets around is a bad UI).

 Now, about your question
 which requires a question: Did you extend ColumnT,C to use check boxes in
 your cell table? If you did you can extend your implementation's api even
 further by providing it with methods to enable and disable the checkboxes.

public class UserColumn extends ColumnString, Boolean implements
FieldUpdaterString, Boolean

My Cell is a CheckboxCell.  I don't see any routines in either class
for enabling or disabling the checkbox.  So, what do I override /
call?

Thanks,

Greg

On Jan 28, 11:29 am, Jeff Schwartz jefftschwa...@gmail.com wrote:
 From a UI designer's perspective why display a column of check boxes if the
 user isn't allowed to click them? I wouldn't personally as a designer nor
 would I like that if I were a user.

 If the checkbox column is in a cell table that is being rendered in response
 to the user having selected something from somewhere else in the view then
 I'd first determine if the user can or cannot check the boxes and then I
 would render the table accordingly.

 But that is just me and the way I would do it. Now, about your question
 which requires a question: Did you extend ColumnT,C to use check boxes in
 your cell table? If you did you can extend your implementation's api even
 further by providing it with methods to enable and disable the checkboxes.

 Jeff

 On Fri, Jan 28, 2011 at 11:59 AM, Greg Dougherty dougherty.greg...@mayo.edu



  wrote:
  Hi Jeff,

  Thank you.  I added a SingleSelectionModel to my CellTable, and now I
  can force selection of rows.

  Any idea how I tell a column of CheckBoxes that they can't accept any
  clicks?

  Greg

  On Jan 28, 10:11 am, Jeff Schwartz jefftschwa...@gmail.com wrote:
   You can use one of the concrete implementations of AbstractSelectionModel
  to
   select rows and respond to row selection. CellTables and
   AbstractSelectionModel instances work hand-in-hand.

   You connect the selection model to the cell table by calling the table's
   setSelectionModel method passing an instance of a selection model.

   You select rows by calling the selection model's setSelected method
  passing
   an instance of the data object being displayed by the table. The row
   displaying that instance of the data object will then be selected

   You respond to row selection by adding a SelectionChangeEvent.Handler()
  to
   the selection model by calling the selection model's
   addSelectionChangeHandler method. You can use this event, for instance,
  to
   load a detailed view of the selected data object such as more
  information,
   data from its children data objects, etc. etc.

   Jeff

   On Fri, Jan 28, 2011 at 10:49 AM, Greg Dougherty 
  dougherty.greg...@mayo.edu

wrote:
I am trying to use three CellTables to make a Users and Groups panel
in my current application.  Its purpose is so users can give other
users access to resources that they control (in this particular case,
choosing which people can see the information you've uploaded to a
database).

The first table is the Groups table.  Groups can be added and
selected.  If you are the owner of the current Group then you can
modify its settings, if not, you can't.

The second table is Users.  It has two columns, a text field with the
name of the user, and a checkbox reporting whether or not the user is
a member of the selected group.

The third table is Resources.  It lists the information available to
members of the current group, and any information you control that is
not available to the current group (so you can give access to that
information to the members of the group).  It also has two fields, the
name of the resource, and a checkbox.

Issues I'm trying to solve:
1: How do I programmatically select a row in a table?  When a user
creates a new group, I wish to select it.  When the user first brings
up the panel, I'd like to select the first group (or, maybe, the first
group the person owns).

2: How do I disable a checkbox?  If the user doesn't own the group,
they shouldn't be able to change anything.

TIA,

Greg

--
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.comgoogle-web-toolkit%2bunsubscr...@googlegroups.com
  google-web-toolkit%2bunsubscr...@googlegroups.comgoogle-web

Re: is calling RequestFactory a blocking call ? when to update the View upon return of RequestFactory?

2011-01-18 Thread Greg Dougherty
You REALLY need to read up on GWT RPC.

 requestFactory
   .employeeRequest()
   .findAllEmployees()
   .fire(new ReceiverListEmployeeProxy() {
 @Override
 public void onSuccess(ListEmployeeProxy response) {

 # A  when to update the View ?
 panel.setWidget(view.asHasData().setRowData(0, response);
}
 });

This creates an object, which is passed to the RPC handling code.
OnSuccess is called On Success, i.e. when the RPC call has
successfully finished and returned the data.

Greg

On Jan 17, 7:00 pm, zixzigma zixzi...@gmail.com wrote:


 public class EmployeeListActivity extends AbstractActivity {

 EmployeeListView view;
 ListEmployeeProxy tempResultHolder = new ArrayListEmployeeProxy();
 .

 public void start(AcceptsOneWidget panel, EventBus eventBus)

 requestFactory
                   .employeeRequest()
                   .findAllEmployees()
                   .fire(new ReceiverListEmployeeProxy() {
                     @Override
                     public void onSuccess(ListEmployeeProxy
 response) {

                     # A  when to update the View ?
                     panel.setWidget(view.asHasData().setRowData(0,
 response);
                 or

                 ##B1 tempResultHolder.addAll(response);

                    }
                 });

  does it block here ? --- do we get past this line only after
 RF returns ?
             when do we get here ?
                      # B2 
                     panelSetWidget(view.asHasData().setRowData(0,
 tempResultHolder);

 }//Activity start method end

-- 
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: Displaying one-line summary when dealing with list of long paragraphs. What would YOU do ?

2011-01-18 Thread Greg Dougherty
How big are your paragraphs?  Are we talking 10K here, total?  1K?
100K?

How long does it take to send 10K over your network?  How many people
are going to be requesting data simultaneously?

The first rule of optimization is you find out where things are
actually bogging down.  Unless your users are on really slow dialup,
AND you're sending more than 10K data per request (under version 1),
or # simultaneous requests * data size  1 MB / second, I think you're
going to find your bottlenecks elsewhere.

Greg

On Jan 18, 12:31 am, zixzigma zixzi...@gmail.com wrote:
 Take GMail for example.
 in the Inbox, you have a list of received emails,

 in addition to the mail Subject, there is a sentence from the opening
 of the email.
 in other words we have Subject + MAIL_BODY.substring(0, LENGTH)

 what is the best way to implement this feature ?

 if we were dealing with non-String objects, it made sense to just
 fetch the fields that are necessary,
 like a summary view, and provide detail as user required. making it two
 + step process.

 but in this particular case, we have a list of paragraphs, and want to
 provide a one line summary of each.
 to prepare this one-line summary, we need to retrieve the entire text,
 and then call substring, to get the one line summary.

 I have 3 solutions, but appreciate if you weigh in on how you would
 implement this particular usecase.

 Solution #1

 1- get the text from the DB
 2- extract the first X characters (one-line summary) [do this on the
 server]
 3- send this one-line summary to the client
 4-when client decides to see full text, sends a request
 5-this time send the full text

 Pros: - less data over the wire (instead of pargraphs after
 paragraphs, only one line is sent)
 Cons: - subsequent client requests would result in additional network
 roundtrip
           - string manipulation/extraction to produce the one line
 summary results in delay

 Solution #2

 1-get the text from DB
 2-send the entire text to the client
 3-when displaying, show only the first sentence,
 do this by extracting first X characters, doing this on the client

 Cons: transfering so much data can cause delay
 Pros: - after initial load, fewer network roundtrip to fetch more data
          - text manipulation on the client,
          means no delay as a result of waiting for the server to do
 the manipulation

 Solution #3

 having a bit of redundancy,
 add an additional field/column to hold the one-line summary.
 in other words instead of making one-line summary derivative attribute
 (which can be extracted by processing the entire text), we do it once
 and store it in the Datastore.
 upon user request, we grab this one-line summary column/field.
 if user required complete paragraph, we get the column/field
 containing the full text.

 Cons: redundancy might result in inconsistency, additional work to
 keep data consistent
           - when user requests for full paragraph, this results in a
 server call, which
            is not going to happen with Solution #2
 Pros: - no repeated processing overhead (text extraction/manipulation)
          - best use of bandwith, never sending anything thats going to
 waste.

 I am thinking of chosing Solution#3,
 based on an advice by Google,
 that basically stated Storage is cheap, but Bandwith is not,
  and user attention span is short therefore no delay ! : )

 have you implemented this functionality ?
 whats your thought on this,
 what would you do ?

-- 
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: FormPanel.SubmitEvent cancel not working

2011-01-07 Thread Greg Dougherty
Ah, because under 2.0 it worked for me, too.

On Jan 5, 4:09 pm, Jim Douglas jdou...@basis.com wrote:
 Hmm, I would hope it wouldn't matter, but 2.0.3; we need to coordinate
 several developers and build systems to move to 2.1.1, and everyone's
 been away for Christmas  New Years.

 On Jan 5, 1:15 pm, Greg Dougherty dougherty.greg...@mayo.edu wrote:

  GWT 2.0 or 2.1?

  On Jan 5, 2:41 pm, Jim Douglas jdou...@basis.com wrote:

   I'm doing pretty much exactly that with my FileUpload widget, and it
   works ok here:

       /*
        * User clicked the Chooser OK button.
        */
       public void onSubmit(SubmitEvent p_event)
       {
           if (m_progressUpdateTimer != null)
           {
               // Upload is already in progress
               p_event.cancel();
               return;
           }
            several more validation checks 
       }

   On Jan 5, 12:27 pm, Greg Dougherty dougherty.greg...@mayo.edu wrote:

I have the following code in a GWT 2.1.0 project:

public void onSubmit (FormPanel.SubmitEvent event)
{
        // This event is fired just before the form is submitted. We 
can take
        // this opportunity to perform validation.
        String filename = gDataFileUploader.getFilename ();
        if (filename.length () == 0)
        {
                showAlert (Need a valid File Name in before we can 
upload a
file!);
                event.cancel ();
        }

}

Unfortunately, although it is called, the cancel () call doesn't stop
the submit from happening, and doesn't stop onSubmitComplete from
being called.  Is this a GWT bug or a browser bug?  (FireFox 3.6)

TIA,

Greg

-- 
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: Where do KeyPress Events go?

2011-01-05 Thread Greg Dougherty
Currently, I'm using a SubmitButton, and forcing the user to click on
the button to have anything happen.

I'd like for the user to be able to hit Enter, and have the button
fire (IOW, I want it to behave like a real application, rather than
like a web application).  Unfortunately, I can't find any way to catch
key events in that form.

I'm using Apache FileUpload, which essentially requires me to have the
file as the last item in the form (file size is in the hundreds of MB,
so I read it a line at a time and toss the line when I'm done with
it.  FileUpload only lets you keep a reader for one form element at a
time, so I can't get data for anything after the file).  This means
the average user is going to fill in that field last.  Which means
that if I want to support the Enter key, I need to be able to do it
after the user has selected a file using the FileUpload.  But
FileUpload doesn't generate Key events.

So, WHO gets those KeyPress Events?

Greg

On Jan 5, 8:08 am, jaybose onyeje.b...@gmail.com wrote:
 OK, what does the button do, at the moment?

 Do you have your EnterButton's handler call submit() on the form?
 If so, are you seeing any errors?

 On Jan 4, 8:53 am, Greg Dougherty dougherty.greg...@mayo.edu wrote:

  Yes, but it doesn't do the upload when I hit Enter.  Which is what I'm
  trying to figure out how to get it to do.

  Greg

  On Jan 4, 8:20 am, jaybose onyeje.b...@gmail.com wrote:

  http://gwt.google.com/samples/Showcase/Showcase.html#!CwFileUpload

   Look at the source of the ShowCase example above.
   The uploadButton it uses is not a SubmitButton either.

   Just make sure the handler of your EnterButton submits the form.

   On Jan 3, 8:57 am, Greg Dougherty dougherty.greg...@mayo.edu wrote:

So, now that I have an EnterButton class, I'd like to use it. :-)  I
have a form panel with a FileUpload.  I'd like to let the user select
a file, then hit enter to fire the form submit button (which is an
EnterButton, not a SubmitButton).

Unfortunately, FileUpload does not have an addKeyPressHandler
routine.  So, who gets any key events I generate while in the text
field part of a FileUpload?  What is the call chain for events that
aren't captured by the Widget where the event happens?

Sorry if this is an FAQ, and in the docs.  I took a (quick) look, and
couldn't find anything.  Please point me to the correct docs if it is
in there.

Thanks!

Greg

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

2011-01-05 Thread Greg Dougherty
Hi Jeff,

You've got things backwards for my concerns.  I want to fire off a
Submit event when the user hits Enter, I don't want to do something
special once the user has clicked on the button.

To do that, I need to figure out how to catch a KeyPress Event when
the last thing selected was a FileUpload (which doesn't have a
KeyPress Event Handler).  Any ideas?

As for using UIBinder:
1: I'm building the UI, and I'm a programmer. I LIKE building the UI
programmatically.
2: When I looked at it (July - August 2010), the documentation was
opaque, and singularly lacking in useful examples.  So avoiding
UIBuilder is faster than using it.
3: I build WebApps where the height and width of the UI is dependent
upon the data returned in response to user actions.  Which means that
the *LayoutPanels are a HUGE step backward in functionality for me.
To the extent that when I have to choose between upgrading GWT, and
losing the non-Layout Panels, I'll probably stop upgrading GWT.  (Yes,
I know that the change was a deliberate choice.  I just think it was a
horrible mistake.)

Greg

On Jan 4, 10:49 am, Jeff Schwartz jefftschwa...@gmail.com wrote:
 Using UiBinder declare a SubmitButton 
 (http://google-web-toolkit.googlecode.com/svn/javadoc/2.0/com/google/g...)
 within a qwt FormPannel. If you want to react to the user submitting the
 form then assign a field name to the submit button and attach an event
 handler to the submit button. The following is an example of how to setup
 the event handler code when using UiBinder:

 @UiHandler(yourButtonFieldName)
 void onSubmitBtnClicked(ClickEvent e) {
     doSomething();

 }

 On Tue, Jan 4, 2011 at 10:36 AM, Greg Dougherty
 dougherty.greg...@mayo.eduwrote:



  Hi Jeff,

  I don't see any place to attach a KeyPressHandler to a FormPanel.
  Were you thinking of something else?

  Greg

  On Jan 3, 6:27 pm, Jeff Schwartz jefftschwa...@gmail.com wrote:
   I haven't tried it but I think if you wrap your input widgets in a gwt
  form
   widget your button would respond appropriately.

   On Mon, Jan 3, 2011 at 9:57 AM, Greg Dougherty
   dougherty.greg...@mayo.eduwrote:

I have a couple of places where I want the user to be able to hit
enter, and have a button clicked.  So I created the class EnterButton,
which has all the default constructors, and the following bit of code:

       public void onKeyPress (KeyPressEvent event)
       {
               int     keyCode = event.getNativeEvent ().getKeyCode
();

               if (keyCode == KeyCodes.KEY_ENTER)
                       click ();
       }

Is there a reason why some such class isn't part of GWT already?  Is
there something in this code that will turn around and bite me in the
tush?

--
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%2bunsubscr...@googlegroups.com
  google-web-toolkit%2bunsubscr...@googlegroups.comgoogle-web-toolkit%252bunsubscr...@googlegroups.com

.
For more options, visit this group at
   http://groups.google.com/group/google-web-toolkit?hl=en.

   --
   *Jeff Schwartz*

  --
  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%2bunsubscr...@googlegroups.com
  .
  For more options, visit this group at
 http://groups.google.com/group/google-web-toolkit?hl=en.

 --
 *Jeff Schwartz*

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



FormPanel.SubmitEvent cancel not working

2011-01-05 Thread Greg Dougherty
I have the following code in a GWT 2.1.0 project:

public void onSubmit (FormPanel.SubmitEvent event)
{
// This event is fired just before the form is submitted. We can take
// this opportunity to perform validation.
String filename = gDataFileUploader.getFilename ();
if (filename.length () == 0)
{
showAlert (Need a valid File Name in before we can upload a
file!);
event.cancel ();
}
}

Unfortunately, although it is called, the cancel () call doesn't stop
the submit from happening, and doesn't stop onSubmitComplete from
being called.  Is this a GWT bug or a browser bug?  (FireFox 3.6)

TIA,

Greg

-- 
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: Where do KeyPress Events go?

2011-01-05 Thread Greg Dougherty
Thanks Ian!

Both solutions work, but I prefer the sinkEvents one, since it seems
more broadly applicable.

Thank you,

Greg

On Jan 5, 9:28 am, Ian Bambury ianbamb...@gmail.com wrote:
 Or, if you want to be fed keyup events when the FU has focus (or anyt other
 event you choose)

         fu.sinkEvents(Event.ONKEYUP);
         fu.addHandler(new KeyUpHandler()
         {

             @Override
             public void onKeyUp(KeyUpEvent event)
             {
                 Window.alert(Hi!);
             }
         }, KeyUpEvent.getType());

 On 5 January 2011 15:20, Ian Bambury ianbamb...@gmail.com wrote:



          fu.addChangeHandler(new ChangeHandler()
          {

              @Override
              public void onChange(ChangeEvent event)
              {
                  button.setFocus(true);
              }
          });

  would put the focus on the button - any good?

  or there's always 'DOM.addEventPreview' - problem is, you probably want
  enter to move your user from input area to input area.
  firstname-lastname-fileuploadCV or something, rather than submit every time
  the user presses enter.

  Ian

  On 5 January 2011 14:50, Greg Dougherty dougherty.greg...@mayo.eduwrote:

  Currently, I'm using a SubmitButton, and forcing the user to click on
  the button to have anything happen.

  I'd like for the user to be able to hit Enter, and have the button
  fire (IOW, I want it to behave like a real application, rather than
  like a web application).  Unfortunately, I can't find any way to catch
  key events in that form.

  I'm using Apache FileUpload, which essentially requires me to have the
  file as the last item in the form (file size is in the hundreds of MB,
  so I read it a line at a time and toss the line when I'm done with
  it.  FileUpload only lets you keep a reader for one form element at a
  time, so I can't get data for anything after the file).  This means
  the average user is going to fill in that field last.  Which means
  that if I want to support the Enter key, I need to be able to do it
  after the user has selected a file using the FileUpload.  But
  FileUpload doesn't generate Key events.

  So, WHO gets those KeyPress Events?

  Greg

  On Jan 5, 8:08 am, jaybose onyeje.b...@gmail.com wrote:
   OK, what does the button do, at the moment?

   Do you have your EnterButton's handler call submit() on the form?
   If so, are you seeing any errors?

   On Jan 4, 8:53 am, Greg Dougherty dougherty.greg...@mayo.edu wrote:

Yes, but it doesn't do the upload when I hit Enter.  Which is what I'm
trying to figure out how to get it to do.

Greg

On Jan 4, 8:20 am, jaybose onyeje.b...@gmail.com wrote:

http://gwt.google.com/samples/Showcase/Showcase.html#!CwFileUpload

 Look at the source of the ShowCase example above.
 The uploadButton it uses is not a SubmitButton either.

 Just make sure the handler of your EnterButton submits the form.

 On Jan 3, 8:57 am, Greg Dougherty dougherty.greg...@mayo.edu
  wrote:

  So, now that I have an EnterButton class, I'd like to use it. :-)
   I
  have a form panel with a FileUpload.  I'd like to let the user
  select
  a file, then hit enter to fire the form submit button (which is an
  EnterButton, not a SubmitButton).

  Unfortunately, FileUpload does not have an addKeyPressHandler
  routine.  So, who gets any key events I generate while in the text
  field part of a FileUpload?  What is the call chain for events
  that
  aren't captured by the Widget where the event happens?

  Sorry if this is an FAQ, and in the docs.  I took a (quick) look,
  and
  couldn't find anything.  Please point me to the correct docs if it
  is
  in there.

  Thanks!

  Greg

  --
  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%2bunsubscr...@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.



Re: EnterButton

2011-01-05 Thread Greg Dougherty
Hi Jeff,

My fields ARE wrapped in a FormPanel (which I assume is what you mean
by a form.  If not, please enlighten me), and hitting Enter after
selecting a file most certainly did NOT cause the Form to submit,
because if it did, I wouldn't need to spend time making a button to
accomplish that behavior.

Happily, Ian Bambury pointed me to sinkEvents and addHandler, which
let me do what I want to do.

As for the off topic:
1: I don't think I've EVER used HTMLPanel.  If my UI gets bogged down,
I'll keep it in mind, but my performance issues generally involve
waiting for the server to finish queries.  How many items do you need
on screen to get client performance to bog down?
2: I spent (wasted?) several hours (probably over a day, spread out
over a week) trying to make sense of UIBuilder.  The documentation
made no sense to me, and was totally lacking in worthwhile examples
that I could play with to try to figure things out.  (No, go look at
the rewritten Mail Application doesn't qualify as a worthwhile
example.  A small working application that I can fiddle with, modify,
and see what the changes do is what you need for a worthwhile
example.)
3: Much more readable to whom?  A UI Designer who doesn't read
code?  Great.  But I'm not one of those, and I'm not working with one
of those.  For me, I go to the method that creates the Panel, and can
quickly see what is where, and with who.  Since my Widgets tend to
have names like dataFileUploaderForm, I generally know what's in
them w/o having to look farther than the name, but if I do, a quick
search on the name of any widget in the panel takes me to the method
where it's put together.  What does UIBuilder offer that's better than
that?  (Serious question.  I'm a big fan of visual UI builders, but
I've never understood the benefits of a textual one.)

4: My (half-remembered) impression of UIBuilder was that it was
supposed to encourage you to move to the 2.0 LayoutPanels, rather
than the 1.x Panels.  No?

Greg

On Jan 5, 11:36 am, Thomas Broyer t.bro...@gmail.com wrote:
 On Wednesday, January 5, 2011 4:14:47 PM UTC+1, Greg Dougherty wrote:

  Hi Jeff,

  You've got things backwards for my concerns.  I want to fire off a
  Submit event when the user hits Enter, I don't want to do something
  special once the user has clicked on the button.

 I think Jeff got it right, but explained it badly: if you wrap you fields
 inside a form, then when hitting Enter, the *browser* will submit the form.
 So all you have to do is to listen to the SubmitEvent on the FormPanel (and
 not the ClickEvent on the SubmitButton, which I believe not all browsers do
 dispatch in this case).

 To do that, I need to figure out how to catch a KeyPress Event when

  the last thing selected was a FileUpload (which doesn't have a
  KeyPress Event Handler).  Any ideas?

 I just saw that Widget#addDomHandler is public, so this should work (for any
 widget provided the browser actually dispatches the event):
    fileUpload.addDomHandler(enterbutton, KeyPressevent.getType());

 Now, let's go off topic:

 As for using UIBinder:

  1: I'm building the UI, and I'm a programmer. I LIKE building the UI
  programmatically.
  2: When I looked at it (July - August 2010), the documentation was
  opaque, and singularly lacking in useful examples.  So avoiding
  UIBuilder is faster than using it.

 Probably because you:
  - don't use HTMLPanel enough (reminder: it helps for performance)
  - and haven't spent the necessary hour (half-hour?) to learn how to use it
 and understand how much time it can actually save you (mainly by making your
 UI code much more readable as to which widget contains what).

  3: I build WebApps where the height and width of the UI is dependent
  upon the data returned in response to user actions.  Which means that
  the *LayoutPanels are a HUGE step backward in functionality for me.
  To the extent that when I have to choose between upgrading GWT, and
  losing the non-Layout Panels, I'll probably stop upgrading GWT.  (Yes,
  I know that the change was a deliberate choice.  I just think it was a
  horrible mistake.)

 I don't see the relationship between layout panels and UiBinder.

-- 
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: FormPanel.SubmitEvent cancel not working

2011-01-05 Thread Greg Dougherty
GWT 2.0 or 2.1?

On Jan 5, 2:41 pm, Jim Douglas jdou...@basis.com wrote:
 I'm doing pretty much exactly that with my FileUpload widget, and it
 works ok here:

     /*
      * User clicked the Chooser OK button.
      */
     public void onSubmit(SubmitEvent p_event)
     {
         if (m_progressUpdateTimer != null)
         {
             // Upload is already in progress
             p_event.cancel();
             return;
         }
          several more validation checks 
     }

 On Jan 5, 12:27 pm, Greg Dougherty dougherty.greg...@mayo.edu wrote:

  I have the following code in a GWT 2.1.0 project:

  public void onSubmit (FormPanel.SubmitEvent event)
  {
          // This event is fired just before the form is submitted. We can 
  take
          // this opportunity to perform validation.
          String filename = gDataFileUploader.getFilename ();
          if (filename.length () == 0)
          {
                  showAlert (Need a valid File Name in before we can upload a
  file!);
                  event.cancel ();
          }

  }

  Unfortunately, although it is called, the cancel () call doesn't stop
  the submit from happening, and doesn't stop onSubmitComplete from
  being called.  Is this a GWT bug or a browser bug?  (FireFox 3.6)

  TIA,

  Greg

-- 
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: Where do KeyPress Events go?

2011-01-04 Thread Greg Dougherty
Yes, but it doesn't do the upload when I hit Enter.  Which is what I'm
trying to figure out how to get it to do.

Greg

On Jan 4, 8:20 am, jaybose onyeje.b...@gmail.com wrote:
 http://gwt.google.com/samples/Showcase/Showcase.html#!CwFileUpload

 Look at the source of the ShowCase example above.
 The uploadButton it uses is not a SubmitButton either.

 Just make sure the handler of your EnterButton submits the form.

 On Jan 3, 8:57 am, Greg Dougherty dougherty.greg...@mayo.edu wrote:

  So, now that I have an EnterButton class, I'd like to use it. :-)  I
  have a form panel with a FileUpload.  I'd like to let the user select
  a file, then hit enter to fire the form submit button (which is an
  EnterButton, not a SubmitButton).

  Unfortunately, FileUpload does not have an addKeyPressHandler
  routine.  So, who gets any key events I generate while in the text
  field part of a FileUpload?  What is the call chain for events that
  aren't captured by the Widget where the event happens?

  Sorry if this is an FAQ, and in the docs.  I took a (quick) look, and
  couldn't find anything.  Please point me to the correct docs if it is
  in there.

  Thanks!

  Greg

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

2011-01-04 Thread Greg Dougherty
So why hasn't this kind of Widget made it into the GWT code base?

Greg

On Jan 3, 5:53 pm, A. Stevko andy.ste...@gmail.com wrote:
 I've used this pattern throughout my code base with no problem.

 On Mon, Jan 3, 2011 at 6:57 AM, Greg Dougherty
 dougherty.greg...@mayo.eduwrote:



  I have a couple of places where I want the user to be able to hit
  enter, and have a button clicked.  So I created the class EnterButton,
  which has all the default constructors, and the following bit of code:

         public void onKeyPress (KeyPressEvent event)
         {
                 int     keyCode = event.getNativeEvent ().getKeyCode
  ();

                 if (keyCode == KeyCodes.KEY_ENTER)
                         click ();
         }

  Is there a reason why some such class isn't part of GWT already?  Is
  there something in this code that will turn around and bite me in the
  tush?

  --
  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%2bunsubscr...@googlegroups.com
  .
  For more options, visit this group at
 http://groups.google.com/group/google-web-toolkit?hl=en.

 --
 -- A. Stevko
 ===
 If everything seems under control, you're just not going fast enough. M.
 Andretti

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

2011-01-04 Thread Greg Dougherty
Hi Jeff,

I don't see any place to attach a KeyPressHandler to a FormPanel.
Were you thinking of something else?

Greg

On Jan 3, 6:27 pm, Jeff Schwartz jefftschwa...@gmail.com wrote:
 I haven't tried it but I think if you wrap your input widgets in a gwt form
 widget your button would respond appropriately.

 On Mon, Jan 3, 2011 at 9:57 AM, Greg Dougherty
 dougherty.greg...@mayo.eduwrote:



  I have a couple of places where I want the user to be able to hit
  enter, and have a button clicked.  So I created the class EnterButton,
  which has all the default constructors, and the following bit of code:

         public void onKeyPress (KeyPressEvent event)
         {
                 int     keyCode = event.getNativeEvent ().getKeyCode
  ();

                 if (keyCode == KeyCodes.KEY_ENTER)
                         click ();
         }

  Is there a reason why some such class isn't part of GWT already?  Is
  there something in this code that will turn around and bite me in the
  tush?

  --
  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%2bunsubscr...@googlegroups.com
  .
  For more options, visit this group at
 http://groups.google.com/group/google-web-toolkit?hl=en.

 --
 *Jeff Schwartz*

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



EnterButton

2011-01-03 Thread Greg Dougherty
I have a couple of places where I want the user to be able to hit
enter, and have a button clicked.  So I created the class EnterButton,
which has all the default constructors, and the following bit of code:

public void onKeyPress (KeyPressEvent event)
{
int keyCode = event.getNativeEvent ().getKeyCode
();

if (keyCode == KeyCodes.KEY_ENTER)
click ();
}

Is there a reason why some such class isn't part of GWT already?  Is
there something in this code that will turn around and bite me in the
tush?

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



Where do KeyPress Events go?

2011-01-03 Thread Greg Dougherty
So, now that I have an EnterButton class, I'd like to use it. :-)  I
have a form panel with a FileUpload.  I'd like to let the user select
a file, then hit enter to fire the form submit button (which is an
EnterButton, not a SubmitButton).

Unfortunately, FileUpload does not have an addKeyPressHandler
routine.  So, who gets any key events I generate while in the text
field part of a FileUpload?  What is the call chain for events that
aren't captured by the Widget where the event happens?

Sorry if this is an FAQ, and in the docs.  I took a (quick) look, and
couldn't find anything.  Please point me to the correct docs if it is
in there.

Thanks!

Greg

-- 
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: How to get a widget from another panel

2011-01-03 Thread Greg Dougherty
Well, assuming both panels are in the same web application, save the
widget in a global variable, and access that when you want
information.

Greg

On Jan 3, 8:49 am, Néstor Boscán nesto...@gmail.com wrote:
 Hi

 Thanks for the quick reply.

 I don't want to add the widget I want to get the value of a widget
 that is in another panel

 On 1/3/11, nacho vela.igna...@gmail.com wrote:

  Just add the widget to the panel that you want.

  panel.add(widget);

  On 3 ene, 00:29, Néstor Boscán nesto...@gmail.com wrote:
  Hi

  I have a GWT application with two panels. How to I get a Widget from one
  panel from the other panel?.

  Regards,

  Néstor Boscán

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

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



EnterButton

2010-12-23 Thread Greg Dougherty
I have a couple of places where I want the user to be able to hit
enter, and have a button clicked.  So I created the class EnterButton,
which has all the default constructors, and the following bit of code:

public void onKeyPress (KeyPressEvent event)
{
int keyCode = event.getNativeEvent ().getKeyCode ();

if (keyCode == KeyCodes.KEY_ENTER)
click ();
}


Is there a reason why some such class isn't part of GWT already?  Is
there something in this code that will turn around and bite me in the
tush?

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



  1   2   3   >