about iframe

2009-08-10 Thread Saeed Zarinfam

Hi
A friend suggest me use Frame widget for loading a GWT module in
another GWT module. I want to know is this a best solution for me. I
want to build an application that load GWT modules and manage in (like
a gadget container).

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

2009-08-10 Thread tolga ozdemir

Thanks bruno 4 the link. It's great really...

Where can we find more samples about Gliead  GWT entegration?

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



Does anyone has a nice written class for bypassing SOP restrinctions

2009-08-10 Thread Arnaud


Hi,

I'm bumping, as many developers I guess, into SOP restrinctions. My
www.mydomain.com need to do json http requests onto other machines
inside my own domain (www.mydomain.com requests json from
data.mydomain.com for example), and even inside the same domain it
seems the SOP policy prevent me from doing so.

I've a few docs explaining how to do a json request using a dynamicly
created script. Sounds great but I can't find a clean and
complete .java file or set of java files with the source ready to be
used. Does anyone has or know of a nice class ready to be used, that
has a similar API than the RequestCallback/Request interface we
commonly use, that would handle simultaneous query, and most important
that allow both POST and GET requests.

Thanks

Arnaud

--~--~-~--~~~---~--~~
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 to split a large application?

2009-08-10 Thread Stefan

Hi all,

I am to develop a GWT application that shall consist of a main
application that is used to start and control the execution of sub
applications. The sub applications are not now at compile time of
the main application. They are identified by IDs and should be
startable by these IDs.

In Java I could use reflection to instantiate the sub applications and
use interfaces that must be implemented by sub applications in order
to control them.

Is it possible to achieve something similar with GWT? The sub
applications should be compilable into JavaScript independently of
the main application and must be dynamically loadable by the main
application.

Thanks for your attention,

--Stefan

--~--~-~--~~~---~--~~
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: Display image stored in database

2009-08-10 Thread mars1412

your servlet code looks quite similar to mine - the only differences I
can se:
 * I explicitly set the response code: response.setStatus
(HttpServletResponse.SC_OK);
 * I explicitly flush the stream after writing the data:
response.getOutputStream().flush()

If this does not help, I recommend:
 * user firebug and check the http-response
 * when you download the file: do a binary compare with the original
file and see if it's the same

On Aug 8, 5:11 pm, kike kikegong...@gmail.com wrote:
 Hi,

 I'm trying to display images stored as blobs (no problem at
 uploading).

 my client side code:
 ***
 Image photo = new Image();
 photo.setUrl(app/servlet?photoId=12345.jpeg);

 my servlet's:
 ***
 resp.setContentType(image/jpeg);
 // ... get blobData from database ...
 resp.getOutputStream().write(blobData.getBytes());
 resp.setContentLength(blobData.getBytes().length);

 the result:
 ... a big [?]

 If i inspect the element i get:

 http://localhost:8080/kiblog/displayImage?photoId=1249737316478.jpeg
 Request Headers
 Referer:http://localhost:8080/Kiblog.html
 Response Headers
 Content-Type:image/jpeg
 Server:Jetty(6.1.x)
 Transfer-Encoding:Identity
 Resource interpreted as document but transferred with MIME type image/
 jpeg.

 My environment:
  gwt 1.7
 safari 4.0.2  or ie 6

 More over when I try to download the file it get in to my files with
 the same length as the original, with binary data in it but the system
 does not recognize it, here's the message: Couldn't open the file it
 may be corrupt...

 Cheers,
--~--~-~--~~~---~--~~
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 split a large application?

2009-08-10 Thread David

Stefan,

It's a bit against the idea of GWT. GWT forces all code to be in one
compilation.

But I understand the requirement (I have exactly the same requirement).

What I currently do is load the GWT subapplications in an IFrame and I
communicate between the IFrame and main application through JSNI code.
It's not nice but it works.

Since 1.5 it should be possible to skip the IFrame part but then you
root application should instrument the sub applications where they are
allowed to render themselfs. The communication between the
applications still needs a roundtrip through JSNI. GWT obfuscates and
compresses the method names so you need to publish the API that you
want to use between them using JSNI.

You have to think about things like timing. These apps will launch
asynchronously so you can not just blindly start calling them.

On Mon, Aug 10, 2009 at 9:44 AM, Stefanstefan.wach...@gmx.de wrote:

 Hi all,

 I am to develop a GWT application that shall consist of a main
 application that is used to start and control the execution of sub
 applications. The sub applications are not now at compile time of
 the main application. They are identified by IDs and should be
 startable by these IDs.

 In Java I could use reflection to instantiate the sub applications and
 use interfaces that must be implemented by sub applications in order
 to control them.

 Is it possible to achieve something similar with GWT? The sub
 applications should be compilable into JavaScript independently of
 the main application and must be dynamically loadable by the main
 application.

 Thanks for your attention,

 --Stefan

 


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



Infinite call of onSuccess

2009-08-10 Thread jlc488

private void updateTable(ListS3ViewerEntity result ){
for( S3ViewerEntity ent : result){//for-1
ListString[] tmpArr = ent.getValue();
int len = tmpArr.size();
for(int i = 0, j = 1; i len; i++, j++){//for-2
Button btnDel   = new 
Button(Delete);
Button btnResultView= new Button(View 
Result);
String[] colArr = tmpArr.get(i);
flexTable.setText(j, 0, colArr[0]);
flexTable.setText(j, 1, colArr[1]);
flexTable.setText(j, 2, processed);

flexTable.setWidget(j, 3, btnDel);

flexTable.setWidget(j, 4, btnResultView);

flexTable.addClickHandler(new ClickHandler(){
@Override
public void onClick(ClickEvent event) {
final HTMLTable htmlTable = 
(HTMLTable)event.getSource();
final Cell cell = 
htmlTable.getCellForEvent(event);
final String fileName = 
htmlTable.getHTML(cell.getRowIndex(),
1);
oneFileName = fileName;
if( cell.getCellIndex() == 3 
){//if else if-1

setMessage(Deleting...);

s3Service.deleteSpecificFile(bucketName, fileName, new
AsyncCallbackString(){

@Override
public void 
onFailure(Throwable caught) {

Window.alert(caught.toString());
}

@Override
public void 
onSuccess(String result) {
if( 
OK.equals(result)){

go(-1);
}
}
});
}else if( cell.getCellIndex() 
== 4){
setMessage(Checking 
Result...);


s3Service.checkingResultMbean(bucketName, fileName, new
AsyncCallbackBoolean(){

@Override
public void 
onFailure(Throwable caught) {

Window.alert(Seems like It is still Mbean profiling...
\nPlese try again shortly..:-P);

Window.alert(caught.toString());
}

@Override
public void 
onSuccess(Boolean result) {//onSuccess-1
//  if( 
result ){

s3Service.checkingResultMem(bucketName, fileName, new
AsyncCallbackBoolean(){


@Override

public void onFailure(

Throwable caught) {

Window.alert(Seems like It is still Memory profiling...
\nPlese try again shortly..:-P);

Window.alert(caught.toString());


}


@Override

public void onSuccess(
  

Style pretty

2009-08-10 Thread Rado

I can't figure out how to turn of -style pretty in compilation. Here
is piece of build.xml file from gwt sample application:

target name=gwtc depends=javac description=GWT compile to
JavaScript
java failonerror=true fork=true
classname=com.google.gwt.dev.Compiler
  classpath
pathelement location=src/
path refid=project.class.path/
  /classpath
  !-- add jvmarg -Xss16M or similar if you see a
StackOverflowError --
  jvmarg value=-Xmx256M/
  !-- Additional arguments like -style PRETTY or -logLevel DEBUG
--
  arg value=com.google.gwt.sample.showcase.Showcase/
/java
  /target

what is the exact syntax for -syle pretty?
I've tried to add line
arg value=-style PRETTY/
  but there was just compilation error about unknown argument.
Can anybody send me exact line please?
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: How can you wait until GWT is ready externally? (after onEnterModule)

2009-08-10 Thread David

Doug,

I see your point. Maybe you should address this question with the GWT
contributors ? I think you make a valid question. In theory it should
be possible with a custom linker, but it would be nice that this
linker was there already.

You might indeed have to question if GWT is the best choice if you
actually want your API to be exposed as pure JavaScript (as the
preferred or even only way of using it).

Having a callback does not sound as a big drawback to me. Sometimes
you have to trade off your API to the ease of developments as well.
The main advantage of downloading and intialising asynchronously is
that you give CPU back to the browser to render the UI. so the intial
wait time is lower.

David

On Mon, Aug 10, 2009 at 3:13 AM, dougxdouglas.lin...@gmail.com wrote:

 Quick answer is: If you're providing a series of APIs to a third
 party, you:
 1) Don't want to give them the source code to recompile them
 (potentially).
 2) Don't want to make their life difficult by forcing them to
 recompile.
 3) Don't want to step outside of what is 'normal' for a JS library (no
 extra custom ready functions...)

 I understand what you're saying; yes, linking it all together is more
 efficient. Yes, you can bind everything together that way and you
 don't need multiple ready functions. Its a great way of building a
 rich net app.

 However, for JS mashups, you don't want a single page application that
 does everything. You want something that compiles into a generic
 robust usable JS API, that is easy to use and obviously interact with
 other JS APIs.

 Incidentally, as I mentioned, the javascript isn't being loaded in an
 iframe. I'm compiling in xs (cross site scripting) mode, which means
 the JS is added as an inline element in the head. The google code
 launcher specifically waits until after everything else before it
 launches itself (I presume to ensure the DOM is ready before kicking
 off the application init), but I would have been pleased if maybe the
 module constructor was run on load, and only onModuleLoad waited until
 after body.onload was called. Oh well.

 I've come to realize that GWT is ill suited to what I'm doing. I'm
 quite disappointed really.

 ~
 Doug.

 On Aug 9, 3:02 am, David david.no...@gmail.com wrote:
 I'm not 100% following your question, so excuse me if my answer does
 not match your question.

 Why would you need to have a toBeCalledByGWT for every method you want
 to expose from GWT ?

 I presume you have created an API in GWT and want to expose it outside of 
 GWT ?
 Just make sure that the onModuleLoad exposes all the methods (one way
 or another) and at the end you just call one method on the window
 object to indicate that the API is ready to be used. So you JS code
 just needs to wait until that method is invoked before starting

 If you want to use multiple GWT APIs this way, I guess the best thing
 to do is to have one onModuleLoad that invokes the injection of all
 the APIs in JS and then call one callback to kickstart your
 application. The idea of GWT is that you compile everything in one
 application to improve optimisations and to have a small as possible
 JS.

 Why  is the GWT API not fully initialized ? Well because it is
 actually loaded by a hidden IFrame. Additionally with GWT 2.0 we will
 be able to actually load parts on demand through runAsync support.

 David

 On Thu, Aug 6, 2009 at 10:11 AM,dougxdouglas.lin...@gmail.com wrote:

  Yes, that does work. However, it's awkward.

  For example, if someone using jquery were to use my API, it would be
  nice for them to be able to do this:
  $(function() {
     MyAPI.XXX(...);
  });

  Not this:
  myApiReady() {
    MyAPI.XXX(...);
  }

  Big deal right? ...but imagine how it scales. Say you depend on three
  GWT API's. Now you're looking at something like this:

  var readyStates = {'one' : false, 'two' : false, 'three' : false };
  myReallyActuallyReallyReadyFunction() {
      ...
  }
  function myApiOneReady() {
     readyStates.one = true;
     if (readyStates.one  readyStates.two  readyStates.three)
         myReallyActuallyReallyReadyFunction();
  };
  function myApiTwoReady() {
     readyStates.two = true;
     if (readyStates.one  readyStates.two  readyStates.three)
         myReallyActuallyReallyReadyFunction();
  };
  function myApiThreeReady() {
     readyStates.three = true;
     if (readyStates.one  readyStates.two  readyStates.three)
         myReallyActuallyReallyReadyFunction();
  };

  Ouch.

  I still don't understand why the onModuleLoad kicks off after the
  onLoad event; unless GWT is specifically waiting for the onLoad event
  before it kicks off its own internal processes.

  I suppose that vaguely makes sense, but it means that as an API
  platform it's vastly unuseful, unless there's a way to turn it off.

  ~
  Doug.

  On Aug 6, 3:06 pm, olivier nouguier olivier.nougu...@gmail.com
  wrote:
  hi,
   On simple  solution:

  * In your html/js code define a:

  function toBeCalledByGWT{
   

location for images

2009-08-10 Thread denis56

His,

In GWT 1.5 one needed to put images under public directory, with gwt
1.6/1.7 the recommended location is somewhere under your war
directory. I use normal images as well as ImageBundle in my project.
Could someone please clarify where image bundles are supposed to go
now - stay under public directory or go together with other non-
imagebundle files out to war?

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



GWT and CMS - Integration problem with SOA

2009-08-10 Thread dstefanox

I am working on a project which requires integration of the CMS
(Drupal, almost certainly) and the GWT. Since GWT files in my case
should be served by Tomcat and CMS pages by Apache server, Same Origin
Policy problem occurs. Configuration is the following (for feasibility
experiment):
- Page into which GWT app is embeded is served by Apache web server:
http://localhost/SOP/PHPSOP/TestSOP.html
- This page includes Java Script and CSS which are served by Tomcat,
and which are actual GWT application:
http://localhost:8080/testsop/testsop.nocache.js
Inclusion example:
 script type=text/javascript language=javascript src=http://
localhost:8080/testsop/testsop.nocache.js/script
Note that here we use port 8080.
When page loads, following error occurs:

Permission denied for http://localhost:8080 to get property
Window.document from http://localhost.
http://localhost:8080/testsop/E00BCFA70A4A65848519BCCCE10E89FF.cache.html
Line 1

I know that if I use Apache web server to serve all files, this would
not happen, but I wonder, is there a way to make it work this way?

If I use Apache server to serve all files - main page into which GWT
app embeds and GWT files, this problem does not occur. In this case, I
have url like:
http://localhost/SOP/TestSOP/war/LocalSOP.html
JS is included as:
script type=text/javascript language=javascript src=testsop/
testsop.nocache.js/script
Application is loaded, and at this moment we do not have the problem.
But when I want to make RPC call from my application, GWT creates URL
for RPC call:
http://localhost/SOP/TestSOP/war/testsop/greet
Of course, this URL does not exist on my server. Actually, good URL on
which Tomcat would respond would be:
http://localhost:8080/testsop/greet
How can I make my application served by Apache on one URL to call RPC
managed by Tomcat on other URL? Please note that having Apache and
Tomcat at same time is MUST, so don't try to explain how other
configuration would work perfectly...



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



Re: GWT and CMS - Integration problem with SOA

2009-08-10 Thread George Georgovassilis

Hello Dejan,

You could have Apache act as the front server and forward all requests
to a specific URL to a tomcat server, have a look at [1]. This way
they both share the same server and port for an external visitor.

[1] http://www.serverwatch.com/article.php/10819_2203891_1

On Aug 10, 12:59 pm, dstefanox dstefa...@gmail.com wrote:
 I am working on a project which requires integration of the CMS
 (Drupal, almost certainly) and the GWT. Since GWT files in my case
 should be served by Tomcat and CMS pages by Apache server, Same Origin
 Policy problem occurs. Configuration is the following (for feasibility
 experiment):
 - Page into which GWT app is embeded is served by Apache web 
 server:http://localhost/SOP/PHPSOP/TestSOP.html
 - This page includes Java Script and CSS which are served by Tomcat,
 and which are actual GWT 
 application:http://localhost:8080/testsop/testsop.nocache.js
 Inclusion example:
  script type=text/javascript language=javascript src=http://
 localhost:8080/testsop/testsop.nocache.js/script
 Note that here we use port 8080.
 When page loads, following error occurs:

 Permission denied for http://localhost:8080 to get property
 Window.document from 
 http://localhost.http://localhost:8080/testsop/E00BCFA70A4A65848519BCCCE10E89FF.cache
 Line 1

 I know that if I use Apache web server to serve all files, this would
 not happen, but I wonder, is there a way to make it work this way?

 If I use Apache server to serve all files - main page into which GWT
 app embeds and GWT files, this problem does not occur. In this case, I
 have url like:http://localhost/SOP/TestSOP/war/LocalSOP.html
 JS is included as:
 script type=text/javascript language=javascript src=testsop/
 testsop.nocache.js/script
 Application is loaded, and at this moment we do not have the problem.
 But when I want to make RPC call from my application, GWT creates URL
 for RPC call:http://localhost/SOP/TestSOP/war/testsop/greet
 Of course, this URL does not exist on my server. Actually, good URL on
 which Tomcat would respond would be:http://localhost:8080/testsop/greet
 How can I make my application served by Apache on one URL to call RPC
 managed by Tomcat on other URL? Please note that having Apache and
 Tomcat at same time is MUST, so don't try to explain how other
 configuration would work perfectly...
--~--~-~--~~~---~--~~
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: Inlining nocache.js

2009-08-10 Thread George Georgovassilis

The way to do it finally was:

1. inline nocache.js as a script.../script in the module html
2. replace all string references of 'xyz.cache.html' to 'path/to/gwt/
output/xyz.cache.html'
3. (for RPC only) copy the serialization policy files to the module
html location

On Aug 4, 9:02 pm, George Georgovassilis g.georgovassi...@gmail.com
wrote:
 So, while trying to squeeze out the latest tiny bit of speed for my
 application I ended up with this setup:

 index.html ( = module page) contains inlined css and the nocache.js.
 The index.html is non-cacheable, but is guarded with an E-Tag, which
 doesn't do anything to first time users, but recurring users will see
 a 304 (not modified) and the application will load instantly. I
 inlined the CSS so that no further HTTP request is neccessary, the
 same rationale goes for the inlined nocache.js

 So the only HTTP requests are:
 1. load the index.html
 2. load aspriteimage
 3. load the browser dependent *.cache.js

 The problem here is that since I inlined nocache.js, now index.html
 has to reside in the same location with *.cache.js, which is horrible
 to configure for caching since I'm not using Apache but just Tomcat.

 Using a base href= to bend the base location seems to work only on
 Firefox, IE can't find its RPC services and Safari won't load at all.

 Any ideas?
--~--~-~--~~~---~--~~
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: Event Handlers and event capture

2009-08-10 Thread Rajneesh Aggarwal
EventDelegation might be the solution for the blur events.

http://www.quirksmode.org/blog/archives/2008/04/delegating_the.html

On Mon, Aug 10, 2009 at 12:10 AM, Steve C st...@steveclaflin.com wrote:


 Apparently Event Handling uses bubbling, not capture, since an
 HTMLPanel does not notice blur events on a contained input element (I
 believe that the blur event is fired through the capture phase by
 browsers, but does not buibble back up).

 Is there any way to capture BlurEvents in a HTMLPanel for a contained
 input element?
 


--~--~-~--~~~---~--~~
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 split a large application?

2009-08-10 Thread Stefan

Hi David,

thank you for sharing your solution. I had hoped that there is another
possibility. I have two questions about your solution:

1. How would you load a sub application without using an iframe?
Wouldn't there be a clash between the main application and the sub
application because the JavaScript of both parts would reside in the
same window object?

2. Can you please give me some more information about how you enabled
the communication between the applications. I can imagine a global
JavaScript object that registers and informs listeners of application
events.

Thanks,
--Stefan



--~--~-~--~~~---~--~~
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 split a large application?

2009-08-10 Thread Paul Grenyer

Hi

 2. Can you please give me some more information about how you enabled
 the communication between the applications. I can imagine a global
 JavaScript object that registers and informs listeners of application
 events.

If you get that working can you let us all know, please? We've had a
lot of trouble with this.

-- 
Thanks
Paul

Paul Grenyer
e: paul.gren...@gmail.com
w: http://www.marauder-consulting.co.uk
b: paulgrenyer.blogspot.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
-~--~~~~--~~--~--~---



external source inherits

2009-08-10 Thread vetal

Hi, all!
Can any body help me with my issues? So my problem is i have some
service and now plane write client for this service in GWT. Service
and client must exchange messages in JSON format. In server side i had
framework for transformation JSON to JavaBeans and plain do something
like this in client side.

So my question is how i can use beans from server side if its not GWT
project and service don't have module file, what i must deascribe in
client module file for getting access to the server beans.

Thanks,
Vetal
--~--~-~--~~~---~--~~
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: Does anyone has a nice written class for bypassing SOP restrinctions

2009-08-10 Thread MiSt


Inspired by someone's example I don't remember  where I've found it.
This method works only with GET


Example:

CrossSiteJsonRequestUtil.INSTANCE.doFetchURL(www.test.com,
callbackmethodname, new AsyncCallbackJSONObject() {

@Override
public void onFailure(Throwable caught) {
// TODO

}

@Override
public void onSuccess(JSONObject result) {
// TODO

}

});

import java.util.HashMap;
import java.util.Map;

import com.google.gwt.core.client.JavaScriptObject;
import com.google.gwt.json.client.JSONObject;
import com.google.gwt.user.client.rpc.AsyncCallback;


public class CrossSiteJsonRequestUtil {

public static CrossSiteJsonRequestUtil INSTANCE = new
CrossSiteJsonRequestUtil();

private MapString, AsyncCallbackJSONObject callbacks = new
HashMapString, AsyncCallbackJSONObject();

private int curIndex = 0;

private static final String CALLBACK_PARAM_NAME = callback;

public void doFetchURL(String baseUrl,
AsyncCallbackJSONObject responseHandler) {
doFetchURL(baseUrl, CALLBACK_PARAM_NAME, responseHandler);
}

public void doFetchURL(String baseUrl, String callbackParamName,
AsyncCallbackJSONObject responseHandler) {
String callbackName = reserveCallback(responseHandler);
setup(callbackName);

char sep;
if (baseUrl.contains(?)) {
sep = '';
} else {
sep = '?';
}

addScript(callbackName, baseUrl + sep + callbackParamName + =
+ callbackName);


}

private void setup(String callback) {
setup(this, callback);
}

private String reserveCallback(AsyncCallbackJSONObject
responseHandler) {
while (true) {
if (!callbacks.containsKey(__gwt_callback + curIndex)) {
callbacks.put(__gwt_callback + curIndex, responseHandler);
return __gwt_callback + curIndex++;
}
}
}

private native static void setup(CrossSiteJsonRequestUtil
instance,
String callback) /*-{
window[callback] = function(someData) {
  instan...@crosssitejsonrequestutil::handle(Lcom/google/gwt/
core/client/JavaScriptObject;Ljava/lang/String;)(someData,callback);
  var scriptEl = document.getElementById(callback);
  document.getElementsByTagName(body)[0].removeChild
(scriptEl);
window[callback] =null;
}
}-*/;

private native void addScript(String uniqueId, String url) /*-{
var elem = document.createElement(script);
elem.setAttribute(language, JavaScript);
elem.setAttribute(src, url);
 elem.setAttribute(id, uniqueId);
document.getElementsByTagName(body)[0].appendChild(elem);
}-*/;

@SuppressWarnings(unused)
private void handle(JavaScriptObject jso, String callback) {
JSONObject jsonObject = null;
AsyncCallbackJSONObject responseHandler = callbacks.get(callback);
try {
jsonObject = new JSONObject(jso);
} catch (RuntimeException e) {
responseHandler.onFailure(e);
}
if (jsonObject != null) {
responseHandler.onSuccess(jsonObject);
}

}


}

--~--~-~--~~~---~--~~
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: decide zoom level from multiple points

2009-08-10 Thread Michael W

I had a blog for Google map auto zoom.
http://michaeltechzone.blogspot.com/2008/12/google-maps-api-dynamically-calculate_31.html
There is example of using it: http://www.allhotelmotel.com

For GWT,
you can reference bestFitWithCenter method and apply to your GWT
module.

I used it for my client new site, in hotel search result page map view
tab.
http://www.holidayinn.com/hotels/us/en/reservation


On Aug 10, 1:59 am, lumo lumo2...@gmail.com wrote:
 Hello NG!

 i am painting multiple markers on a map and need to change the zoom
 level afterward so the user can see all of the markers in the viewing
 area.
 i already calculate the center position right, but deciding the zoom
 level brings me to a problem.

 how can i calculate which zoom level i need? is there a special sense
 behind the levels?

 i found an article about the scale of the levels, but i am not sure if
 this is correct...http://laudontech.com/GISBlog/?p=28
 would be great if someone can bring light into this (for me)

 thanks a lot in advance
 lumo
--~--~-~--~~~---~--~~
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: size of TextBox in GWT

2009-08-10 Thread Tobe

@jhulford
That's what I need. Thanks


On Aug 8, 6:51 pm, jhulford jhulf...@gmail.com wrote:
 Try TextBox.setVisibleLength()

 On Aug 6, 1:59 pm, Tobe tobias.jungnic...@googlemail.com wrote:



  Hi,
  how do I set the size parameter of a HTML input element with
  type=text for a TextBox in GWT?
--~--~-~--~~~---~--~~
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: url rewrite and gwt

2009-08-10 Thread Michael W

Use Javascript native method.

/**
   * To redirect to different module, will refresh the page.
   * @param url
   */
  public static native void redirectRefersh( String url )/*-{
 $wnd.location.href = url;
}-*/;


On Aug 7, 9:29 am, twdarkflame darkfl...@gmail.com wrote:
 You dont do this in gwt, but rather using a .htaccess file on your
 sever.

 I dont know the precise process myself, but its basicaly writting a
 few lines in a text file, renaming it .htaccess, then putting it on
 the route of the sever.
 This file can make it so that...as far as gwt is concerned...the /
 catagory/blah is actualy a query string ?Catagory_Blah or something

 On Aug 7, 1:43 pm, Bhayat baki.hayat.c...@gmail.com wrote:

  In gwt url rewrite is possible.how can i make it ? for example when i
  use category button,my category panel is opened but i also want to
  make url rewrite so ./category  must be writed

  How can i make this?
  Do you have any document or link ?
--~--~-~--~~~---~--~~
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: At new item to a list at each position

2009-08-10 Thread Tobe

I don't really need to know how to create the Array. I already created
a Vector of button and adding the buttons to the Vector. But my
problem is that I don't know how to handle with it. How can I add the
new div at the position behind the corresponding button on the
RootPanel?

On Aug 7, 5:22 pm, Tobe tobias.jungnic...@googlemail.com wrote:
 Hi,
 I have a list, which items are divs, and want the user to add new
 items at any position. So if there are 2 item there have to be 3
 button, one before the first, one between both and one after the last.
 Can somebody tell me how to create this array of buttons.
--~--~-~--~~~---~--~~
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 split a large application?

2009-08-10 Thread David

On Mon, Aug 10, 2009 at 2:23 PM, Stefanstefan.wach...@gmx.de wrote:

 Hi David,

 thank you for sharing your solution. I had hoped that there is another
 possibility. I have two questions about your solution:

 1. How would you load a sub application without using an iframe?
 Wouldn't there be a clash between the main application and the sub
 application because the JavaScript of both parts would reside in the
 same window object?

When I was talking about running without an IFrame I meant that my
application would not use an IFrame for display purpose.

GWT still uses an IFrame to load and separate the actual application
code. At a certain point my main application creates a DIV tag in the
root page and gives the ID to the subapplication to render in the DIV
tag.


 2. Can you please give me some more information about how you enabled
 the communication between the applications. I can imagine a global
 JavaScript object that registers and informs listeners of application
 events.

Yes indeed, that is basically what I've done. First of all, the main
application put a JS object on the DIV block which the application
will detect when starting. When the application is ready it calls a
method on this JS object to notify the main application that it is
ready. This way I can setup 2 way communication. So the application
can listen to events from the main app and the main app can also get
events from the sub apps.

The API between these 2 application is very limited. I actually use
JSON to encode/decode the messages since the Java-JS compiler
obfuscates the actual objects.

David

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



Re: GWT RPC

2009-08-10 Thread Pavel Byles
Fred,I have tried transferring a JDO enhanced class from server to client,
to no avail. The error I get is the same as before:
org.datanucleus.store.appengine.query.*StreamingQueryResult* cannot be cast
 

On Wed, Aug 5, 2009 at 3:43 PM, Fred Sauer fre...@google.com wrote:

 Let me know how it goes with the latest plugin and GWT 1.7.0.
 Just to be clear, JDO enhanced classes still won't pass round trip, even if
 they are in detached state. For that you still need to transfer some sort of
 DTO between client and server. However, if you just want to take a JDO class
 and transfer it one way, you can sort of get that to work.

 Fred


 On Wed, Aug 5, 2009 at 12:26 PM, Pavel Byles pavelby...@gmail.com wrote:

 Ok,
 this is great news. I will try this w/o your workaround and hope for the
 best.

 On Wed, Aug 5, 2009 at 12:21 PM, Fred Sauer fre...@google.com wrote:

 Pavel,
 Some of the annoyances have been cleaned up. The latest plugin takes care
 of some of that.

 The biggest thing left is how to deal with detachable 'bytecode enhanced'
 classes so that they can be sent round trip server-client-server. This has
 been discussed at length on the GWT user + contributor forums. I think some
 good work is happening in this area to make life easier.

 Fred


 On Wed, Aug 5, 2009 at 8:54 AM, Pavel Byles pavelby...@gmail.comwrote:

 Has there been any further word on the GWT bug that requires the
 following workaround:
 http://fredsa.allen-sauer.com/2009/04/1st-look-at-app-engine-using-jdo.html?
 Has this been fixed in 1.7?
 --
 -Pav





 --
 Fred Sauer
 Developer Advocate
 Google Inc. 1600 Amphitheatre Parkway
 Mountain View, CA 94043
 fre...@google.com








 --
 -Pav





 --
 Fred Sauer
 Developer Advocate
 Google Inc. 1600 Amphitheatre Parkway
 Mountain View, CA 94043
 fre...@google.com




 



-- 
-Pav

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



Re: GWT compilation failed

2009-08-10 Thread Rajeev Dayal
There are some incompatibilities between Eclipse's Dynamic Web Projects, and
applying the GWT Nature to these projects. When we wrote the plugin, we did
not explicitly try to integrate with Eclipse's J2EE support. However, a few
people on here have figured out a way to make the two work together. See the
following link for more information:
http://groups.google.com/group/Google-Web-Toolkit/browse_thread/thread/39e0ff6325e4d504/55bfd342d77ec910

Keep in mind that when applying the GWT Nature, you need to create your
'war' directory first, and then apply the nature. If you did not do this,
you can correct the problem by removing the nature, applying the changes,
and then re-adding the nature. See
http://code.google.com/eclipse/docs/existingprojects.html for more
information.

If you're still stuck, post back here with the details (including extra
information, especially in the case of a GWT Compilation failure).

On Thu, Aug 6, 2009 at 12:19 PM, svadimr vadim...@gmail.com wrote:


 Hello All,

 I'm a newbie in GWT, but it seems really cool.
 I'm using eclipse with mysql and tomcat 6 to run my webapplication.
 Now I want to add some features using GWT.
 I added eclipse pluging and created a test project, compile it and
 everything worked perfectly.
 Then I implemented my needed features tested them in GWT project and
 they worked as expected.
 Now I want to combine those two into one project and I really prefer
 to merge the GWT project into my dynamic web application.
 In the project settings I checked use Google Web Toolkit option,
 created a module and an empty entry point class (just for checking)
 then I tried to compile project using GWT compile and I got GWT
 compilation failed.
 I tried to create a war directory and I checked the xml files,
 everything looks fine.
 How can I continue from here?

 Thank you,
 Vadim.

 


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



Server Root Directory

2009-08-10 Thread CI-CUBE

Hi,

in my initial client-server application I want to read a file, lets
say 'index.txt', which I then want to pass to the client as string.
Everything seems to be fine, however I get a file exception. So my
question is, what is the server root directory at run-time? I tried
several locations below 'war' but none of them helped.

So can you tell me the path where 'index.txt' has to be installed,
please?

Thanx ia,

   Ekki
--~--~-~--~~~---~--~~
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: Server Root Directory

2009-08-10 Thread Paul Grenyer

Hi

 in my initial client-server application I want to read a file, lets
 say 'index.txt', which I then want to pass to the client as string.
 Everything seems to be fine, however I get a file exception. So my
 question is, what is the server root directory at run-time? I tried
 several locations below 'war' but none of them helped.

 So can you tell me the path where 'index.txt' has to be installed,
 please?

You should be able to get it form the ServletContext.

-- 
Thanks
Paul

Paul Grenyer
e: paul.gren...@gmail.com
w: http://www.marauder-consulting.co.uk
b: paulgrenyer.blogspot.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: Handing Events

2009-08-10 Thread Donald W. Long

Thanks for the data

very good

Donald W. Long

On Jul 31, 9:24 am, olivier nouguier olivier.nougu...@gmail.com
wrote:
 hi,
 AFAIK nothing to do in that case 
 :)http://code.google.com/p/google-web-toolkit/wiki/DomEventsAndMemoryLeaks

 On Fri, Jul 31, 2009 at 4:21 PM, Donald W. Long 
 donald.w.l...@gmail.comwrote:







  Hi all,

  This is a question about how GWT deals with events.  If you create a
  button (for example) and assign event to it and then later you wish to
  delete the button, what happens to the event.

  What the real question is, what is the procedure to remove a widget in
  GWT that has an event assigned to it.

  I would assume you would have to do something to delete the assigned
  event to stop memory leaks.

  Thanks

  Donald W. Long

 --
   We can live without religion and meditation, but we cannot survive without
 human affection.
 --
 Dalai Lama- Hide quoted text -

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



Spring Security integration : updated lib

2009-08-10 Thread David

Hello,

After several months, I've just took the time to upgrade my library
enabling the integration of Spring Security with GWT application.
This lib (http://code.google.com/p/gwt-incubator-lib/) is now
compatible with GWT 1.7.
I also provide a ClickHandler for a simple authentication with Spring
Security.

A sample webapp is also available in SVN : an example is worth a
thousand lines tutorial sometimes

You can give it a try and send your feedback.
--~--~-~--~~~---~--~~
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 to import/require external Java Classes

2009-08-10 Thread CI-CUBE

Hi,

as long as I use com.google.gwt*, java.* and my project.client.*
classes in my client app, everything works fine. As soon as I want to
use a class outside my project.client.*, e.g. a class from my
project.server.* I get this well-know error:  No source code is
available for type ... 

The Project's Java Build Path/Source does already contain the complete
src path of my project. So it doesn't seem useful to add my
project.server.* additionally. Do I need an explicit GWT Module
definition for that or can this be done via Project Settings?

TIA,

   Ekki
--~--~-~--~~~---~--~~
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 import/require external Java Classes

2009-08-10 Thread Jason Parekh
Hi,
You'll likely run into issues trying to add your entire 'server' directory
as a source directory for GWT.  For example, this means each of those
classes needs to cleanly compile with gwtc, which may not be possible.

Instead, could you move some of the shared classes to the 'client'
directory?  The 'server' director can already reach files from the 'client'
directory (as seen with the default GreetingService example.)

jason

On Mon, Aug 10, 2009 at 10:34 AM, CI-CUBE e...@ci-cube.info wrote:


 Hi,

 as long as I use com.google.gwt*, java.* and my project.client.*
 classes in my client app, everything works fine. As soon as I want to
 use a class outside my project.client.*, e.g. a class from my
 project.server.* I get this well-know error:  No source code is
 available for type ... 

 The Project's Java Build Path/Source does already contain the complete
 src path of my project. So it doesn't seem useful to add my
 project.server.* additionally. Do I need an explicit GWT Module
 definition for that or can this be done via Project Settings?

 TIA,

   Ekki
 


--~--~-~--~~~---~--~~
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: Server Root Directory

2009-08-10 Thread CI-CUBE

Yep, getServletContext().getRealPath(file name) returns a file path
that may be passed directly to a FileReader constructor, for instance.

Thx a lot. Thread closed.

   Ekki
--~--~-~--~~~---~--~~
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 import/require external Java Classes

2009-08-10 Thread CI-CUBE

Jason,

On Aug 10, 4:45 pm, Jason Parekh jasonpar...@gmail.com wrote:
 Hi,
 You'll likely run into issues trying to add your entire 'server' directory
 as a source directory for GWT.  For example, this means each of those
 classes needs to cleanly compile with gwtc, which may not be possible.
EB: but this is a sub dir of the src dir - the later of which is
already included (by default)

 Instead, could you move some of the shared classes to the 'client'
 directory?  The 'server' director can already reach files from the 'client'
 directory (as seen with the default GreetingService example.)
EB: sure, But this isn't an option as I wand to implement a clean
module structure.

   Ekki




 jason

 On Mon, Aug 10, 2009 at 10:34 AM, CI-CUBE e...@ci-cube.info wrote:

  Hi,

  as long as I use com.google.gwt*, java.* and my project.client.*
  classes in my client app, everything works fine. As soon as I want to
  use a class outside my project.client.*, e.g. a class from my
  project.server.* I get this well-know error:  No source code is
  available for type ... 

  The Project's Java Build Path/Source does already contain the complete
  src path of my project. So it doesn't seem useful to add my
  project.server.* additionally. Do I need an explicit GWT Module
  definition for that or can this be done via Project Settings?

  TIA,

    Ekki
--~--~-~--~~~---~--~~
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 import/require external Java Classes

2009-08-10 Thread Jason Parekh
On Mon, Aug 10, 2009 at 10:52 AM, CI-CUBE e...@ci-cube.info wrote:


 Jason,

 On Aug 10, 4:45 pm, Jason Parekh jasonpar...@gmail.com wrote:
  Hi,
  You'll likely run into issues trying to add your entire 'server'
 directory
  as a source directory for GWT.  For example, this means each of those
  classes needs to cleanly compile with gwtc, which may not be possible.
 EB: but this is a sub dir of the src dir - the later of which is
 already included (by default)


It is a subdirectory of src, but GWT (by default) only looks to compile the
files under src/client.  JDK's javac is being used to compile the src/server
files.



 
  Instead, could you move some of the shared classes to the 'client'
  directory?  The 'server' director can already reach files from the
 'client'
  directory (as seen with the default GreetingService example.)
 EB: sure, But this isn't an option as I wand to implement a clean
 module structure.


Could you create a src/shared directory and add it as a source path=...
/ in your module XML?  This will keep it separate from client-specific code
and server-specific code, and both gwtc and javac will still be able to see
it.

If you want to create a brand new module for this shared code, you could do
that as well in a similar fashion (either put the shared code in the new
module's src/client directory, or add whichever path you decide as a source
path=... / in the module XML.)

jason




   Ekki



 
  jason
 
  On Mon, Aug 10, 2009 at 10:34 AM, CI-CUBE e...@ci-cube.info wrote:
 
   Hi,
 
   as long as I use com.google.gwt*, java.* and my project.client.*
   classes in my client app, everything works fine. As soon as I want to
   use a class outside my project.client.*, e.g. a class from my
   project.server.* I get this well-know error:  No source code is
   available for type ... 
 
   The Project's Java Build Path/Source does already contain the complete
   src path of my project. So it doesn't seem useful to add my
   project.server.* additionally. Do I need an explicit GWT Module
   definition for that or can this be done via Project Settings?
 
   TIA,
 
 Ekki
 


--~--~-~--~~~---~--~~
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 import/require external Java Classes

2009-08-10 Thread CI-CUBE

Thx for your support! I've the feeling I'm getting closer to the
solution ;-)

What is the beginning of the Path in the source path=Path
statements?

   Ekki

On Aug 10, 5:03 pm, Jason Parekh jasonpar...@gmail.com wrote:
 On Mon, Aug 10, 2009 at 10:52 AM, CI-CUBE e...@ci-cube.info wrote:

  Jason,

  On Aug 10, 4:45 pm, Jason Parekh jasonpar...@gmail.com wrote:
   Hi,
   You'll likely run into issues trying to add your entire 'server'
  directory
   as a source directory for GWT.  For example, this means each of those
   classes needs to cleanly compile with gwtc, which may not be possible.
  EB: but this is a sub dir of the src dir - the later of which is
  already included (by default)

 It is a subdirectory of src, but GWT (by default) only looks to compile the
 files under src/client.  JDK's javac is being used to compile the src/server
 files.



   Instead, could you move some of the shared classes to the 'client'
   directory?  The 'server' director can already reach files from the
  'client'
   directory (as seen with the default GreetingService example.)
  EB: sure, But this isn't an option as I wand to implement a clean
  module structure.

 Could you create a src/shared directory and add it as a source path=...
 / in your module XML?  This will keep it separate from client-specific code
 and server-specific code, and both gwtc and javac will still be able to see
 it.

 If you want to create a brand new module for this shared code, you could do
 that as well in a similar fashion (either put the shared code in the new
 module's src/client directory, or add whichever path you decide as a source
 path=... / in the module XML.)

 jason



    Ekki

   jason

   On Mon, Aug 10, 2009 at 10:34 AM, CI-CUBE e...@ci-cube.info wrote:

Hi,

as long as I use com.google.gwt*, java.* and my project.client.*
classes in my client app, everything works fine. As soon as I want to
use a class outside my project.client.*, e.g. a class from my
project.server.* I get this well-know error:  No source code is
available for type ... 

The Project's Java Build Path/Source does already contain the complete
src path of my project. So it doesn't seem useful to add my
project.server.* additionally. Do I need an explicit GWT Module
definition for that or can this be done via Project Settings?

TIA,

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



editable grids and listfields

2009-08-10 Thread Neil

Hi

I am trying to put together an application which uses an editable grid
to modify a data model. 1 field needs to be a drop down selection, and
another needs to be a multi-select. From what I can work out, the
listfield control will work for multi-select - however I have not
worked out how to hook it into the grid correctly, please could
someone give an example. I have had a search and have been unable to
find an example for this (but I may be looking in the wrong place!)

I have a simple data model e.g.

Model{
  int Id;
  string Name;
  int CategoryId;
  List role Roles;
}

the category Id will be populated from a drop down - displaying the
name not the id

category{
  int Id;
  string CategoryName;
}

the role is equally straightforward:

role{
 int Id;
 string RoleName;
}

how should I implement a multi-select list to edit the roles?

thanks for any assistance.

--~--~-~--~~~---~--~~
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 import/require external Java Classes

2009-08-10 Thread Jason Parekh
No problem, glad it's helping =)
The path should be relative to the location of your module XML file.  For
more info, check out
http://code.google.com/webtoolkit/doc/1.6/DevGuideOrganizingProjects.html#DevGuideModulesand
search that page for source.

jason

On Mon, Aug 10, 2009 at 11:07 AM, CI-CUBE e...@ci-cube.info wrote:


 Thx for your support! I've the feeling I'm getting closer to the
 solution ;-)

 What is the beginning of the Path in the source path=Path
 statements?

   Ekki

 On Aug 10, 5:03 pm, Jason Parekh jasonpar...@gmail.com wrote:
  On Mon, Aug 10, 2009 at 10:52 AM, CI-CUBE e...@ci-cube.info wrote:
 
   Jason,
 
   On Aug 10, 4:45 pm, Jason Parekh jasonpar...@gmail.com wrote:
Hi,
You'll likely run into issues trying to add your entire 'server'
   directory
as a source directory for GWT.  For example, this means each of those
classes needs to cleanly compile with gwtc, which may not be
 possible.
   EB: but this is a sub dir of the src dir - the later of which is
   already included (by default)
 
  It is a subdirectory of src, but GWT (by default) only looks to compile
 the
  files under src/client.  JDK's javac is being used to compile the
 src/server
  files.
 
 
 
Instead, could you move some of the shared classes to the 'client'
directory?  The 'server' director can already reach files from the
   'client'
directory (as seen with the default GreetingService example.)
   EB: sure, But this isn't an option as I wand to implement a clean
   module structure.
 
  Could you create a src/shared directory and add it as a source
 path=...
  / in your module XML?  This will keep it separate from client-specific
 code
  and server-specific code, and both gwtc and javac will still be able to
 see
  it.
 
  If you want to create a brand new module for this shared code, you could
 do
  that as well in a similar fashion (either put the shared code in the new
  module's src/client directory, or add whichever path you decide as a
 source
  path=... / in the module XML.)
 
  jason
 
 
 
 Ekki
 
jason
 
On Mon, Aug 10, 2009 at 10:34 AM, CI-CUBE e...@ci-cube.info wrote:
 
 Hi,
 
 as long as I use com.google.gwt*, java.* and my project.client.*
 classes in my client app, everything works fine. As soon as I want
 to
 use a class outside my project.client.*, e.g. a class from my
 project.server.* I get this well-know error:  No source code is
 available for type ... 
 
 The Project's Java Build Path/Source does already contain the
 complete
 src path of my project. So it doesn't seem useful to add my
 project.server.* additionally. Do I need an explicit GWT Module
 definition for that or can this be done via Project Settings?
 
 TIA,
 
   Ekki
 


--~--~-~--~~~---~--~~
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 split a large application?

2009-08-10 Thread Saeed Zarinfam

Hi David
I have the same problem. I connect main application with sub
application using append # in the end of iframe URL but this
approach does not work in some browser.
please describe about how you enabled the communication between the
applications with an example.

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: GWT compilation failed

2009-08-10 Thread svadimr

It worked perfectly, thank you.

On Aug 10, 4:12 pm, Rajeev Dayal rda...@google.com wrote:
 There are some incompatibilities between Eclipse's Dynamic Web Projects, and
 applying the GWT Nature to these projects. When we wrote the plugin, we did
 not explicitly try to integrate with Eclipse's J2EE support. However, a few
 people on here have figured out a way to make the two work together. See the
 following link for more 
 information:http://groups.google.com/group/Google-Web-Toolkit/browse_thread/threa...

 Keep in mind that when applying the GWT Nature, you need to create your
 'war' directory first, and then apply the nature. If you did not do this,
 you can correct the problem by removing the nature, applying the changes,
 and then re-adding the nature. 
 Seehttp://code.google.com/eclipse/docs/existingprojects.htmlfor more
 information.

 If you're still stuck, post back here with the details (including extra
 information, especially in the case of a GWT Compilation failure).

 On Thu, Aug 6, 2009 at 12:19 PM, svadimr vadim...@gmail.com wrote:

  Hello All,

  I'm a newbie in GWT, but it seems really cool.
  I'm using eclipse with mysql and tomcat 6 to run my webapplication.
  Now I want to add some features using GWT.
  I added eclipse pluging and created a test project, compile it and
  everything worked perfectly.
  Then I implemented my needed features tested them in GWT project and
  they worked as expected.
  Now I want to combine those two into one project and I really prefer
  to merge the GWT project into my dynamic web application.
  In the project settings I checked use Google Web Toolkit option,
  created a module and an empty entry point class (just for checking)
  then I tried to compile project using GWT compile and I got GWT
  compilation failed.
  I tried to create a war directory and I checked the xml files,
  everything looks fine.
  How can I continue from here?

  Thank you,
  Vadim.


--~--~-~--~~~---~--~~
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: Will I have memory leaks if a Widget is removed from Panel without call to HandlerRegistration#removeHandler()

2009-08-10 Thread Arthur Kalmenson

I think that if you have handlers attached to a widget that gets
removed, it won't be garbage collected. There was a discussion about
this earlier here. I think if you hang onto the HandlerRegistration,
you can remove yourself onUnload().

Regards,
--
Arthur Kalmenson



On Tue, Aug 4, 2009 at 5:45 PM, Justaseugene.f...@gmail.com wrote:

 There is an application in which a Panel instance is *Handler for
 widgets, which are added dynamically depending on the result returned
 by async call. Instances of HandlerRegistration are not maintained by
 the application (i.e. values returned by #add*Handler() are not stored
 anywhere).

 Now lets suppose that one of these widgets is removed from the panel
 without calling respective HandlerRegistration#removeHandler(). Will I
 have unnecessary references to the panel related to removed widget? Is
 it possible that this panel (as a Handler) will be invoked to handle
 an event (either native or logical) having removed widget as a source
 (either before or after garbage collection)?

 GWT 1.7, no JSNI used.

 


--~--~-~--~~~---~--~~
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: differ binding json parse?

2009-08-10 Thread Arthur Kalmenson

There was some discussion about this on GWTC AFAIR, but I don't think
that's implemented yet. Right now the JSONParser really isn't that
fast, so if you trust the source that you're getting the JSON from,
try using JavaScriptObject instead of JSONParser.

Regards,
--
Arthur Kalmenson



On Tue, Aug 4, 2009 at 10:52 PM, asianCoolzsecond.co...@gmail.com wrote:

 may i know when we use inherits name=com.google.gwt.json.JSON /

 does it automatically use the browser built in native json.parse if
 browser support it and do fall-back to eval when browser not support
 it?

 


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



Share instance between objects(DI)

2009-08-10 Thread Tercio

Hi!

I know that this isn't the correct forum for my question, as my
problem is related to Google-Gin, but it may be generic for sharing
instances problem.

I'm using Gin for dependent injection in my application, everything
works great, but I'm not able to inject the Injector instance into my
injected classes. hahaha sounds confusing... :-P

I use Google Guice in my servlets and the below snippet works great:
..

@Inject
public MyServlet(Injector injector)
{
  this.injector = injector;
}

...

My field this.injector will have a reference for the Injector that
injected it. I use it to create instances of classes that I need to
create more than once.

But Gin is unable to inject the Ginjector that injected the class.

Currently I created a public static field into my EntryPoint class
containing a reference for my injector, and I use this field
application wide. I think that it's not the best approach, as I'm
creating static dependents.

What is the best approach?

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: Style pretty

2009-08-10 Thread Ian Bambury
Have you tried an extra
   jvmarg value=-style PRETTY/

or amended the existing tag to

   arg value=-Xmx256M -style PRETTY/

I haven't tried it, but surely one of those will work.

Ian

http://examples.roughian.com


2009/8/10 Rado rrrado...@gmail.com


 I can't figure out how to turn of -style pretty in compilation. Here
 is piece of build.xml file from gwt sample application:

 target name=gwtc depends=javac description=GWT compile to
 JavaScript
java failonerror=true fork=true
 classname=com.google.gwt.dev.Compiler
  classpath
pathelement location=src/
path refid=project.class.path/
  /classpath
  !-- add jvmarg -Xss16M or similar if you see a
 StackOverflowError --
  jvmarg value=-Xmx256M/
  !-- Additional arguments like -style PRETTY or -logLevel DEBUG
 --
  arg value=com.google.gwt.sample.showcase.Showcase/
/java
  /target

 what is the exact syntax for -syle pretty?
 I've tried to add line
arg value=-style PRETTY/
  but there was just compilation error about unknown argument.
 Can anybody send me exact line please?
 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: GWT RPC

2009-08-10 Thread Fred Sauer
Pavel,
You still will need to copy the result set into a new collection, e.g. an
ArrayList.

Fred


On Mon, Aug 10, 2009 at 6:54 AM, Pavel Byles pavelby...@gmail.com wrote:

 Fred,I have tried transferring a JDO enhanced class from server to client,
 to no avail. The error I get is the same as before:
 org.datanucleus.store.appengine.query.*StreamingQueryResult* cannot be
 cast  


 On Wed, Aug 5, 2009 at 3:43 PM, Fred Sauer fre...@google.com wrote:

 Let me know how it goes with the latest plugin and GWT 1.7.0.
 Just to be clear, JDO enhanced classes still won't pass round trip, even
 if they are in detached state. For that you still need to transfer some sort
 of DTO between client and server. However, if you just want to take a JDO
 class and transfer it one way, you can sort of get that to work.

 Fred


 On Wed, Aug 5, 2009 at 12:26 PM, Pavel Byles pavelby...@gmail.comwrote:

 Ok,
 this is great news. I will try this w/o your workaround and hope for the
 best.

 On Wed, Aug 5, 2009 at 12:21 PM, Fred Sauer fre...@google.com wrote:

 Pavel,
 Some of the annoyances have been cleaned up. The latest plugin takes
 care of some of that.

 The biggest thing left is how to deal with detachable 'bytecode
 enhanced' classes so that they can be sent round trip
 server-client-server. This has been discussed at length on the GWT user +
 contributor forums. I think some good work is happening in this area to 
 make
 life easier.

 Fred


 On Wed, Aug 5, 2009 at 8:54 AM, Pavel Byles pavelby...@gmail.comwrote:

 Has there been any further word on the GWT bug that requires the
 following workaround:
 http://fredsa.allen-sauer.com/2009/04/1st-look-at-app-engine-using-jdo.html?
 Has this been fixed in 1.7?
 --
 -Pav





 --
 Fred Sauer
 Developer Advocate
 Google Inc. 1600 Amphitheatre Parkway
 Mountain View, CA 94043
 fre...@google.com








 --
 -Pav





 --
 Fred Sauer
 Developer Advocate
 Google Inc. 1600 Amphitheatre Parkway
 Mountain View, CA 94043
 fre...@google.com








 --
 -Pav

 



-- 
Fred Sauer
Developer Advocate
Google Inc. 1600 Amphitheatre Parkway
Mountain View, CA 94043
fre...@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: Error message on 64 bit system

2009-08-10 Thread Nick

You could download a 32-bit JRE, and then in eclipse remove the
default (64bit) and add the 32bit JRE System Library.

i have been using this method for awhile with a 64bit edition of
ubuntu; its quite easy !

On Aug 2, 10:24 am, ubuntu_user tie...@tiennguyen.net wrote:
 Hi All,
 I installed GWT using Eclipse 3.5. Tried to create the first blank
 app and I got thismessagewhen I ran it:

 Exception in thread main java.lang.UnsatisfiedLinkError: /myHome/bin/
 eclipse/plugins/
 com.google.gwt.eclipse.sdkbundle.linux_1.7.0.v200907291526/gwt-
 linux-1.7.0/libswt-pi-gtk-3235.so: /home/tienhn/bin/eclipse/plugins/
 com.google.gwt.eclipse.sdkbundle.linux_1.7.0.v200907291526/gwt-
 linux-1.7.0/libswt-pi-gtk-3235.so: wrong ELF class: ELFCLASS32
 (Possible cause: architecture word width mismatch)
         at java.lang.ClassLoader$NativeLibrary.load(Native Method)
         at java.lang.ClassLoader.loadLibrary0(Unknown Source)
         at java.lang.ClassLoader.loadLibrary(Unknown Source)
         at java.lang.Runtime.load0(Unknown Source)
         at java.lang.System.load(Unknown Source)
         at org.eclipse.swt.internal.Library.loadLibrary(Library.java:132)
         at org.eclipse.swt.internal.gtk.OS.clinit(OS.java:22)
         at org.eclipse.swt.internal.Converter.wcsToMbcs(Converter.java:63)
         at org.eclipse.swt.internal.Converter.wcsToMbcs(Converter.java:54)
         at org.eclipse.swt.widgets.Display.clinit(Display.java:126)
         at com.google.gwt.dev.SwtHostedModeBase.clinit
 (SwtHostedModeBase.java:82)
 Could not find the main class: com.google.gwt.dev.HostedMode.  Program
 will exit.

 I am on 64 bit platform; does GWT support 64 bit?

 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: At new item to a list at each position

2009-08-10 Thread Ian Bambury
Hi Tobe,
You seem to have changed from divs in the root panel to a widget, which is
probably the right way to go - depends on what you are doing, and you don't
say.

It does rather depend on how you are displaying things, and what you are
displaying. If there are columns (apart from the buttons) then are they
fixed-width or do they self-adjust? Are the items sorted in some way?

If you could give (even a theoretical) example of what this list consists
of, then it will be easier to answer. I suspect that the lack of response is
because people have too many possibilities in mind to comment

Ian

http://examples.roughian.com


2009/8/10 Tobe tobias.jungnic...@googlemail.com


 I'm currently trying to do it with a FlexTable, but the problem is
 that I don't know how I can find out if the user really clicked the
 button or just somewhere inside the table.

 On Aug 10, 3:41 pm, Tobe tobias.jungnic...@googlemail.com wrote:
  I don't really need to know how to create the Array. I already created
  a Vector of button and adding the buttons to the Vector. But my
  problem is that I don't know how to handle with it. How can I add the
  new div at the position behind the corresponding button on the
  RootPanel?
 
  On Aug 7, 5:22 pm, Tobe tobias.jungnic...@googlemail.com wrote:
 
 
 
   Hi,
   I have a list, which items are divs, and want the user to add new
   items at any position. So if there are 2 item there have to be 3
   button, one before the first, one between both and one after the last.
   Can somebody tell me how to create this array of buttons.
 


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



Re: GWT RPC

2009-08-10 Thread Pavel Byles
Hi Fred. I do do that.Here's a code sample:

ListCountry results = new ArrayListCountry();
try {
  Query query = pm.newQuery(Country.class);
  query.setOrdering(name asc);
  results = (ListCountry) query.execute();
} catch (... ...) {

}
return results;

On Mon, Aug 10, 2009 at 1:06 PM, Fred Sauer fre...@google.com wrote:

 Pavel,
 You still will need to copy the result set into a new collection, e.g. an
 ArrayList.

 Fred


 On Mon, Aug 10, 2009 at 6:54 AM, Pavel Byles pavelby...@gmail.com wrote:

 Fred,I have tried transferring a JDO enhanced class from server to
 client, to no avail. The error I get is the same as before:
 org.datanucleus.store.appengine.query.*StreamingQueryResult* cannot be
 cast  


 On Wed, Aug 5, 2009 at 3:43 PM, Fred Sauer fre...@google.com wrote:

 Let me know how it goes with the latest plugin and GWT 1.7.0.
 Just to be clear, JDO enhanced classes still won't pass round trip, even
 if they are in detached state. For that you still need to transfer some sort
 of DTO between client and server. However, if you just want to take a JDO
 class and transfer it one way, you can sort of get that to work.

 Fred


 On Wed, Aug 5, 2009 at 12:26 PM, Pavel Byles pavelby...@gmail.comwrote:

 Ok,
 this is great news. I will try this w/o your workaround and hope for the
 best.

 On Wed, Aug 5, 2009 at 12:21 PM, Fred Sauer fre...@google.com wrote:

 Pavel,
 Some of the annoyances have been cleaned up. The latest plugin takes
 care of some of that.

 The biggest thing left is how to deal with detachable 'bytecode
 enhanced' classes so that they can be sent round trip
 server-client-server. This has been discussed at length on the GWT user 
 +
 contributor forums. I think some good work is happening in this area to 
 make
 life easier.

 Fred


 On Wed, Aug 5, 2009 at 8:54 AM, Pavel Byles pavelby...@gmail.comwrote:

 Has there been any further word on the GWT bug that requires the
 following workaround:
 http://fredsa.allen-sauer.com/2009/04/1st-look-at-app-engine-using-jdo.html?
 Has this been fixed in 1.7?
 --
 -Pav





 --
 Fred Sauer
 Developer Advocate
 Google Inc. 1600 Amphitheatre Parkway
 Mountain View, CA 94043
 fre...@google.com








 --
 -Pav





 --
 Fred Sauer
 Developer Advocate
 Google Inc. 1600 Amphitheatre Parkway
 Mountain View, CA 94043
 fre...@google.com








 --
 -Pav





 --
 Fred Sauer
 Developer Advocate
 Google Inc. 1600 Amphitheatre Parkway
 Mountain View, CA 94043
 fre...@google.com




 



-- 
-Pav

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



Re: GWT RPC

2009-08-10 Thread Fred Sauer
Instead of casting the results:   results = (ListCountry) query.execute();

you'll need to copy the results into the array. Note that you never actually
use this array:
   ListCountry results = new ArrayListCountry();

To see what I mean try this:
   final ListCountry results = new ArrayListCountry();

HTH
Fred

On Mon, Aug 10, 2009 at 12:33 PM, Pavel Byles pavelby...@gmail.com wrote:

 Hi Fred. I do do that.Here's a code sample:

 ListCountry results = new ArrayListCountry();
 try {
   Query query = pm.newQuery(Country.class);
   query.setOrdering(name asc);
   results = (ListCountry) query.execute();
 } catch (... ...) {

 }
 return results;

 On Mon, Aug 10, 2009 at 1:06 PM, Fred Sauer fre...@google.com wrote:

 Pavel,
 You still will need to copy the result set into a new collection, e.g. an
 ArrayList.

 Fred


  On Mon, Aug 10, 2009 at 6:54 AM, Pavel Byles pavelby...@gmail.comwrote:

 Fred,I have tried transferring a JDO enhanced class from server to
 client, to no avail. The error I get is the same as before:
 org.datanucleus.store.appengine.query.*StreamingQueryResult* cannot be
 cast  


 On Wed, Aug 5, 2009 at 3:43 PM, Fred Sauer fre...@google.com wrote:

 Let me know how it goes with the latest plugin and GWT 1.7.0.
 Just to be clear, JDO enhanced classes still won't pass round trip, even
 if they are in detached state. For that you still need to transfer some 
 sort
 of DTO between client and server. However, if you just want to take a JDO
 class and transfer it one way, you can sort of get that to work.

 Fred


 On Wed, Aug 5, 2009 at 12:26 PM, Pavel Byles pavelby...@gmail.comwrote:

 Ok,
 this is great news. I will try this w/o your workaround and hope for
 the best.

 On Wed, Aug 5, 2009 at 12:21 PM, Fred Sauer fre...@google.com wrote:

 Pavel,
 Some of the annoyances have been cleaned up. The latest plugin takes
 care of some of that.

 The biggest thing left is how to deal with detachable 'bytecode
 enhanced' classes so that they can be sent round trip
 server-client-server. This has been discussed at length on the GWT 
 user +
 contributor forums. I think some good work is happening in this area to 
 make
 life easier.

 Fred


 On Wed, Aug 5, 2009 at 8:54 AM, Pavel Byles pavelby...@gmail.comwrote:

 Has there been any further word on the GWT bug that requires the
 following workaround:
 http://fredsa.allen-sauer.com/2009/04/1st-look-at-app-engine-using-jdo.html?
 Has this been fixed in 1.7?
 --
 -Pav





 --
 Fred Sauer
 Developer Advocate
 Google Inc. 1600 Amphitheatre Parkway
 Mountain View, CA 94043
 fre...@google.com








 --
 -Pav





 --
 Fred Sauer
 Developer Advocate
 Google Inc. 1600 Amphitheatre Parkway
 Mountain View, CA 94043
 fre...@google.com








 --
 -Pav





 --
 Fred Sauer
 Developer Advocate
 Google Inc. 1600 Amphitheatre Parkway
 Mountain View, CA 94043
 fre...@google.com








 --
 -Pav

 



-- 
Fred Sauer
Developer Advocate
Google Inc. 1600 Amphitheatre Parkway
Mountain View, CA 94043
fre...@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
-~--~~~~--~~--~--~---



Switched from gwt 1.5.3 to 1.7.0, now I can't compile

2009-08-10 Thread BenjaminBerry

Hello,

I've switched from 1.5.3 to 1.7.0 (needed IE8 support).

Now when I try to compile I get this stack trace:

 [java][ERROR] An internal compiler exception occurred
 [java] com.google.gwt.dev.jjs.InternalCompilerException:
Unexpected error during visit.
 [java] at com.google.gwt.dev.jjs.ast.JVisitor.translateException
(JVisitor.java:74)
 [java] at com.google.gwt.dev.jjs.ast.JModVisitor.accept
(JModVisitor.java:151)
 [java] at com.google.gwt.dev.jjs.ast.JMethodCall.traverse
(JMethodCall.java:122)
 [java] at
com.google.gwt.dev.jjs.ast.JModVisitor.acceptWithInsertRemove
(JModVisitor.java:162)
 [java] at com.google.gwt.dev.jjs.ast.js.JMultiExpression.traverse
(JMultiExpression.java:60)
 [java] at
com.google.gwt.dev.jjs.ast.JModVisitor.acceptWithInsertRemove
(JModVisitor.java:162)
 [java] at com.google.gwt.dev.jjs.ast.js.JMultiExpression.traverse
(JMultiExpression.java:60)
 [java] at com.google.gwt.dev.jjs.ast.JModVisitor.accept
(JModVisitor.java:132)
 [java] at com.google.gwt.dev.jjs.ast.JVisitor.accept
(JVisitor.java:81)
 [java] at
com.google.gwt.dev.jjs.ast.JExpressionStatement.traverse
(JExpressionStatement.java:42)
 [java] at
com.google.gwt.dev.jjs.ast.JModVisitor.acceptWithInsertRemove
(JModVisitor.java:162)
 [java] at com.google.gwt.dev.jjs.ast.JBlock.traverse(JBlock.java:
36)
 [java] at com.google.gwt.dev.jjs.ast.JModVisitor.accept
(JModVisitor.java:132)
 [java] at com.google.gwt.dev.jjs.ast.JVisitor.accept
(JVisitor.java:94)
 [java] at com.google.gwt.dev.jjs.ast.JIfStatement.traverse
(JIfStatement.java:53)
 [java] at
com.google.gwt.dev.jjs.ast.JModVisitor.acceptWithInsertRemove
(JModVisitor.java:162)
 [java] at com.google.gwt.dev.jjs.ast.JBlock.traverse(JBlock.java:
36)
 [java] at com.google.gwt.dev.jjs.ast.JModVisitor.accept
(JModVisitor.java:132)
 [java] at com.google.gwt.dev.jjs.ast.JVisitor.accept
(JVisitor.java:94)
 [java] at com.google.gwt.dev.jjs.ast.JForStatement.traverse
(JForStatement.java:66)
 [java] at
com.google.gwt.dev.jjs.ast.JModVisitor.acceptWithInsertRemove
(JModVisitor.java:162)
 [java] at com.google.gwt.dev.jjs.ast.JBlock.traverse(JBlock.java:
36)
 [java] at com.google.gwt.dev.jjs.ast.JModVisitor.accept
(JModVisitor.java:132)
 [java] at com.google.gwt.dev.jjs.ast.JVisitor.accept
(JVisitor.java:94)
 [java] at com.google.gwt.dev.jjs.ast.JMethodBody.traverse
(JMethodBody.java:52)
 [java] at com.google.gwt.dev.jjs.ast.JModVisitor.accept
(JModVisitor.java:132)
 [java] at com.google.gwt.dev.jjs.ast.JMethod.traverse
(JMethod.java:201)
 [java] at com.google.gwt.dev.jjs.ast.JModVisitor.accept
(JModVisitor.java:132)
 [java] at
com.google.gwt.dev.jjs.impl.DeadCodeElimination.execImpl
(DeadCodeElimination.java:1788)
 [java] at com.google.gwt.dev.jjs.impl.DeadCodeElimination.exec
(DeadCodeElimination.java:1761)
 [java] at com.google.gwt.dev.jjs.impl.MethodInliner.execImpl
(MethodInliner.java:522)
 [java] at com.google.gwt.dev.jjs.impl.MethodInliner.exec
(MethodInliner.java:500)
 [java] at
com.google.gwt.dev.jjs.JavaToJavaScriptCompiler.optimize
(JavaToJavaScriptCompiler.java:390)
 [java] at
com.google.gwt.dev.jjs.JavaToJavaScriptCompiler.precompile
(JavaToJavaScriptCompiler.java:333)
 [java] at com.google.gwt.dev.Precompile.precompile
(Precompile.java:300)
 [java] at com.google.gwt.dev.Compiler.run(Compiler.java:170)
 [java] at com.google.gwt.dev.Compiler$1.run(Compiler.java:124)
 [java] at com.google.gwt.dev.CompileTaskRunner.doRun
(CompileTaskRunner.java:88)
 [java] at
com.google.gwt.dev.CompileTaskRunner.runWithAppropriateLogger
(CompileTaskRunner.java:82)
 [java] at com.google.gwt.dev.Compiler.main(Compiler.java:131)
 [java] Caused by: java.lang.NullPointerException
 [java] at com.google.gwt.dev.jjs.impl.Simplifier.conditional
(Simplifier.java:181)
 [java] at com.google.gwt.dev.jjs.impl.Simplifier.conditional
(Simplifier.java:132)
 [java] at com.google.gwt.dev.jjs.impl.DeadCodeElimination
$DeadCodeVisitor.endVisit(DeadCodeElimination.java:266)
 [java] at com.google.gwt.dev.jjs.ast.JConditional.traverse
(JConditional.java:72)
 [java] at com.google.gwt.dev.jjs.ast.JModVisitor.accept
(JModVisitor.java:146)

I'm still trying to isolate the code that causes this on my end, but I
thought I'd post it now since I don't believe compile should ever fail
with an uncaught exception.

Any ideas/thoughts?

Benjamin

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
Google Web Toolkit group.
To post to this group, send email to Google-Web-Toolkit@googlegroups.com
To unsubscribe from this group, send email to 

Use of reserved words in JSON structure

2009-08-10 Thread Jeff Chimene

Hi,

I'm trying to implement an API that uses two JavaScript reserved words
in a JSON structure: public and private

Is there a clever JS technique to work-around this use of the reserved
word public?

Consider the following object

{addresses : {public: [],private:[]}

The following JSNI code fails missing name after . operator:

public final native ListString getPublicAddress() /*-{
return this.addresses.public;
}-*/;

public final native void setPublicAddress(String nextValue) /*-{
if (this.addresses.public.length = 0) {
this.addresses.public = new Array();
}
this.addresses.public.push(nextValue);
}-*/;



--~--~-~--~~~---~--~~
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: Style pretty

2009-08-10 Thread Jeff Chimene

arg value=-style/
arg value=PRETTY/

On 08/10/2009 09:55 AM, Ian Bambury wrote:
 Have you tried an extra
 
jvmarg value=-style PRETTY/
 
 or amended the existing tag to
 
arg value=-Xmx256M -style PRETTY/
 
 I haven't tried it, but surely one of those will work.
 
 Ian
 
 http://examples.roughian.com
 
 
 2009/8/10 Rado rrrado...@gmail.com mailto:rrrado...@gmail.com
 
 
 I can't figure out how to turn of -style pretty in compilation. Here
 is piece of build.xml file from gwt sample application:
 
 target name=gwtc depends=javac description=GWT compile to
 JavaScript
java failonerror=true fork=true
 classname=com.google.gwt.dev.Compiler
  classpath
pathelement location=src/
path refid=project.class.path/
  /classpath
  !-- add jvmarg -Xss16M or similar if you see a
 StackOverflowError --
  jvmarg value=-Xmx256M/
  !-- Additional arguments like -style PRETTY or -logLevel DEBUG
 --
  arg value=com.google.gwt.sample.showcase.Showcase/
/java
  /target
 
 what is the exact syntax for -syle pretty?
 I've tried to add line
arg value=-style PRETTY/
  but there was just compilation error about unknown argument.
 Can anybody send me exact line please?
 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: sizing ListBoxes inside container

2009-08-10 Thread El Mentecato Mayor

AFAIK, there's no way to do that, it's a limitation or bug that GWT
has.  If you do this (set a visible item count larger to what you know
it will fit in the page), it will work on IE, but not on Firefox:

VerticalPanel ui = new VerticalPanel();
  ui.setBorderWidth(1);
  ui.setHeight(100%);
  ui.setWidth(100%);
  ListBox box1 = new ListBox();
  box1.setSize(100%, 100%);
  box1.addItem(item1);
  box1.addItem(item 1.1);
  box1.setVisibleItemCount(100);
  ui.add(box1);
  ui.setCellHeight(box1, 20%);
  ListBox box2 = new ListBox();
  box2.addItem(item 2);
  box2.setSize(100%, 100%);
  box2.setVisibleItemCount(100);
  ui.add(box2);
  ui.setCellHeight(box2, 20%);
  ListBox box3 = new ListBox();
  box3.setSize(100%, 100%);
  box3.setVisibleItemCount(300);
  box3.addItem(item 3);
  ui.add(box3);
  ui.setCellHeight(box3, 60%);

Maybe a way to accomplish this is to get the size of the window, and
then divide it in whatever percentages, and then set the size in
pixels for each listBox.  You'll also need to have a
windowResizeListener to resize the listboxes when the window size
changes.


On Jun 14, 11:26 pm, otismo tomcat.subscript...@gmail.com wrote:
 I want to create a layout with 3 listboxes that are 20%, 20%, and 60%
 of the page height.

 I tried:
         ui = new VerticalPanel();
         ui.setStyleName(test);
         ui.setBorderWidth(3);
         ui.setHeight(100%);
         ui.setWidth(100%);
         ListBox box1 = new ListBox();
         box1.addItem(item1);
         box1.setHeight(20%);
         ui.add(box1);
         ui.setCellHeight(box1, 20%);
         ListBox box2 = new ListBox();
         ui.add(box2);
         ui.setCellHeight(box2, 20%);
         ListBox box3 = new ListBox();
         ui.add(box3);
         ui.setCellHeight(box3, 60%);

 The above code renders a table with the proper sizing, but the list
 boxes don't expand to fill their surrounding cells.

 I've also tried styling the list boxes with:
 .gwt-ListBox {
         width: 100%;
         height: 100%;

 }

 The width setting works but not the height.  Is there any way to get
 the height setting to work?  I know I can set the visible count on the
 list box, but I want the list box to resize dynamically.

 What I want can be done with css as follows:
 div
 select size=4 style=height: 20%; width:100%; 
   option value=item1item 1/option
 /select
 /div
 div
 select size=4 style=height: 20%; width:100%; 
   option value=item2item 2/option
 /select
 /div
 div
 select size=4 id=test2 style=height:60%;width:100%; 
   option value=item3item 3/option
 /select
 /div

 What am I doing wrong?  Thanks for any tips!

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



Browser independent javascript without bootstrap code?

2009-08-10 Thread Haitao

Is there a way for GWT to generate browser independent script without
loading the bootstrap code first? I understand this will hurt
performance a bit. I am trying to insert the generated code into a
gadget. If the gadget only contains bootstrap code, then after I
update my app and before the gadget container updates its copy of
gadget XML all users will still try to load the old xxx.nocache.js
files which are already gone.

--~--~-~--~~~---~--~~
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: float error message to client via InvocationException

2009-08-10 Thread bhomass

I am really surprised there is no taker for this posting. I thought
this would be a real common issue.
--~--~-~--~~~---~--~~
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: Use of reserved words in JSON structure

2009-08-10 Thread Jeff Chimene

On 08/10/2009 01:20 PM, Jeff Chimene wrote:
 Hi,
 
 I'm trying to implement an API that uses two JavaScript reserved words
 in a JSON structure: public and private
 
 Is there a clever JS technique to work-around this use of the reserved
 word public?
 
 Consider the following object
 
 {addresses : {public: [],private:[]}
 
 The following JSNI code fails missing name after . operator:
 
   public final native ListString getPublicAddress() /*-{
   return this.addresses.public;
   }-*/;
   
   public final native void setPublicAddress(String nextValue) /*-{
   if (this.addresses.public.length = 0) {
   this.addresses.public = new Array();
   }
   this.addresses.public.push(nextValue);
   }-*/;
 
 

Looks like this may be a Rhino problem. Here's a sample Rhino session

js x = eval(({addresses:{'public':[], 'private':[],fred:[]}}))
[object Object]

js print (x.addresses.fred)

js print (x.addresses.public)
js: stdin, line 26: missing name after . operator
js: print (x.addresses.public)
js: .^
js print (x.addresses.'public')
js print (x.addresses.public)
js: stdin, line 28: missing name after . operator
js: print (x.addresses.public)
js: ..^
js

feh.

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



Netbeans in Histed Mode : cache problem ?

2009-08-10 Thread nicorama

Hi,
I used GWT with Eclipse, and now with Netbeans 6.7.1 with GWT4NB (I
usually much prefer Netbeans).

I change my Html code from :

 body
script language=javascript src=org.gwtimport.Main/
org.gwtimport.Main.nocache.js/script
/body

to :
 body
div id=bobBlablabla/div
script language=javascript src=org.gwtimport.Main/
org.gwtimport.Main.nocache.js/script
/body


In Web mode, it works. In hosted mode, the 'Blablabla' never apperas.
Everything was ok with the Eclipse, but at every change, the
datanucleus stuff was working.

I've seen nothing useful in the GWT4NB forums, so it's maybe not a
problem related to the plug-in - maybe it how I use GWT.

Thanks for your help,
Nicolas

--~--~-~--~~~---~--~~
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: sizing ListBoxes inside container

2009-08-10 Thread Ian Bambury
It's nothing to do with GWT except that the VP is a table and the working
example is using divs.
Try something like this:

FlowPanel ui = new FlowPanel();
RootPanel.get().add(ui);
RootPanel.getBodyElement().getStyle().setProperty(margin, 0);

ui.setHeight(100%);
ui.setWidth(100%);

ListBox box1 = new ListBox();
box1.setHeight(20%);
box1.setWidth(100%);
box1.addItem(item1);
box1.setVisibleItemCount(100);
box1.getElement().getStyle().setProperty(display, block);
ui.add(box1);

ListBox box2 = new ListBox();
box2.setHeight(20%);
box2.setWidth(100%);
box2.addItem(item2);
box2.setVisibleItemCount(100);
box2.getElement().getStyle().setProperty(display, block);
ui.add(box2);

ListBox box3 = new ListBox();
box3.setHeight(60%);
box3.setWidth(100%);
box3.addItem(item3);
box3.setVisibleItemCount(100);
box3.getElement().getStyle().setProperty(display, block);
ui.add(box3);

Ian

http://examples.roughian.com


2009/8/10 El Mentecato Mayor rogelio.flo...@gmail.com


 AFAIK, there's no way to do that, it's a limitation or bug that GWT
 has.  If you do this (set a visible item count larger to what you know
 it will fit in the page), it will work on IE, but not on Firefox:

 VerticalPanel ui = new VerticalPanel();
  ui.setBorderWidth(1);
   ui.setHeight(100%);
  ui.setWidth(100%);
  ListBox box1 = new ListBox();
   box1.setSize(100%, 100%);
  box1.addItem(item1);
  box1.addItem(item 1.1);
  box1.setVisibleItemCount(100);
   ui.add(box1);
  ui.setCellHeight(box1, 20%);
  ListBox box2 = new ListBox();
   box2.addItem(item 2);
  box2.setSize(100%, 100%);
  box2.setVisibleItemCount(100);
   ui.add(box2);
  ui.setCellHeight(box2, 20%);
  ListBox box3 = new ListBox();
   box3.setSize(100%, 100%);
  box3.setVisibleItemCount(300);
  box3.addItem(item 3);
   ui.add(box3);
  ui.setCellHeight(box3, 60%);

 Maybe a way to accomplish this is to get the size of the window, and
 then divide it in whatever percentages, and then set the size in
 pixels for each listBox.  You'll also need to have a
 windowResizeListener to resize the listboxes when the window size
 changes.


 On Jun 14, 11:26 pm, otismo tomcat.subscript...@gmail.com wrote:
  I want to create a layout with 3 listboxes that are 20%, 20%, and 60%
  of the page height.
 
  I tried:
  ui = new VerticalPanel();
  ui.setStyleName(test);
  ui.setBorderWidth(3);
  ui.setHeight(100%);
  ui.setWidth(100%);
  ListBox box1 = new ListBox();
  box1.addItem(item1);
  box1.setHeight(20%);
  ui.add(box1);
  ui.setCellHeight(box1, 20%);
  ListBox box2 = new ListBox();
  ui.add(box2);
  ui.setCellHeight(box2, 20%);
  ListBox box3 = new ListBox();
  ui.add(box3);
  ui.setCellHeight(box3, 60%);
 
  The above code renders a table with the proper sizing, but the list
  boxes don't expand to fill their surrounding cells.
 
  I've also tried styling the list boxes with:
  .gwt-ListBox {
  width: 100%;
  height: 100%;
 
  }
 
  The width setting works but not the height.  Is there any way to get
  the height setting to work?  I know I can set the visible count on the
  list box, but I want the list box to resize dynamically.
 
  What I want can be done with css as follows:
  div
  select size=4 style=height: 20%; width:100%; 
option value=item1item 1/option
  /select
  /div
  div
  select size=4 style=height: 20%; width:100%; 
option value=item2item 2/option
  /select
  /div
  div
  select size=4 id=test2 style=height:60%;width:100%; 
option value=item3item 3/option
  /select
  /div
 
  What am I doing wrong?  Thanks for any tips!
 
  Peter
 


--~--~-~--~~~---~--~~
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: Modelling framework

2009-08-10 Thread ckendrick

For SmartGWT Pro and EE go here:

http://www.smartclient.com/smartgwt/

For LGPL go here:

http://code.google.com/p/smartgwt/

On Aug 5, 8:02 am, tall dave da...@lorgeousdays.com wrote:
 is it still possible to download the non-Pro/EE version of SmartGWT?
 the page at:

 http://www.smartclient.com/smartgwt/download.jsp

 isn't working.

 On Aug 4, 9:16 pm, ckendrick charles.kendr...@gmail.com wrote:

  We do give you the ability get in and override any part of the
  generated SQL as a Velocity template.  Simple example:

     http://www.smartclient.com/smartgwtee/showcase/#large_valuemap_sql

  Tour de force (dynamic reporting with filter, sort and data paging, no
  server code required):

     http://www.smartclient.com/smartgwtee/showcase/#sql_dynamic_reporting

  I think that would cover you for lot of use cases.  If there's
  something more we should be doing here I'd love to know.

  Note that we also have upcoming support for XML DB (Berkeley OSS and
  Oracle flavors).  It's just another type of DataSource, which
  generates XQuery instead of SQL.
--~--~-~--~~~---~--~~
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: Deferred binding for mobile browser support

2009-08-10 Thread Sumit Chandel
Hi Michael,
If you could elaborate a little more on which part of deferred binding
you're not sure about, that would help pinpoint the problem you're having
and setup deferred binding code for your mobile browser target.

In general, however, the way deferred binding works is by defining the rules
for the deferred binding using replacement (see doc link below), creating
the default and the mobile classes that should be used for the desktop
browser and mobile browser versions of your widget, respectively, and then
creating your widget via the GWT.create(MyWidget.class) call to have the
compiler create bindings for the mobile target.

Deferred Binding using Replacement:
http://code.google.com/webtoolkit/doc/1.6/DevGuideCodingBasics.html#DevGuideDeferredBinding

For an example, check out the inner workings of the PopupPanel widget.
You'll notice that the PopupImpl instance belonging to the PopupPanel class
is created using the GWT.create(PopupImpl.class) call. Looking at the
deferred binding rules for the PopupPanel in the Popup.gwt.xml file
(contained in the gwt-user.jar), you'll see that the following rules are
defined:

  !-- Fall through to this rule is the browser isn't IE or Mozilla --
  replace-with class=com.google.gwt.user.client.ui.impl.PopupImpl
when-type-is class=com.google.gwt.user.client.ui.impl.PopupImpl/
  /replace-with

  !-- Mozilla needs a different implementation due to issue #410 --
  replace-with class=com.google.gwt.user.client.ui.impl.PopupImplMozilla
when-type-is class=com.google.gwt.user.client.ui.impl.PopupImpl/
any
  when-property-is name=user.agent value=gecko/
  when-property-is name=user.agent value=gecko1_8/
/any
  /replace-with

You could essentially follow the same pattern for the mobile version of
MyWidget.class, perhaps creating a MyWidget.gwt.xml file to contain the
deferred binding rules.

Hope that helps,
-Sumit Chandel

On Tue, Aug 4, 2009 at 3:38 AM, grue michael.gruetz...@googlemail.comwrote:


 Hi,

 I have to add a mobile-optimized version to an existing gwt
 application. After digging through the docs I found out that deferred
 binding is the technology of chioce. I believe I understand how it
 basically works but how do I use it in that specific use case?
 The mobile UI of our application differs a lot from the standard
 version so I need seperate stylesheets, and seperate GWT controls (we
 use composites a lot). Since the basic layout of our application is
 done in the .html file I would also need a separate html file.
 Now the question is: how do I do that? Are there any best practices?

 I'd really appreciate any hint.

 Best regards,
 Michael
 


--~--~-~--~~~---~--~~
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 fetch multiple field from appengine datastore

2009-08-10 Thread Sumit Chandel
Hi buzz_buzz,
You could create a lightweight data transfer object (DTO) that could contain
the information that you're interested in getting across the wire in your
RPC call. For example, the getStocks() method signature could be changed to:

public StockDataTransferObject[] getStocks() throws NotLoggedInException {
  ...
  ListStockDataTransferObject stockDTOs = new
ArrayListStockDataTransferObject();
  try {
...
ListStock stocks = (ListStock) q.execute(getUser());
for(Stock stock : stocks) {
  stockDTOs.add(new StockDataTransferObject(stock.getSymbol(),
stock.getOtherData()));
}

  } finally {
...
  }
  return (StockDataTransferObject[]) stockDTOs.toArray(new
StockDataTransferObject[0]);
}

Hope that helps,
-Sumit Chandel

On Thu, Aug 6, 2009 at 9:36 PM, buzz_buzz zinkr...@gmail.com wrote:


 i am new with GWT. i successfully try compile and upload stockwatcher
 application to the google app engine. i alsoa can save and query all
 data save in the data store. recently i add 1 more field at stock app
 engine data store. i add symbol2. user can save 2 symbol. the problem
 is. i dont know how can i extract symbol2 field. Tutorial provided by
 google only show extract 1 field only. how can i extract/query more
 than 1 field. please help.

 Attached code from stockwatcher at server side (StockServiceImpl): -

  public String[] getStocks() throws NotLoggedInException {
checkLoggedIn();
PersistenceManager pm = getPersistenceManager();
ListString symbols = new ArrayListString();
try {
  Query q = pm.newQuery(Stock.class, user == u);
  q.declareParameters(com.google.appengine.api.users.User u);
  q.setOrdering(createDate);
  ListStock stocks = (ListStock) q.execute(getUser());
  for (Stock stock : stocks) {
symbols.add(stock.getSymbol());
  }
} finally {
  pm.close();
}
return (String[]) symbols.toArray(new String[0]);
  }


 its clearly the code only extract 1 field. how to extract another
 field.. 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: Enhancing Data Classes jpa only?

2009-08-10 Thread Sumit Chandel
Hi asianCoolz,
Is there online documentation suggesting that JDO does not require
enhancement? If so, please send us the link and I would be happy to get it
fixed.

Cheers,
-Sumit Chandel

On Thu, Aug 6, 2009 at 11:46 PM, asianCoolz second.co...@gmail.com wrote:


 Only JPA required to do Enhancing Data Classes , JDO , not required ?
 why?
 


--~--~-~--~~~---~--~~
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: Future of GWT

2009-08-10 Thread Sumit Chandel
Hi all,
Google Wave is also built using GWT. You can also find other applications,
both developed by developers in the community and developers at Google, on
the GWT Gallery.

GWT Gallery:
http://gwtgallery.appspot.com/

http://gwtgallery.appspot.com/Cheers,
-Sumit Chandel

On Mon, Aug 10, 2009 at 10:26 AM, Arthur Kalmenson arthur.k...@gmail.comwrote:


 The new AdWords UI is built fully with GWT (as Ray mentioned during
 his presentation). Since AdWords is Google's main money generator, I
 don't think GWT will die any time soon. But as others mentioned, this
 an issue with any library that you need to consider, but in this case
 I don't think it's that big of a concern.

 Regards,
 --
 Arthur Kalmenson



 On Fri, Aug 7, 2009 at 9:48 AM, transientjnuno.em...@gmail.com wrote:
 
  Hi everybody,
 
  I've always feared technologies that work the way GWT does, because if
  GWT stops being updated everything built on it will stop working if
  users keep updating their browsers. I mean, if I develop an
  application with GWT 1.7, which supports FF3.5 for instance and then
  GWT stops being developed and FF4 comes out and some of the features
  are broken there's nothing I can do to solve it except going native on
  that feature.
 
  What do you think of this? What makes you not fear this? I know having
  Google behind should be a pretty good guarantee but who knows...
  Obviously this concern has no meaning if your customer asks you to
  develop an application up to a specific browser version, this way
  you're only responsible to support this version, but what if you're
  developing for the web, which users you can't control, do you trust
  GWT?
 
  Thank you for your opinion!
 
  Best regards
 
  
 

 


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



Button Focus on mac

2009-08-10 Thread Ana Maria

Hi!
I have a vertical panel with one textbox and 4 buttons and I want to
be able to use the tab key to change from one button to the other. I
tried btnName.setTabIndex(n); with n from 2 to 5 for the button
(textbox indextab=1). It doesn't work. I tried it in the hosted
browser, safari 4.0.1 and firefox 3.0.13. The focus is not set to any
button, and if I set it by clicking on one of them, when I press tab
the focus goes to the browser navigation elements and then to the
textbox , never to the buttons.
I'm using gwt 1.7 with Mac X 10.5.7
Is this a Mac problem? are there any know solutions?
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
-~--~~~~--~~--~--~---



Multiple GWT Entry Points with URL Filtering

2009-08-10 Thread davis

Hi, I searched the group on this topic, and read some posts where
people had questions on how to do this.  I'm not sure I've discovered
the *best* way, but I think I found a way that works pretty well.

As an example, this is useful if you want to have a separate GWT entry
point for an Admin application that is hosted at a different URL.

I posted the details on my blog: http://zenoconsulting.wikidot.com/blog:16

...with a sample maven project that can be used as a skeleton.  Hope
someone finds it useful.

Regards,
Davis
--~--~-~--~~~---~--~~
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
-~--~~~~--~~--~--~---



Java To Java RPC

2009-08-10 Thread steven a

Hi,

Is it possible to call the GWT RPC Server from an remote Java client,
instead of from GWT client?

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



java.lang.IllegalStateException: Should only call onDetach when the widget is attached to the browser's document

2009-08-10 Thread Guess What

I am trying to draw a comboBox using EXT GWT . My issue is i get an
illegalStateException when i do the following code .

 final ComboBoxCountryState combo = new ComboBox CountryState 
();
combo.setEmptyText(Select a Country...);
combo.setDisplayField(value);
combo.setStore(countryStateStore);   //At this Stage the Store
Value is empty , if i dont do this it throws an exception
combo.setTypeAhead(true);

myService.loadCountryState(
new HelpAsyncCallbackListCountrySate() {
@Override
public void onSuccess(List CountrySate 
 obj) {
GWT.log(obj is +obj, null);
countryStateStore.add(obj);

combo.setStore(countryStateStore);


}
});

//I do not want to push the the following 2 line of code in the
loadCountryState method . I am not sure whats causing the exception
vp.add(new HTML(SELECT Country LIST));
vp.add(combo);//

Vp : Vertical Panel . I think this is what is happening , maybe even
before the async Value is returned , these two lines of code are
drawn . At this point the combo box gets painted with maybe empty
store . Maybe I am wrong .




vp.add(new HTML(SELECT FAVORITES LIST));
vp.add(combo);

--~--~-~--~~~---~--~~
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: decide zoom level from multiple points

2009-08-10 Thread lumo
thanks for your hint, i will use getBoundsZoomLevel()

previously i had something like this:
LatLng point1 = LatLng.newInstance(minLatitude, minLongitude);
LatLng point2 = LatLng.newInstance(maxLatitude, maxLongitude);
double distance = point1.distanceFrom(point2);
int zoomLevel = new GZoomLevels().getZoomLevelForDistance(distance);

public class GZoomLevels {
ListInteger meters = new ArrayListInteger();

public GZoomLevels() {
meters.add(1000); // 0
meters.add(500); // 1
meters.add(300); // 2
meters.add(200); // 3
meters.add(100); // 4
meters.add(50); // 5
meters.add(20); // 6
meters.add(10); // 7
meters.add(5); // 8
meters.add(2); // 9
meters.add(1);  // 10
meters.add(5000); // 11
meters.add(2000); // 12
meters.add(1000); // 13
meters.add(500); // 14
meters.add(200); // 15
meters.add(150); // 16
meters.add(100); // 17
meters.add(50); // 18
meters.add(20); // 19
}

public int getZoomLevelForDistance(Double distandeInMeters) {
int zoomLevel = 0;
if (distandeInMeters.intValue()==0) {
return 19;
}
for (int i = 0; i  meters.size(); i++) {
if (meters.get(i) = distandeInMeters.intValue()) {
zoomLevel = i + 2;
break;
}
}
return zoomLevel;
}
}

but using foreign code is preferred in many ways :)
thanks for your hint!

2009/8/10 Michael W mwang_2...@yahoo.com


 I had a blog for Google map auto zoom.

 http://michaeltechzone.blogspot.com/2008/12/google-maps-api-dynamically-calculate_31.html
 There is example of using it: http://www.allhotelmotel.com

 For GWT,
 you can reference bestFitWithCenter method and apply to your GWT
 module.

 I used it for my client new site, in hotel search result page map view
 tab.
 http://www.holidayinn.com/hotels/us/en/reservation


 On Aug 10, 1:59 am, lumo lumo2...@gmail.com wrote:
  Hello NG!
 
  i am painting multiple markers on a map and need to change the zoom
  level afterward so the user can see all of the markers in the viewing
  area.
  i already calculate the center position right, but deciding the zoom
  level brings me to a problem.
 
  how can i calculate which zoom level i need? is there a special sense
  behind the levels?
 
  i found an article about the scale of the levels, but i am not sure if
  this is correct...http://laudontech.com/GISBlog/?p=28
  would be great if someone can bring light into this (for me)
 
  thanks a lot in advance
  lumo
 


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



[gwt-contrib] Re: insertPanel interface

2009-08-10 Thread Miroslav Pokorny

It's a difficult juggling act, balancing the need to have interfaces  
fir everything and the practical value in actually doing it. I recall  
rwading/listening to something Josh Bloch said about why there are not  
any read only collection interfaces Vs the way it was done and what we  
have today. Why do I bring this up - mainly because there are  
similarities in both cases. It's not always a good thing to have  
interfaces describing all contracts for a panel, just like perhaps it  
didn't make sense to have UnreadableList etc...

Unfortunately writing code is about these sorts of nuances - I like to  
think of them like the annoying mozzies one gets in the summer.  
Summer, the beach etc are all great ( like gwt) but sometimes there's  
a mozzie buzzing around.

On 10/08/2009, at 12:14 AM, Ed post2edb...@hotmail.com wrote:


 Hi  Miroslav
 Thanks for the feedback.
 You make a good point there about the increase in the amount of
 javascript due to the interface..
 I wasn't aware of that and would love to hear about this.

 It makes you wonder what is better. I mean: using these interfaces
 also safes code as I can re-use code that works agains different
 implementations, I think it's better progamming,  overcomes code
 duplication and reduces bugs...  But at the other end the amount of
 code increases...

 

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



[gwt-contrib] Re: New GWT RPC project: gwt-rpc-plus

2009-08-10 Thread Matt Mastracci

David,

The new RPC framework in the library currently suffers from the  
reference limits of Thrift itself, which are 'no self or forward  
references'.  This effectively limits the object nesting depth.  
Additionally, all the de/serialization is done via native primitives  
which seem to handle larger structures well.

You don't necessarily have to use Thrift here. I do have some old code  
(which hasn't been imported here yet unfortunately) that generate  
client side API stubs that can receive standard API calls made by  
other client code. I'll dig it up and unrot it. I had completely  
forgotten about that code until now. By pairing the code with a cross  
module transport (function call, postMessage or location hash), you'll  
be able to communicate between two modules using code that looks  
identical to standard RPC.

On 2009-08-09, at 11:56 PM, David david.no...@gmail.com wrote:


 Matthew,

 Now you got me interested! I currently have some JSNI code to
 communicate between different modules, I would love to take this out
 and replace it with something RPC style.

 Can your RPC library handle complex structures (where the current 1.x
 GWT RPC layers gives stackoverflow or out of memory) ?

 David

 Note that we'll be doing some cool stuff with our library in the
 future that we can't easily do with GWT RPC, like generating raw
 Javascript bindings for third-party developers to interface with our
 API and using it for module-to-module cross-domain communication.

 On Aug 9, 1:00 am, Miroslav Pokorny miroslav.poko...@gmail.com
 wrote:
 @Matt

 I was just wondering if it were possible to specify a concrete  
 substitute
 for an interface type - this would this help solve the too many  
 serializer
 problem. By too many Serializers i mean of course the need for the
 generator to create Serializers for all concrete types  
 implementing List
 etc.

 Service {

@Annotation(java.util.ArrayList.class);
 ListType method( int parameter );

 }

 In the above case no matter what type of List the server sent, the  
 client
 would always get an ArrayList.

 Naturally the same annotation would appear on value types with List
 properties. Perhaps something similar could be used to whitelist  
 sub class
 serializer generation.

 Comments ?

 On Sun, Aug 9, 2009 at 4:53 AM, Matt Mastracci  
 matt...@mastracci.comwrote:





 Bart,

 One principle of design for the alternate RPC framework in this
 library was reducing the number of non-JSO classes generated in the
 final output, at the expense of developer convenience and
 flexibility.  At one point, RPC classes and serializers were  
 nearing
 20% of our compiled output.

 By reducing some of the flexibility of RPC (ie, with machine built
 overlay types and collections that implement just enough to get  
 by),
 we can effectively reduce the RPC footprint in terms of wire size,
 code size and serialization/deserialization time.

 Note that bobv's direct-eval RPC branch should come with its own
 significant performance gains and code/wire size reductions. It  
 may be
 worth investigating the performance of trunk for your specific  
 case as
 well.  Of course, if GWT RPC is sufficient for your use, you can
 always use this library to add cross-domain transport of RPC  
 payloads
 or add out-of-band context to the request/response data.

 I'd be interested in hearing any thoughts or suggestions you  
 might have.

 Thanks,

 Matt.

 On 2009-08-08, at 10:16 AM, Bart Guijt bgu...@gmail.com wrote:

 To me this sounds *very* interesting. Makes me want to find out  
 all
 the details why GWT-RPC is as it is, if the simpler JS collections
 improve upon performance, memory footprint and (permutation)  
 code size
 etc. Efforts like this might have a big impact on mobile GWT
 applications, which are my primary interest.

 Checking the sources out right now :-)

 Bart Guijt
 E: bgu...@gmail.com
 T: +31 6 30408987

 Check out my blog:http://bart.guijt.me/blog/

 A pizza with the radius 'z' and thickness 'a' has the volume
 pi*z*z*a

 On 8 aug 2009, at 8 aug, 04:58, Matt Mastracci wrote:

 Hey all,

 We've been working on a number of RPC enhancements locally and
 thought
 that it might be helpful to open-source some of them (prompted  
 by a
 recent suggestion from Ray Cromwell).  I've created a new  
 Google Code
 project that encapsulates them here:

 http://code.google.com/p/gwt-rpc-plus/

 It's an umbrella project for a number of RPC enhancements that  
 we're
 using.  It includes a set of building blocks and some higher- 
 level
 code that builds on them to enhance the current GWT RPC
 functionality:

 1.  A set of 'bare-metal', strongly-typed JS collections  
 optimized
 for
 both RPC and client-side use.  These collections are designed to
 mimic
 (but not fully support) the interfaces of the standard Java  
 List, Map
 and Set.  They are code-generated and based on JavaScriptObject  
 (see
 here:http://code.google.com/p/gwt-rpc-plus/source/browse/#svn/ 
 

[gwt-contrib] Re: Initial implementation of layout system, along with the first two layout widgets.

2009-08-10 Thread Amir Kashani
Joel,
I love how this is turning out so far, great work. While this system handles
a vast majority of layout situations, correct me if I'm wrong, but I think
it breaks down with non-100% height layouts that require a footer. An
example: a header area, followed by a horizontally split content area (body
and side nav), followed by a footer. I can't think of a way you could
represent this using absolute positioning that would guarantee the footer
area isn't encroached upon.

Any thoughts on how LayoutPanel would handle this? Maybe this doesn't fall
under desktop-like layouts and it's handled with floats (which aren't so
terrible in this particular case)?

- Amir

On Mon, Aug 3, 2009 at 12:13 PM, j...@google.com wrote:


 Reviewers: jlabanca,



 Please review this at http://gwt-code-reviews.appspot.com/51830

 Affected files:
   A layout/Layout.gwt.xml
   A layout/client/Layout.java
   A layout/client/LayoutImpl.java
   A layout/client/LayoutImplIE6.java
   A layout/client/UserAgent.java
   A user/client/ui/HasAnimatedLayout.java
   A user/client/ui/HasLayout.java
   A user/client/ui/LayoutComposite.java
   A user/client/ui/LayoutPanel.java
   A user/client/ui/RootLayoutPanel.java
   M user/client/ui/Widget.java



 


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



[gwt-contrib] Re: Extending ValueChangeEvent

2009-08-10 Thread Joel Webber
I wasn't directly involved in writing these classes, but having each
subclass' getAssociatedType() be final seems a bit overzealous to me. If you
want to subclass it (which doesn't seem unreasonable), it seems like you'd
*need* to override this method.
@Ray, John: Do either of you recognize any obvious utility in making this
method final? If not, I think it should be made non-final across all event
types.

On Sat, Aug 8, 2009 at 3:51 PM, jarrod jarrod.carl...@gmail.com wrote:


 Why is the getAssociatedType() method on ValueChangeEvent considered
 final? I'd like to be able to extend this event, but I can't extend it
 if I can't override getAssociatedType().

 Let me explain:

 I'm writing a module that is designed to be a base for a slew of other
 expanded versions of the module, keeping much of the core
 functionality locked up in a core module and expanding as necessary
 through additional modules.

 To be specific, this is a video player module, so some core events
 might be PlayEvent or ValueChangeEvent when the currently playing URL
 changes. Those events should always be generated by the core, but add-
 on modules should be able to respond to those events.

 In order to prevent the add-on modules and core components from
 needing to know about each other and adding ***Handlers to all the
 various Has***Handlers in the application, I created a central
 Dispatcher that can register and fire any events - a sort of global
 event bus for all events to come in and get dispatched from.

 It works well, but because ValueChangeEvent is generic, I can only
 implement HasValueChangeHandlers for one type on my central
 dispatcher. As it turns out, I need at least two types, and Handlers
 are only interested in one or the other.

 To register for the right event, I coded this:

private static MapInteger, Object TYPES = new HashMapInteger,
 Object();

@SuppressWarnings(unchecked)
public static T TypeModelHandlerT getType(ClassT clazz) {
Integer key = clazz.hashCode();
if (!ModelChangeEvent.TYPES.containsKey(key)) {
TypeModelHandlerT type = new
 TypeModelHandlerT();
ModelChangeEvent.TYPES.put(key, type);
}
return (TypeModelHandlerT)
 ModelChangeEvent.TYPES.get(key);
}

 So you can register for ValueChangeEvents pertaining to a given class
 type.

 However, I need to override getAssociatedType() to do the following:

@SuppressWarnings(unchecked)
@Override
public TypeValueChangeHandlerT getAssociatedType() {
// TODO: Add null check
Integer key = getValue().getClass().hashCode();
return (TypeValueChangeHandlerT)
 ModelChangeEvent.TYPES.get
 (key);
}


 So this limits my ability to reuse the ValueChangeHandler on a more
 global scope without copy/pasting the class... Unless I am just
 completely distorting the point of the new 1.6 event system...

 Help?
 


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



[gwt-contrib] Re: Extending ValueChangeEvent

2009-08-10 Thread John LaBanca
I believe the problem is that if you extend ValueChangeEvent and
ValueChangeHandler, you can then call
Widget#addHandler(mySubValueChangeHandler, ValueChangeEvent.getType()),
creating a mismatch because you are associating a SubValueChangeHandler with
the ValueChangeEvent type.  While I don't think this will cause technically
any problems, it can lead to a little confusion because if you fire a
SubValueChangeEvent, your handler will not fire.

Still, I think we can just javadoc that and take off the final modifier.

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


On Mon, Aug 10, 2009 at 9:54 AM, Joel Webber j...@google.com wrote:

 I wasn't directly involved in writing these classes, but having each
 subclass' getAssociatedType() be final seems a bit overzealous to me. If you
 want to subclass it (which doesn't seem unreasonable), it seems like you'd
 *need* to override this method.
 @Ray, John: Do either of you recognize any obvious utility in making this
 method final? If not, I think it should be made non-final across all event
 types.


 On Sat, Aug 8, 2009 at 3:51 PM, jarrod jarrod.carl...@gmail.com wrote:


 Why is the getAssociatedType() method on ValueChangeEvent considered
 final? I'd like to be able to extend this event, but I can't extend it
 if I can't override getAssociatedType().

 Let me explain:

 I'm writing a module that is designed to be a base for a slew of other
 expanded versions of the module, keeping much of the core
 functionality locked up in a core module and expanding as necessary
 through additional modules.

 To be specific, this is a video player module, so some core events
 might be PlayEvent or ValueChangeEvent when the currently playing URL
 changes. Those events should always be generated by the core, but add-
 on modules should be able to respond to those events.

 In order to prevent the add-on modules and core components from
 needing to know about each other and adding ***Handlers to all the
 various Has***Handlers in the application, I created a central
 Dispatcher that can register and fire any events - a sort of global
 event bus for all events to come in and get dispatched from.

 It works well, but because ValueChangeEvent is generic, I can only
 implement HasValueChangeHandlers for one type on my central
 dispatcher. As it turns out, I need at least two types, and Handlers
 are only interested in one or the other.

 To register for the right event, I coded this:

private static MapInteger, Object TYPES = new HashMapInteger,
 Object();

@SuppressWarnings(unchecked)
public static T TypeModelHandlerT getType(ClassT clazz) {
Integer key = clazz.hashCode();
if (!ModelChangeEvent.TYPES.containsKey(key)) {
TypeModelHandlerT type = new
 TypeModelHandlerT();
ModelChangeEvent.TYPES.put(key, type);
}
return (TypeModelHandlerT)
 ModelChangeEvent.TYPES.get(key);
}

 So you can register for ValueChangeEvents pertaining to a given class
 type.

 However, I need to override getAssociatedType() to do the following:

@SuppressWarnings(unchecked)
@Override
public TypeValueChangeHandlerT getAssociatedType() {
// TODO: Add null check
Integer key = getValue().getClass().hashCode();
return (TypeValueChangeHandlerT)
 ModelChangeEvent.TYPES.get
 (key);
}


 So this limits my ability to reuse the ValueChangeHandler on a more
 global scope without copy/pasting the class... Unless I am just
 completely distorting the point of the new 1.6 event system...

 Help?
 



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



[gwt-contrib] Patch for issue 1112 (Add InsertPanel interface)

2009-08-10 Thread jgw

Reviewers: Ray Ryan,



Please review this at http://gwt-code-reviews.appspot.com/57808

Affected files:
   M user/src/com/google/gwt/user/client/ui/AbsolutePanel.java
   M user/src/com/google/gwt/user/client/ui/DeckPanel.java
   M user/src/com/google/gwt/user/client/ui/FlowPanel.java
   M user/src/com/google/gwt/user/client/ui/HorizontalPanel.java
   A user/src/com/google/gwt/user/client/ui/InsertPanel.java
   M user/src/com/google/gwt/user/client/ui/StackPanel.java
   M user/src/com/google/gwt/user/client/ui/VerticalPanel.java



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



[gwt-contrib] Re: Extending ValueChangeEvent

2009-08-10 Thread John Tamplin
On Mon, Aug 10, 2009 at 10:26 AM, John LaBanca jlaba...@google.com wrote:

 I believe the problem is that if you extend ValueChangeEvent and
 ValueChangeHandler, you can then call
 Widget#addHandler(mySubValueChangeHandler, ValueChangeEvent.getType()),
 creating a mismatch because you are associating a SubValueChangeHandler with
 the ValueChangeEvent type.  While I don't think this will cause technically
 any problems, it can lead to a little confusion because if you fire a
 SubValueChangeEvent, your handler will not fire.

 Still, I think we can just javadoc that and take off the final modifier.


This could be useful in that you could register a change handler that takes
a superclass event, and register it for some number of specific subclasses
that you want to handle.

Ideally, there would be a way to register a handler for all subclasses as
well, ie:

  addHandler(ValueChangeHandlerFooSuper handler, FooSuper.getType());

and it would get triggered on FooSub1, FooSub2, etc as well.

-- 
John A. Tamplin
Software Engineer (GWT), Google

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



[gwt-contrib] Re: PopupPanel.center() places large content partially off-screen

2009-08-10 Thread Joel Webber
Thanks, Isaac. I'll try and get to it today.

On Sat, Aug 8, 2009 at 4:48 PM, Isaac Truett itru...@gmail.com wrote:

 Joel,

 Same fix, but with a unit test.

 - Isaac

 On Tue, Aug 4, 2009 at 9:25 PM, Isaac Truettitru...@gmail.com wrote:
  Joel,
 
  The patch is attached. I wanted to write you a JUnit test to go with
  it, but I'm having trouble even getting the existing tests to run. I
  did verify this fix manually.
 
  Thanks,
  Isaac
 
  On Tue, Aug 4, 2009 at 3:22 PM, Isaac Truettitru...@gmail.com wrote:
  Thanks, Joel. I'll see if I can put something together tonight.
 
  On Tue, Aug 4, 2009 at 3:12 PM, Joel Webberj...@google.com wrote:
  Sounds like a bug to me. It's hard to imagine how this behavior could
 be
  considered useful. I would assume the appropriate behavior would be to
  center, but keep the top-[left right] on the screen, depending upon the
 RTL
  mode. Can anyone see a problem with this?
  @Isaac: If you feel like writing up a patch, I'd be happy to review.
 
  On Tue, Aug 4, 2009 at 2:49 PM, Isaac Truett itru...@gmail.com
 wrote:
 
  I've just noticed that when the content of a PopupPanel grows larger
  then the browser window, center() can position the panel with a
  negative top/left, making part of the panel unreachable (the window
  won't scroll up or left anymore to see the off-screen portion). Is
  this considered a feature of the center() method? If so, would
  people be open to adding an overloaded center(boolean
  dontGoOutOfBounds) that would keep the top and left from going
  negative, assuming a better name for the argument could be found?
 
  - Isaac
 
 
 
 
   
 
 
 


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



[gwt-contrib] Re: Patch for issue 1112 (Add InsertPanel interface)

2009-08-10 Thread rjrjr

On 2009/08/10 14:37:10, jgw wrote:


Does this address the problems Scott noted in the issue tracker, or did
you decide they're livable? Is there a test we can extend to cover this
case if not?

Quoth he:

I tried a few variations of adding/inserting an already attached child.
I found
one that raises IndexOutOfBoundsException:

 AbsolutePanel absolutePanel = new AbsolutePanel();
 absolutePanel.setPixelSize(100, 100);
 Label label = new Label(label);

 RootPanel.get().add(absolutePanel);

 absolutePanel.add(label, 10, 10);
 absolutePanel.add(label, 10, 10); // exception


http://gwt-code-reviews.appspot.com/57808

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



[gwt-contrib] [google-web-toolkit] r5927 committed - Exclude anonymous and local classes from TypeOracle (and changes to te...

2009-08-10 Thread codesite-noreply

Revision: 5927
Author: j...@google.com
Date: Mon Aug 10 08:49:04 2009
Log: Exclude anonymous and local classes from TypeOracle (and changes to  
tests and
callers of CompiledClass.getRealClassType), handle cases where we can't get
the source while extracting real parameter names, don't treat annotations
and their parameters as referenced types so binary-only annotations can work
properly.

http://code.google.com/p/google-web-toolkit/source/detail?r=5927

Modified:
  /changes/jat/ihm/dev/core/src/com/google/gwt/dev/javac/CompilationUnit.java
  /changes/jat/ihm/dev/core/src/com/google/gwt/dev/javac/CompiledClass.java
   
/changes/jat/ihm/dev/core/src/com/google/gwt/dev/javac/JSORestrictionsChecker.java
   
/changes/jat/ihm/dev/core/src/com/google/gwt/dev/javac/JavaSourceParser.java
   
/changes/jat/ihm/dev/core/src/com/google/gwt/dev/javac/TypeOracleMediator.java
   
/changes/jat/ihm/dev/core/src/com/google/gwt/dev/javac/asm/CollectClassData.java
   
/changes/jat/ihm/dev/core/src/com/google/gwt/dev/javac/asm/CollectReferencesVisitor.java
   
/changes/jat/ihm/dev/core/src/com/google/gwt/dev/javac/impl/SourceFileCompilationUnit.java
   
/changes/jat/ihm/dev/core/test/com/google/gwt/dev/javac/TypeOracleMediatorTest.java
   
/changes/jat/ihm/dev/core/test/com/google/gwt/dev/javac/asm/CollectReferencesVisitorTest.java
   
/changes/jat/ihm/user/test/com/google/gwt/user/rebind/rpc/SerializableTypeOracleBuilderTest.java

===
---  
/changes/jat/ihm/dev/core/src/com/google/gwt/dev/javac/CompilationUnit.java 
 
Fri Jul 31 16:17:57 2009
+++  
/changes/jat/ihm/dev/core/src/com/google/gwt/dev/javac/CompilationUnit.java 
 
Mon Aug 10 08:49:04 2009
@@ -16,6 +16,7 @@
  package com.google.gwt.dev.javac;

  import com.google.gwt.core.ext.TreeLogger;
+import com.google.gwt.core.ext.typeinfo.JRealClassType;
  import com.google.gwt.dev.asm.ClassReader;
  import com.google.gwt.dev.asm.Opcodes;
  import com.google.gwt.dev.asm.commons.EmptyVisitor;
@@ -186,10 +187,19 @@
 */
enum State {
  /**
- * All internal state is cleared; the unit's source has not yet been
- * compiled by JDT.
+ * A BINARIES unit has not been compiled but has up to date binary  
files.
   */
-FRESH,
+BINARIES,
+/**
+ * In this final state, the unit has been compiled and is error free.
+ * Additionally, all other units this unit depends on (transitively)  
are
+ * also error free. The unit contains a set of checked  
CompiledClasses. The
+ * unit and each contained CompiledClass releases all references to  
the JDT
+ * AST. Each class contains a reference to a valid JRealClassType,  
which has
+ * been added to the module's TypeOracle, as well as byte code, JSNI
+ * methods, and all other final state.
+ */
+CHECKED,
  /**
   * In this intermediate state, the unit's source has been compiled by  
JDT.
   * The unit will contain a set of CompiledClasses.
@@ -202,15 +212,10 @@
   */
  ERROR,
  /**
- * In this final state, the unit has been compiled and is error free.
- * Additionally, all other units this unit depends on (transitively)  
are
- * also error free. The unit contains a set of checked  
CompiledClasses. The
- * unit and each contained CompiledClass releases all references to  
the JDT
- * AST. Each class contains a reference to a valid JRealClassType,  
which has
- * been added to the module's TypeOracle, as well as byte code, JSNI
- * methods, and all other final state.
+ * All internal state is cleared; the unit's source has not yet been
+ * compiled by JDT.
   */
-CHECKED,
+FRESH,
  /**
   * A CHECKED generated unit enters this state at the start of a  
refresh. If
   * a generator generates the same unit with identical source, the unit  
is
@@ -218,10 +223,6 @@
   * validation, and TypeOracle building.
   */
  GRAVEYARD,
-/**
- * A BINARIES unit has not been compiled but has up to date binary  
files.
- */
-BINARIES,
}
private class FindTypesInCud extends ASTVisitor {
  MapSourceTypeBinding, CompiledClass map = new  
IdentityHashMapSourceTypeBinding, CompiledClass();
@@ -297,12 +298,12 @@
 */
private MapString, String anonymousClassMap = null;

+  private SetString cachedProvidedTypes;
+  private SetString cachedReferencedTypes;
private CompilationUnitDeclaration cud;
private ListCategorizedProblem errors;
private ListJsniMethod jsniMethods = null;
private State state = State.FRESH;
-  private SetString cachedReferencedTypes;
-  private SetString cachedProvidedTypes;

/**
 * Check if any available binaries are usable.
@@ -511,7 +512,8 @@
 * codenull/code.
 */
SetCompiledClass getCompiledClasses() {
-// TODO(jat): push down into subclasses, add binary support
+// TODO(jat): push down into subclasses, add binary support here rather
+// than in 

[gwt-contrib] Proposed API Addition - GWTTestCase#getStrategy() to allow precompilation of JUnit tests

2009-08-10 Thread John LaBanca
Background:
=
Currently, Junit tests and module compilations run synchronously as follows:
1. Compile the first module
2. Run tests in first module
3. Compile second module
4. Run tests in second module
5. Continue through all modules

Since running tests can be time consuming but requires very little CPU, I'd
like to compile future modules while tests are running.  That is:
1. Compile the first module
2. Run tests in first module while compiling  second module
3. Run tests in second module while compiling third module
4. Continue through all modules

This has two advantages.  First, it parallelizes test runs  and compiles,
allowing the tests to run a little faster.

Second, by pre-compiling all modules, we don't have to synchronize remote
clients, which means faster clients can run to completion before other
remote clients connect.  For example, if you have 5 test systems running
selenium or BrowerManager, the first system can run the tests and return
immediately before the other 4 connect, which has some advantages in terms
of reducing usage of test machines.  Without this change, the first system
has to wait for all systems to sync up before running the next module.


API Change:
=
The problem is that JUnitShell creates a synthetic module name based on the
JUnitStrategy.Strategy that is passed into JunitShell#runTest() when the
test is run, which means we can't compile the next test module until the
next test starts because we don't know the synthetic module name.  I propose
that we add the method GWTTestCase#getStrategy() that will be used when we
populate GWTTestCase#ALL_GWT_TESTS.

Currently, we assume the synthetic module name just adds .JUnit to the
module name, which is true for almost all GWT test cases.  However, test
cases that extend Benchmark use a different strategy and a differnet
synthetic module extension.  Presumably, other developers may be doing
something similar.  By adding the following method to GWTTestCase, we can
use the correct synthetic module name when grouping test cases together in
GWTTestCase#ALL_GWT_TESTS.

public JUnitShell.Strategy getStrategy()

GWTTestCase will return JUnitShell.JUnitStrategy (which will be made public
and final).  Benchmark, the only class that uses a different strategy in the
GWT codebase, will return a private inner class called BenchmarkStrategy.
GWTTestCase#runTest() will pass the strategy into JUnitShell.runTest()
instead of letting JUnitShell use the default one.


Who this affects:

This change affects a very small set of developers who actually override
GWTTestCase#runTest() and manually call JUnitShell with a strategy option.
They will need to ensure that their test case returns the correct strategy,
or it won't run as part of the correct synthetic module.



Deprecation and further changes:
=
Since JUnitShell is meant for use with GWTTestCases, I also propose the
following to avoid a situation where the return value of
GWTTestCase#getStrategy() does not equal the strategy passed into
JUnitShell#runTest().


The following methods will be deprecated:
JUnitShell#runTest(String moduleName, TestCase testCase, TestResult
testResult)
JUnitShell#runTest(String moduleName, TestCase testCase, TestResult
testResult, Strategy strategy)

And this will be added:
JUnitShell#runTest(String moduleName, GWTTestCase testCase, TestResult
testResult)

Since GWTTestCase will provide the strategy, we no longer need to pass it
in.

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

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



[gwt-contrib] How to enable web mode debugging in GWT

2009-08-10 Thread Joy

Hi All,

I can see hosted mode debug message in eclipse console. When I compile
and run mt application in IE I get some javascipt error messages. But
I am uanble to debug because I am not getting the culprit java file
which might have caused the error.

So I want to know how to enable web mode debugging, so that i can see
the java stack trace in eclipse console, while running the application
in IE.

Thanks in advance.

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



[gwt-contrib] DTO compiler optimization

2009-08-10 Thread Nathan Wells

I have hesitated to bring this up, since I'm relatively new to GWT,
and I would hate to waste anyone's time with explaining what is
hopefully common knowledge to me.

Specifically, I thinking about the DTO problem. I think the general
opinion about DTOs is that they are a necessary evil when working with
GWT. And let me say, they are a very minor blemish on a life-saving
framework. But, It seems to me that the problem has a more elegant
solution. I would propose that all we need to do is increase the
granularity of GWT compiler control.

For clarification, I would like to be able to tell the compiler at the
class member level (either through annotations or *.gwt.xml) what
should be client-side and what should be server-side. As an example,
compiling the following class wouldn't be a problem:

class Foo implements Serializable {

  @ServerOnly
  static long serialVersionUID = 325490285;

  //default, of course compiles to java byte-code and js.
  String bar;

  @ServerOnly
  void setBar(String bar) {
//a method which might reference un-emulated JRE classes
  }

  String getBar() {
return bar;
  }

}

I hope that makes sense... that way, our the same class could be used
on server and client side. Hurray for OO!

Again, I'm sure there are some unforeseen consequences of this design,
not the least of which is the possibility that it would require
basically rebuilding the GWT compiler. I'm just hoping that this
discussion might answer other n00b questions in the future :)

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



[gwt-contrib] [google-web-toolkit] r5928 committed - Fixes plugin backwards-compatibility fallback error in Safari....

2009-08-10 Thread codesite-noreply

Revision: 5928
Author: j...@google.com
Date: Mon Aug 10 10:47:05 2009
Log: Fixes plugin backwards-compatibility fallback error in Safari.
Review by: jat (desk check)

http://code.google.com/p/google-web-toolkit/source/detail?r=5928

Modified:
  /trunk/dev/core/src/com/google/gwt/core/ext/linker/impl/hosted.html

===
--- /trunk/dev/core/src/com/google/gwt/core/ext/linker/impl/hosted.html Thu  
Aug  6 18:57:54 2009
+++ /trunk/dev/core/src/com/google/gwt/core/ext/linker/impl/hosted.html Mon  
Aug 10 10:47:05 2009
@@ -210,8 +210,9 @@
  var plugin = null;
  for (var i = 0; i  pluginFinders.length; ++i) {
try {
-plugin = pluginFinders[i]();
-if (plugin != null  plugin.init(window)) {
+var maybePlugin = pluginFinders[i]();
+if (maybePlugin != null  maybePlugin.init(window)) {
+  plugin = maybePlugin;
break;
  }
} catch (e) {

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



[gwt-contrib] Re: Patch for issue 1112 (Add InsertPanel interface)

2009-08-10 Thread jgw

http://gwt-code-reviews.appspot.com/57808

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



[gwt-contrib] Re: Change PopupPanel.center() to prefer keeping the top-left of a popup on-screen.

2009-08-10 Thread jgw

On 2009/08/10 18:24:25, jgw wrote:


LGTM.

http://gwt-code-reviews.appspot.com/56810

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



[gwt-contrib] [google-web-toolkit] r5929 committed - Changes PopupPanel.center() to prefer keeping the top-left of a popup ...

2009-08-10 Thread codesite-noreply

Revision: 5929
Author: j...@google.com
Date: Mon Aug 10 11:27:11 2009
Log: Changes PopupPanel.center() to prefer keeping the top-left of a popup  
on-screen.
Patch by: Isaac Truett
Review: http://gwt-code-reviews.appspot.com/56810

http://code.google.com/p/google-web-toolkit/source/detail?r=5929

Modified:
  /trunk/user/src/com/google/gwt/user/client/ui/PopupPanel.java
  /trunk/user/test/com/google/gwt/user/client/ui/PopupTest.java

===
--- /trunk/user/src/com/google/gwt/user/client/ui/PopupPanel.java   Fri Mar 
 
20 11:33:42 2009
+++ /trunk/user/src/com/google/gwt/user/client/ui/PopupPanel.java   Mon Aug 
 
10 11:27:11 2009
@@ -389,7 +389,7 @@

  int left = (Window.getClientWidth() - getOffsetWidth())  1;
  int top = (Window.getClientHeight() - getOffsetHeight())  1;
-setPopupPosition(Window.getScrollLeft() + left, Window.getScrollTop()  
+ top);
+setPopupPosition(Math.max(Window.getScrollLeft() + left, 0),  
Math.max(Window.getScrollTop() + top, 0));

  if (!initiallyShowing) {
setAnimationEnabled(initiallyAnimated);
===
--- /trunk/user/test/com/google/gwt/user/client/ui/PopupTest.java   Thu Jul 
 
30 13:47:31 2009
+++ /trunk/user/test/com/google/gwt/user/client/ui/PopupTest.java   Mon Aug 
 
10 11:27:11 2009
@@ -35,14 +35,14 @@
private static class TestablePopupPanel extends PopupPanel {
  private int onLoadCount;

+public void assertOnLoadCount(int expected) {
+  assertEquals(expected, onLoadCount);
+}
+
  @Override
  public Element getContainerElement() {
return super.getContainerElement();
  }
-
-public void assertOnLoadCount(int expected) {
-  assertEquals(expected, onLoadCount);
-}

  @Override
  public void onLoad() {
@@ -111,6 +111,20 @@
  // Remove a partner
  popup.removeAutoHidePartner(partner0);
}
+
+  /**
+   * Tests that a large PopupPanel is not positioned off the top or left  
edges
+   * of the browser window, making part of the panel unreachable.
+   */
+  public void testCenterLargePopup() {
+PopupPanel popup = new PopupPanel();
+popup.setHeight(1000px);
+popup.setWidth(1000px);
+popup.setWidget(new Label(foo));
+popup.center();
+assertEquals(0, popup.getAbsoluteTop());
+assertEquals(0, popup.getAbsoluteLeft());
+  }

/**
 * Issue 2463: If a {...@link PopupPanel} contains a dependent {...@link  
PopupPanel}
@@ -181,28 +195,6 @@
popup.hide();
  }
}
-
-  /**
-   * Test the showing a popup while it is hiding will not result in an  
illegal
-   * state.
-   */
-  public void testShowWhileHiding() {
-PopupPanel popup = createPopupPanel();
-
-// Show the popup
-popup.setAnimationEnabled(false);
-popup.show();
-assertTrue(popup.isShowing());
-
-// Start hiding the popup
-popup.setAnimationEnabled(true);
-popup.hide();
-assertFalse(popup.isShowing());
-
-// Show the popup while its hiding
-popup.show();
-assertTrue(popup.isShowing());
-  }

@DoNotRunWith(Platform.Htmlunit)
public void testPopup() {
@@ -276,6 +268,28 @@
  popup.setWidget(new Label(test));
  popup.hide();
}
+
+  /**
+   * Test the showing a popup while it is hiding will not result in an  
illegal
+   * state.
+   */
+  public void testShowWhileHiding() {
+PopupPanel popup = createPopupPanel();
+
+// Show the popup
+popup.setAnimationEnabled(false);
+popup.show();
+assertTrue(popup.isShowing());
+
+// Start hiding the popup
+popup.setAnimationEnabled(true);
+popup.hide();
+assertFalse(popup.isShowing());
+
+// Show the popup while its hiding
+popup.show();
+assertTrue(popup.isShowing());
+  }

/**
 * Create a new PopupPanel.

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



[gwt-contrib] Re: Change PopupPanel.center() to prefer keeping the top-left of a popup on-screen.

2009-08-10 Thread jgw

Committed at r5929.

http://gwt-code-reviews.appspot.com/56810

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



[gwt-contrib] [google-web-toolkit] r5931 committed - Fix for breaking test (turns out 1000px isn't large enough to guarante...

2009-08-10 Thread codesite-noreply

Revision: 5931
Author: j...@google.com
Date: Mon Aug 10 13:56:51 2009
Log: Fix for breaking test (turns out 1000px isn't large enough to  
guarantee the
window goes offscreen).

http://code.google.com/p/google-web-toolkit/source/detail?r=5931

Modified:
  /trunk/user/test/com/google/gwt/user/client/ui/PopupTest.java

===
--- /trunk/user/test/com/google/gwt/user/client/ui/PopupTest.java   Mon Aug 
 
10 11:27:11 2009
+++ /trunk/user/test/com/google/gwt/user/client/ui/PopupTest.java   Mon Aug 
 
10 13:56:51 2009
@@ -118,8 +118,8 @@
 */
public void testCenterLargePopup() {
  PopupPanel popup = new PopupPanel();
-popup.setHeight(1000px);
-popup.setWidth(1000px);
+popup.setHeight(4096px);
+popup.setWidth(4096px);
  popup.setWidget(new Label(foo));
  popup.center();
  assertEquals(0, popup.getAbsoluteTop());

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



[gwt-contrib] [google-web-toolkit] r5932 committed - Switch ImageBundleBuilder to use ImageIO.getImageReaders() and to atte...

2009-08-10 Thread codesite-noreply

Revision: 5932
Author: b...@google.com
Date: Mon Aug 10 14:31:10 2009
Log: Switch ImageBundleBuilder to use ImageIO.getImageReaders() and to  
attempt alternate ImageReaders if there is an exception while calling  
read().
Give ImageBundleBuilder a main() method to validate input files.

Patch by: bobv
Review by: rjrjr
http://code.google.com/p/google-web-toolkit/source/detail?r=5932

Modified:
  /trunk/user/src/com/google/gwt/resources/rg/ImageBundleBuilder.java

===
--- /trunk/user/src/com/google/gwt/resources/rg/ImageBundleBuilder.java Thu  
Jul 30 11:19:40 2009
+++ /trunk/user/src/com/google/gwt/resources/rg/ImageBundleBuilder.java Mon  
Aug 10 14:31:10 2009
@@ -18,13 +18,18 @@
  import com.google.gwt.core.ext.TreeLogger;
  import com.google.gwt.core.ext.UnableToCompleteException;
  import com.google.gwt.dev.util.Util;
+import com.google.gwt.dev.util.log.PrintWriterTreeLogger;
  import com.google.gwt.resources.ext.ResourceContext;

  import java.awt.Graphics2D;
  import java.awt.geom.AffineTransform;
  import java.awt.image.BufferedImage;
  import java.io.ByteArrayOutputStream;
+import java.io.File;
+import java.io.FileOutputStream;
  import java.io.IOException;
+import java.io.PrintWriter;
+import java.net.MalformedURLException;
  import java.net.URL;
  import java.util.ArrayList;
  import java.util.Collection;
@@ -453,6 +458,61 @@
private static final int IMAGE_MAX_SIZE = Integer.getInteger(
gwt.imageResource.maxBundleSize, 256);

+  public static void main(String[] args) {
+final TreeLogger logger = new PrintWriterTreeLogger(new PrintWriter(
+System.out));
+if (args.length  2) {
+  logger.log(TreeLogger.ERROR, ImageBundleBuilder.class.getSimpleName()
+  +  output file input file ...);
+  System.exit(-1);
+}
+
+ImageBundleBuilder builder = new ImageBundleBuilder();
+boolean fail = false;
+for (int i = 1, j = args.length; i  j; i++) {
+  TreeLogger loopLogger = logger.branch(TreeLogger.DEBUG,
+  Processing argument  + args[i]);
+  File file = new File(args[i]);
+
+  Exception ex = null;
+  try {
+builder.assimilate(loopLogger, args[i], file.toURL());
+  } catch (MalformedURLException e) {
+ex = e;
+  } catch (UnableToCompleteException e) {
+ex = e;
+  } catch (UnsuitableForStripException e) {
+ex = e;
+  }
+  if (ex != null) {
+loopLogger.log(TreeLogger.ERROR, Unable to assimilate image, ex);
+fail = true;
+  }
+}
+
+if (fail) {
+  System.exit(-1);
+}
+
+final String outFile = args[0];
+try {
+  BufferedImage bundledImage = builder.drawBundledImage(new  
BestFitArranger());
+  byte[] bytes = createImageBytes(logger, bundledImage);
+
+  FileOutputStream out = new FileOutputStream(outFile);
+  out.write(bytes);
+  out.close();
+} catch (IOException e) {
+  logger.log(TreeLogger.ERROR, Unable to write output file, e);
+  System.exit(-2);
+} catch (UnableToCompleteException e) {
+  logger.log(TreeLogger.ERROR, Unable to draw output image, e);
+  System.exit(-2);
+}
+
+System.exit(0);
+  }
+
public static byte[] toPng(TreeLogger logger, HasRect rect)
throws UnableToCompleteException {
  // Create the bundled image.
@@ -463,6 +523,16 @@
  g2d.drawImage(rect.getImage(), rect.transform(), null);
  g2d.dispose();

+byte[] imageBytes = createImageBytes(logger, bundledImage);
+return imageBytes;
+  }
+
+  /**
+   * Write the bundled image into a byte array, so that we can compute its
+   * strong name.
+   */
+  private static byte[] createImageBytes(TreeLogger logger,
+  BufferedImage bundledImage) throws UnableToCompleteException {
  byte[] imageBytes;

  try {
@@ -596,19 +666,7 @@
  // Create the bundled image from all of the constituent images.
  BufferedImage bundledImage = drawBundledImage(arranger);

-// Write the bundled image into a byte array, so that we can compute
-// its strong name.
-byte[] imageBytes;
-
-try {
-  ByteArrayOutputStream byteOutputStream = new ByteArrayOutputStream();
-  ImageIO.write(bundledImage, BUNDLE_FILE_TYPE, byteOutputStream);
-  imageBytes = byteOutputStream.toByteArray();
-} catch (IOException e) {
-  logger.log(TreeLogger.ERROR,
-  Unable to generate file name for image bundle file, null);
-  throw new UnableToCompleteException();
-}
+byte[] imageBytes = createImageBytes(logger, bundledImage);

  String bundleFileName = context.deploy(
  context.getClientBundleType().getQualifiedSourceName() + .cache.
@@ -626,31 +684,40 @@
  BufferedImage image = null;
  // Load the image
  try {
-  String path = imageUrl.getPath();
-  String suffix = path.substring(path.lastIndexOf('.') + 1);
-
/*
 * ImageIO uses an SPI pattern API. We don't care about the  
particulars 

[gwt-contrib] move SOYC source code underneath dev/core/src

2009-08-10 Thread spoon

Reviewers: fabbott,

Description:
This patch moves SOYC's source code underneath dev/core/src.  It leaves
gwt-soyc-vis.jar existing and containing the SOYC static resources (css
and gifs).  It has gwt-dev-platform.jar also contain the SOYC static
resources.

The goal is to phase out gwt-soyc-vis.jar.  After this patch, existing
build rules and scripts should  keep working, but it should also
possible to drop all references to gwt-soyc-vis.jar.  The references can
either be dropped outright (as in a classpath) or replaced by a
reference to gwt-dev-platform.jar (as in the -resources argument to
SoycDashboard).

Please review this at http://gwt-code-reviews.appspot.com/56811

Affected files:
   dev/common.ant.xml
   tools/soyc-vis/build.xml
   tools/soyc-vis/src/com/google/gwt/soyc/CodeCollection.java
   tools/soyc-vis/src/com/google/gwt/soyc/GlobalInformation.java
   tools/soyc-vis/src/com/google/gwt/soyc/LiteralsCollection.java
   tools/soyc-vis/src/com/google/gwt/soyc/MakeTopLevelHtmlForPerm.java
   tools/soyc-vis/src/com/google/gwt/soyc/Settings.java
   tools/soyc-vis/src/com/google/gwt/soyc/SizeBreakdown.java
   tools/soyc-vis/src/com/google/gwt/soyc/SoycDashboard.java



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



[gwt-contrib] Add a tab key to wire protocol

2009-08-10 Thread jat

Reviewers: amitmanjhi,

Description:
After talking with Miguel, it became obvious that we want the ability to
show tabs in the plugin which correspond to tabs in the browser.  Right
now, we don't have the ability to get that information in the browser,
but I am adding the wire protocol support for when we do.

Please review this at http://gwt-code-reviews.appspot.com/56812

Affected files:
   dev/core/src/com/google/gwt/core/ext/linker/impl/hosted.html
   dev/core/src/com/google/gwt/dev/SwtHostedModeBase.java
   dev/core/src/com/google/gwt/dev/shell/BrowserWidgetHost.java
   dev/oophm/src/com/google/gwt/dev/OophmHostedModeBase.java
   dev/oophm/src/com/google/gwt/dev/shell/BrowserChannel.java
   dev/oophm/src/com/google/gwt/dev/shell/BrowserChannelServer.java
   dev/oophm/src/com/google/gwt/dev/shell/OophmSessionHandler.java
   dev/oophm/test/com/google/gwt/dev/shell/BrowserChannelTest.java



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



[gwt-contrib] [google-web-toolkit] r5934 committed - Propagate ImageBundleBuilder cherry pick from https://google-web-toolk...

2009-08-10 Thread codesite-noreply

Revision: 5934
Author: rj...@google.com
Date: Mon Aug 10 15:04:08 2009
Log: Propagate ImageBundleBuilder cherry pick from  
https://google-web-toolkit.googlecode.com/svn/branches/snapshot-2009.08.04-r5888

svn merge -c5933  
https://google-web-toolkit.googlecode.com/svn/branches/snapshot-2009.08.04-r5888
 .

http://code.google.com/p/google-web-toolkit/source/detail?r=5934

Modified:
  /branches/snapshot-2009.08.04-ihm-r5888/branch-info.txt
   
/branches/snapshot-2009.08.04-ihm-r5888/user/src/com/google/gwt/resources/rg/ImageBundleBuilder.java

===
--- /branches/snapshot-2009.08.04-ihm-r5888/branch-info.txt Fri Aug  7  
16:05:37 2009
+++ /branches/snapshot-2009.08.04-ihm-r5888/branch-info.txt Mon Aug 10  
15:04:08 2009
@@ -14,3 +14,7 @@
  /trunk r5915:5922 was merged into this branch
HTLMUnit changes
svn merge -r5915:5922  
https://google-web-toolkit.googlecode.com/svn/trunk .
+
+/branches/snapshot-2009.08.04-r5888 c5933 was merged into this branch
+  Switch ImageBundleBuilder to use ImageIO.getImageReaders()...
+  svn merge -c5933  
https://google-web-toolkit.googlecode.com/svn/branches/snapshot-2009.08.04-r5888
 .
===
---  
/branches/snapshot-2009.08.04-ihm-r5888/user/src/com/google/gwt/resources/rg/ImageBundleBuilder.java
 
Thu Jul 30 11:19:40 2009
+++  
/branches/snapshot-2009.08.04-ihm-r5888/user/src/com/google/gwt/resources/rg/ImageBundleBuilder.java
 
Mon Aug 10 15:04:08 2009
@@ -18,13 +18,18 @@
  import com.google.gwt.core.ext.TreeLogger;
  import com.google.gwt.core.ext.UnableToCompleteException;
  import com.google.gwt.dev.util.Util;
+import com.google.gwt.dev.util.log.PrintWriterTreeLogger;
  import com.google.gwt.resources.ext.ResourceContext;

  import java.awt.Graphics2D;
  import java.awt.geom.AffineTransform;
  import java.awt.image.BufferedImage;
  import java.io.ByteArrayOutputStream;
+import java.io.File;
+import java.io.FileOutputStream;
  import java.io.IOException;
+import java.io.PrintWriter;
+import java.net.MalformedURLException;
  import java.net.URL;
  import java.util.ArrayList;
  import java.util.Collection;
@@ -453,6 +458,61 @@
private static final int IMAGE_MAX_SIZE = Integer.getInteger(
gwt.imageResource.maxBundleSize, 256);

+  public static void main(String[] args) {
+final TreeLogger logger = new PrintWriterTreeLogger(new PrintWriter(
+System.out));
+if (args.length  2) {
+  logger.log(TreeLogger.ERROR, ImageBundleBuilder.class.getSimpleName()
+  +  output file input file ...);
+  System.exit(-1);
+}
+
+ImageBundleBuilder builder = new ImageBundleBuilder();
+boolean fail = false;
+for (int i = 1, j = args.length; i  j; i++) {
+  TreeLogger loopLogger = logger.branch(TreeLogger.DEBUG,
+  Processing argument  + args[i]);
+  File file = new File(args[i]);
+
+  Exception ex = null;
+  try {
+builder.assimilate(loopLogger, args[i], file.toURL());
+  } catch (MalformedURLException e) {
+ex = e;
+  } catch (UnableToCompleteException e) {
+ex = e;
+  } catch (UnsuitableForStripException e) {
+ex = e;
+  }
+  if (ex != null) {
+loopLogger.log(TreeLogger.ERROR, Unable to assimilate image, ex);
+fail = true;
+  }
+}
+
+if (fail) {
+  System.exit(-1);
+}
+
+final String outFile = args[0];
+try {
+  BufferedImage bundledImage = builder.drawBundledImage(new  
BestFitArranger());
+  byte[] bytes = createImageBytes(logger, bundledImage);
+
+  FileOutputStream out = new FileOutputStream(outFile);
+  out.write(bytes);
+  out.close();
+} catch (IOException e) {
+  logger.log(TreeLogger.ERROR, Unable to write output file, e);
+  System.exit(-2);
+} catch (UnableToCompleteException e) {
+  logger.log(TreeLogger.ERROR, Unable to draw output image, e);
+  System.exit(-2);
+}
+
+System.exit(0);
+  }
+
public static byte[] toPng(TreeLogger logger, HasRect rect)
throws UnableToCompleteException {
  // Create the bundled image.
@@ -463,6 +523,16 @@
  g2d.drawImage(rect.getImage(), rect.transform(), null);
  g2d.dispose();

+byte[] imageBytes = createImageBytes(logger, bundledImage);
+return imageBytes;
+  }
+
+  /**
+   * Write the bundled image into a byte array, so that we can compute its
+   * strong name.
+   */
+  private static byte[] createImageBytes(TreeLogger logger,
+  BufferedImage bundledImage) throws UnableToCompleteException {
  byte[] imageBytes;

  try {
@@ -596,19 +666,7 @@
  // Create the bundled image from all of the constituent images.
  BufferedImage bundledImage = drawBundledImage(arranger);

-// Write the bundled image into a byte array, so that we can compute
-// its strong name.
-byte[] imageBytes;
-
-try {
-  ByteArrayOutputStream byteOutputStream = new ByteArrayOutputStream();
- 

[gwt-contrib] [google-web-toolkit] r5933 committed - Cherry pick c5932 from trunk for ImageBundleBuilder fix...

2009-08-10 Thread codesite-noreply

Revision: 5933
Author: rj...@google.com
Date: Mon Aug 10 14:57:35 2009
Log: Cherry pick c5932 from trunk for ImageBundleBuilder fix
svn merge -c5932 https://google-web-toolkit.googlecode.com/svn/trunk .


http://code.google.com/p/google-web-toolkit/source/detail?r=5933

Modified:
  /branches/snapshot-2009.08.04-r5888/branch-info.txt
   
/branches/snapshot-2009.08.04-r5888/user/src/com/google/gwt/resources/rg/ImageBundleBuilder.java

===
--- /branches/snapshot-2009.08.04-r5888/branch-info.txt Thu Aug  6 15:39:10  
2009
+++ /branches/snapshot-2009.08.04-r5888/branch-info.txt Mon Aug 10 14:57:35  
2009
@@ -9,3 +9,7 @@
  /trunk c5896 was merged into this branch
UiBinder
svn merge -c5896  https://google-web-toolkit.googlecode.com/svn/trunk .
+
+/trunk c5932 was merged into this branch
+  Switch ImageBundleBuilder to use ImageIO.getImageReaders()...
+  svn merge -c5932 https://google-web-toolkit.googlecode.com/svn/trunk .
===
---  
/branches/snapshot-2009.08.04-r5888/user/src/com/google/gwt/resources/rg/ImageBundleBuilder.java
 
Thu Jul 30 11:19:40 2009
+++  
/branches/snapshot-2009.08.04-r5888/user/src/com/google/gwt/resources/rg/ImageBundleBuilder.java
 
Mon Aug 10 14:57:35 2009
@@ -18,13 +18,18 @@
  import com.google.gwt.core.ext.TreeLogger;
  import com.google.gwt.core.ext.UnableToCompleteException;
  import com.google.gwt.dev.util.Util;
+import com.google.gwt.dev.util.log.PrintWriterTreeLogger;
  import com.google.gwt.resources.ext.ResourceContext;

  import java.awt.Graphics2D;
  import java.awt.geom.AffineTransform;
  import java.awt.image.BufferedImage;
  import java.io.ByteArrayOutputStream;
+import java.io.File;
+import java.io.FileOutputStream;
  import java.io.IOException;
+import java.io.PrintWriter;
+import java.net.MalformedURLException;
  import java.net.URL;
  import java.util.ArrayList;
  import java.util.Collection;
@@ -453,6 +458,61 @@
private static final int IMAGE_MAX_SIZE = Integer.getInteger(
gwt.imageResource.maxBundleSize, 256);

+  public static void main(String[] args) {
+final TreeLogger logger = new PrintWriterTreeLogger(new PrintWriter(
+System.out));
+if (args.length  2) {
+  logger.log(TreeLogger.ERROR, ImageBundleBuilder.class.getSimpleName()
+  +  output file input file ...);
+  System.exit(-1);
+}
+
+ImageBundleBuilder builder = new ImageBundleBuilder();
+boolean fail = false;
+for (int i = 1, j = args.length; i  j; i++) {
+  TreeLogger loopLogger = logger.branch(TreeLogger.DEBUG,
+  Processing argument  + args[i]);
+  File file = new File(args[i]);
+
+  Exception ex = null;
+  try {
+builder.assimilate(loopLogger, args[i], file.toURL());
+  } catch (MalformedURLException e) {
+ex = e;
+  } catch (UnableToCompleteException e) {
+ex = e;
+  } catch (UnsuitableForStripException e) {
+ex = e;
+  }
+  if (ex != null) {
+loopLogger.log(TreeLogger.ERROR, Unable to assimilate image, ex);
+fail = true;
+  }
+}
+
+if (fail) {
+  System.exit(-1);
+}
+
+final String outFile = args[0];
+try {
+  BufferedImage bundledImage = builder.drawBundledImage(new  
BestFitArranger());
+  byte[] bytes = createImageBytes(logger, bundledImage);
+
+  FileOutputStream out = new FileOutputStream(outFile);
+  out.write(bytes);
+  out.close();
+} catch (IOException e) {
+  logger.log(TreeLogger.ERROR, Unable to write output file, e);
+  System.exit(-2);
+} catch (UnableToCompleteException e) {
+  logger.log(TreeLogger.ERROR, Unable to draw output image, e);
+  System.exit(-2);
+}
+
+System.exit(0);
+  }
+
public static byte[] toPng(TreeLogger logger, HasRect rect)
throws UnableToCompleteException {
  // Create the bundled image.
@@ -463,6 +523,16 @@
  g2d.drawImage(rect.getImage(), rect.transform(), null);
  g2d.dispose();

+byte[] imageBytes = createImageBytes(logger, bundledImage);
+return imageBytes;
+  }
+
+  /**
+   * Write the bundled image into a byte array, so that we can compute its
+   * strong name.
+   */
+  private static byte[] createImageBytes(TreeLogger logger,
+  BufferedImage bundledImage) throws UnableToCompleteException {
  byte[] imageBytes;

  try {
@@ -596,19 +666,7 @@
  // Create the bundled image from all of the constituent images.
  BufferedImage bundledImage = drawBundledImage(arranger);

-// Write the bundled image into a byte array, so that we can compute
-// its strong name.
-byte[] imageBytes;
-
-try {
-  ByteArrayOutputStream byteOutputStream = new ByteArrayOutputStream();
-  ImageIO.write(bundledImage, BUNDLE_FILE_TYPE, byteOutputStream);
-  imageBytes = byteOutputStream.toByteArray();
-} catch (IOException e) {
-  logger.log(TreeLogger.ERROR,
-  Unable to 

[gwt-contrib] Re: Add a tab key to wire protocol

2009-08-10 Thread amitmanjhi

LGTM.

I do want you to add additional test cases and fix whatever the tests
break, if any.


http://gwt-code-reviews.appspot.com/56812/diff/1/2
File dev/oophm/test/com/google/gwt/dev/shell/BrowserChannelTest.java
(right):

http://gwt-code-reviews.appspot.com/56812/diff/1/2#newcode240
Line 240: }
Please add other tests as tabKey as null, sessionKey as null, moduleName
as null, and sessionKey as strings with length greater than 16 and less
than 16.

http://gwt-code-reviews.appspot.com/56812

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



[gwt-contrib] Re: Initial implementation of layout system, along with the first two layout widgets.

2009-08-10 Thread Kango_V

Amir, this is the exact case I am working on.  I'm trting to implement
an interface not dissimilar to Google Reader.  It has a footer at the
bottom of the grid for next prev buttons.

Can this layout handle this?

Excellent work as always.  I'm keenly following this.  Can't get it
quick enough :)

On Aug 10, 9:26 am, Amir Kashani amirkash...@gmail.com wrote:
 Joel,
 I love how this is turning out so far, great work. While this system handles
 a vast majority of layout situations, correct me if I'm wrong, but I think
 it breaks down with non-100% height layouts that require a footer. An
 example: a header area, followed by a horizontally split content area (body
 and side nav), followed by a footer. I can't think of a way you could
 represent this using absolute positioning that would guarantee the footer
 area isn't encroached upon.

 Any thoughts on how LayoutPanel would handle this? Maybe this doesn't fall
 under desktop-like layouts and it's handled with floats (which aren't so
 terrible in this particular case)?

 - Amir

 On Mon, Aug 3, 2009 at 12:13 PM, j...@google.com wrote:

  Reviewers: jlabanca,

  Please review this athttp://gwt-code-reviews.appspot.com/51830

  Affected files:
    A     layout/Layout.gwt.xml
    A     layout/client/Layout.java
    A     layout/client/LayoutImpl.java
    A     layout/client/LayoutImplIE6.java
    A     layout/client/UserAgent.java
    A     user/client/ui/HasAnimatedLayout.java
    A     user/client/ui/HasLayout.java
    A     user/client/ui/LayoutComposite.java
    A     user/client/ui/LayoutPanel.java
    A     user/client/ui/RootLayoutPanel.java
    M     user/client/ui/Widget.java
--~--~-~--~~~---~--~~
http://groups.google.com/group/Google-Web-Toolkit-Contributors
-~--~~~~--~~--~--~---



[gwt-contrib] [google-web-toolkit] r5935 committed - /trunk c5928 was merged into this branch...

2009-08-10 Thread codesite-noreply

Revision: 5935
Author: rj...@google.com
Date: Mon Aug 10 15:37:54 2009
Log: /trunk c5928 was merged into this branch
   Fixes plugin backwards-compatibility fallback error in Safari introduced  
by trunk r5910:5912
   svn merge -c5928 https://google-web-toolkit.googlecode.com/svn/trunk .


http://code.google.com/p/google-web-toolkit/source/detail?r=5935

Modified:
  /branches/snapshot-2009.08.04-ihm-r5888/branch-info.txt
   
/branches/snapshot-2009.08.04-ihm-r5888/dev/core/src/com/google/gwt/core/ext/linker/impl/hosted.html

===
--- /branches/snapshot-2009.08.04-ihm-r5888/branch-info.txt Mon Aug 10  
15:04:08 2009
+++ /branches/snapshot-2009.08.04-ihm-r5888/branch-info.txt Mon Aug 10  
15:37:54 2009
@@ -18,3 +18,7 @@
  /branches/snapshot-2009.08.04-r5888 c5933 was merged into this branch
Switch ImageBundleBuilder to use ImageIO.getImageReaders()...
svn merge -c5933  
https://google-web-toolkit.googlecode.com/svn/branches/snapshot-2009.08.04-r5888
 .
+
+/trunk c5928 was merged into this branch
+  Fixes plugin backwards-compatibility fallback error in Safari introduced  
by trunk r5910:5912
+  svn merge -c5928 https://google-web-toolkit.googlecode.com/svn/trunk .
===
---  
/branches/snapshot-2009.08.04-ihm-r5888/dev/core/src/com/google/gwt/core/ext/linker/impl/hosted.html
 
Fri Aug  7 15:17:40 2009
+++  
/branches/snapshot-2009.08.04-ihm-r5888/dev/core/src/com/google/gwt/core/ext/linker/impl/hosted.html
 
Mon Aug 10 15:37:54 2009
@@ -210,8 +210,9 @@
  var plugin = null;
  for (var i = 0; i  pluginFinders.length; ++i) {
try {
-plugin = pluginFinders[i]();
-if (plugin != null  plugin.init(window)) {
+var maybePlugin = pluginFinders[i]();
+if (maybePlugin != null  maybePlugin.init(window)) {
+  plugin = maybePlugin;
break;
  }
} catch (e) {

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



[gwt-contrib] Re: Add a tab key to wire protocol

2009-08-10 Thread jat

Nulls aren't valid there -- I added a test to verify they fail 
javadoc.

http://gwt-code-reviews.appspot.com/56812

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



[gwt-contrib] Re: Add a tab key to wire protocol

2009-08-10 Thread jat

I also renamed the write* methods based on your earlier feedback.

http://gwt-code-reviews.appspot.com/56812

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



[gwt-contrib] Issue #3851

2009-08-10 Thread scottb

Reviewers: bobv,

Description:
One-line patch to remove javax.servlet source files from gwt-user.jar.

gwt-dev-*.jar is unaffected.

Please review this at http://gwt-code-reviews.appspot.com/56813

Affected files:
   user/build.xml


Index: user/build.xml
--- user/build.xml  (revision 5922)
+++ user/build.xml  (working copy)
@@ -86,7 +86,7 @@
fileset dir=src excludes=**/package.html /
fileset dir=super excludes=**/package.html /
fileset dir=${javac.out} /
-  zipfileset src=${gwt.tools.lib}/tomcat/servlet-api-2.5.jar /
+  zipfileset src=${gwt.tools.lib}/tomcat/servlet-api-2.5.jar  
excludes=**/*.java/
zipfileset src=${gwt.tools.lib}/w3c/sac/sac-1.3.jar /
zipfileset src=${gwt.tools.lib}/w3c/flute/flute-1.3.jar /
  /gwt.jar




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



[gwt-contrib] [google-web-toolkit] r5936 committed - Add a tabKey to the LoadModule message so that we can differentiate be...

2009-08-10 Thread codesite-noreply

Revision: 5936
Author: j...@google.com
Date: Mon Aug 10 16:15:14 2009
Log: Add a tabKey to the LoadModule message so that we can differentiate  
between
a reload in the same tab and opening a new tab, if the plugin has that
capability.

Also, rename write* methods for better symmetry and more tests/doc.

Patch by: jat
Review by: amitmanjhi

http://code.google.com/p/google-web-toolkit/source/detail?r=5936

Modified:
  /trunk/dev/core/src/com/google/gwt/core/ext/linker/impl/hosted.html
  /trunk/dev/core/src/com/google/gwt/dev/SwtHostedModeBase.java
  /trunk/dev/core/src/com/google/gwt/dev/shell/BrowserWidgetHost.java
  /trunk/dev/oophm/src/com/google/gwt/dev/OophmHostedModeBase.java
  /trunk/dev/oophm/src/com/google/gwt/dev/shell/BrowserChannel.java
  /trunk/dev/oophm/src/com/google/gwt/dev/shell/BrowserChannelServer.java
  /trunk/dev/oophm/src/com/google/gwt/dev/shell/OophmSessionHandler.java
  /trunk/dev/oophm/test/com/google/gwt/dev/shell/BrowserChannelTest.java

===
--- /trunk/dev/core/src/com/google/gwt/core/ext/linker/impl/hosted.html Mon  
Aug 10 10:47:05 2009
+++ /trunk/dev/core/src/com/google/gwt/core/ext/linker/impl/hosted.html Mon  
Aug 10 16:15:14 2009
@@ -229,7 +229,7 @@
}
  } catch (e) {
  }
-  }
+  }
 
loadIframe(http://google-web-toolkit.googlecode.com/svn/trunk/plugins/MissingBrowserPlugin.html;);
  } else {
if (!plugin.connect(url, topWin.__gwt_SessionID, $hosted,  
$moduleName,
===
--- /trunk/dev/core/src/com/google/gwt/dev/SwtHostedModeBase.java   Thu Aug 
  
6 18:57:54 2009
+++ /trunk/dev/core/src/com/google/gwt/dev/SwtHostedModeBase.java   Mon Aug 
 
10 16:15:14 2009
@@ -76,8 +76,9 @@
  }

  public ModuleSpaceHost createModuleSpaceHost(TreeLogger logger,
-String moduleName, String userAgent, String url, String sessionKey,
-String remoteEndpoint) throws UnableToCompleteException {
+String moduleName, String userAgent, String url, String tabKey,
+String sessionKey, String remoteEndpoint)
+throws UnableToCompleteException {
throw new UnsupportedOperationException();
  }

===
--- /trunk/dev/core/src/com/google/gwt/dev/shell/BrowserWidgetHost.java Thu  
Aug  6 18:57:54 2009
+++ /trunk/dev/core/src/com/google/gwt/dev/shell/BrowserWidgetHost.java Mon  
Aug 10 16:15:14 2009
@@ -53,12 +53,14 @@
 * @param logger
 * @param moduleName
 * @param userAgent
-   * @param url URL of top-level window (may be null for old browser  
plugins)
-   * @param sessionKey unique session key (may be null for old browser  
plugins)
+   * @param url URL of top-level window, may be null for old browser  
plugins
+   * @param tabKey opaque key for the tab, may be empty string if the  
plugin
+   * can't distinguish tabs or null if using an old browser plugin
+   * @param sessionKey unique session key, may be null for old browser  
plugins
 * @param remoteEndpoint
 */
ModuleSpaceHost createModuleSpaceHost(TreeLogger logger, String  
moduleName,
-  String userAgent, String url, String sessionKey,
+  String userAgent, String url, String tabKey, String sessionKey,
String remoteEndpoint) throws UnableToCompleteException;

TreeLogger getLogger();
===
--- /trunk/dev/oophm/src/com/google/gwt/dev/OophmHostedModeBase.javaThu  
Aug  6 18:57:54 2009
+++ /trunk/dev/oophm/src/com/google/gwt/dev/OophmHostedModeBase.javaMon  
Aug 10 16:15:14 2009
@@ -142,8 +142,9 @@
  }

  public ModuleSpaceHost createModuleSpaceHost(TreeLogger mainLogger,
-String moduleName, String userAgent, String url, String sessionKey,
-String remoteSocket) throws UnableToCompleteException {
+String moduleName, String userAgent, String url, String tabKey,
+String sessionKey, String remoteSocket)
+throws UnableToCompleteException {
TreeLogger logger = mainLogger;
TreeLogger.Type maxLevel = TreeLogger.INFO;
if (mainLogger instanceof AbstractTreeLogger) {
===
--- /trunk/dev/oophm/src/com/google/gwt/dev/shell/BrowserChannel.java   Thu  
Aug  6 18:57:54 2009
+++ /trunk/dev/oophm/src/com/google/gwt/dev/shell/BrowserChannel.java   Mon  
Aug 10 16:15:14 2009
@@ -158,9 +158,22 @@
  public abstract ExceptionOrReturnValue invoke(BrowserChannel channel,
  Value thisObj, int dispId, Value[] args);

+/**
+ * Load a new instance of a module.
+ *
+ * @param logger
+ * @param channel
+ * @param moduleName
+ * @param userAgent
+ * @param url top-level URL of the main page, null if using an old  
plugin
+ * @param tabKey opaque key of the tab, may be empty if the plugin  
can't
+ * distinguish tabs or null if using an old plugin
+ * @param sessionKey opaque key for this session, null if using an 

[gwt-contrib] [google-web-toolkit] r5937 committed - Comment out failing CoverageTest (caused by javac bug), reduce log spa...

2009-08-10 Thread codesite-noreply

Revision: 5937
Author: j...@google.com
Date: Mon Aug 10 16:58:23 2009
Log: Comment out failing CoverageTest (caused by javac bug), reduce log  
spamminess.

http://code.google.com/p/google-web-toolkit/source/detail?r=5937

Modified:
   
/changes/jat/ihm/dev/core/src/com/google/gwt/dev/javac/JavaBinaryOracleImpl.java
  /changes/jat/ihm/user/test/com/google/gwt/dev/jjs/test/CoverageTest.java

===
---  
/changes/jat/ihm/dev/core/src/com/google/gwt/dev/javac/JavaBinaryOracleImpl.java
 
Wed Jul 15 07:37:51 2009
+++  
/changes/jat/ihm/dev/core/src/com/google/gwt/dev/javac/JavaBinaryOracleImpl.java
 
Mon Aug 10 16:58:23 2009
@@ -55,7 +55,6 @@
  private final SetResource classes;

  private Resource sourceFile;
-

  public JavaBinaryImpl(String typeName,
  SetResource classes) {
@@ -334,8 +333,8 @@
  SourceNameCollector classData = processClass(logger, resource);
  String source = classData.getSource();
  if (source == null) {
-  binaryBranch.log(TreeLogger.ERROR, No source data in 
-  + resource.getLocation());
+  binaryBranch.log(TreeLogger.TRACE, Ignoring 
+  + resource.getLocation() +  - no source found);
continue;
  }
  // TODO(jat): do we need to worry about other separator chars here?
===
---  
/changes/jat/ihm/user/test/com/google/gwt/dev/jjs/test/CoverageTest.java
 
Tue Jun 16 14:33:06 2009
+++  
/changes/jat/ihm/user/test/com/google/gwt/dev/jjs/test/CoverageTest.java
 
Mon Aug 10 16:58:23 2009
@@ -101,7 +101,8 @@
 * see Google's internal issue 1628473. This is likely to be an  
hindrance
 * if and when GWT attempts to read bytecode directly.
 */
-  new NamedLocal().new NamedLocalSub().foo();
+  // TODO(jat): comment out for now
+  // new NamedLocal().new NamedLocalSub().foo();
  }

  public void bar() {

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