Re: Why does GWT's API differ so much from the Javascript one?

2011-11-13 Thread toont...@googlemail.com
Yes but it isn't clear how to share code between the client and server
-- especially in the case the original poster mentioned: org.w3c.dom.*
We were forced to wrap all the org.w3c.dom interfaces in classes that
implement the com.google.gwt.client.xml interfaces.

I understand that GWT can't implement some parts of org.w3c.dom.*
(e.g. namespaces) but rather than introduce a new interface I would
rather have had errors in those cases. The truly best situation would
be if the org.w3c.dom interfaces were defined as extending the
com.google.gwt.client.xml interfaces. But I don't see how that could
be done.

On Nov 12, 9:29 am, Thomas Broyer t.bro...@gmail.com wrote:
 Which API do you find so much different from the native one? I don't
 think com.google.gwt.dom.client.* can be less different that the API it's
 making available to the GWT Java world. Same for com.google.gwt.canvas,
 com.google.gwt.geolocation, com.google.gwt.media, com.google.gwt.regexp,
 com.google.gwt.storage, and com.google.gwt.xhr.
 Event handling has to be different for various reasons (prevent memory
 leaks being one of
 them:http://code.google.com/p/google-web-toolkit/wiki/DomEventsAndMemoryLeaks
 )

-- 
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: Why does GWT's API differ so much from the Javascript one?

2011-11-13 Thread Thomas Broyer
org.w3c.dom is such a pain to work with, you'd better define your own API 
that you implement on top of it (or JDOM or dom4j or whatever) on the 
server-side, and com.google.gwt.xml or com.google.gwt.dom on the 
client-side. This is exactly what the Wave guys did, and it works pretty 
well: 
https://svn.apache.org/repos/asf/incubator/wave/trunk/src/org/waveprotocol/wave/model/document/MutableDocument.java
 (their 
implementation is a bit convoluted, as it's layered with IndexedDocument 
that is necessary for the Operational Transformation operations, but my 
point is that it's possible and quite easy); it allows for such things like 
easy 
iteration: 
https://svn.apache.org/repos/asf/incubator/wave/trunk/src/org/waveprotocol/wave/model/document/util/DocHelper.java
 
and 
https://svn.apache.org/repos/asf/incubator/wave/trunk/src/org/waveprotocol/wave/model/document/util/DocIterate.java

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



Re: Why does GWT's API differ so much from the Javascript one?

2011-11-13 Thread Stephen Buergler
Window.open returns void. Stuff is missing like document fragments. It 
seems to me like none of this stuff has to be rewritten if it all the 
interfaces were generated from webidl then the implementations from GWT 
generators.

-- 
You received this message because you are subscribed to the Google Groups 
Google Web Toolkit group.
To view this discussion on the web visit 
https://groups.google.com/d/msg/google-web-toolkit/-/i0bqr3RJn5kJ.
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.



Apache - Httpd.conf Entry - Static images

2011-11-13 Thread Polaris Polaris
Dear all,
   I have put the following entry in the httpd.conf file for compress
and expiry page. Can you pls check and confirm whether my entry is
correct in this file or i need to enabled anyother files.


Files *.cache.*
#SetOutputFilter DEFLATE
ExpiresActive on
ExpiresDefault now plus 1 month
/Files


Location /MYCssFiles
 SetOutputFilter DEFLATE
SetHandler weblogic-handler
IfModule mod_weblogic.c
WebLogicCluster Clustering ip1,ip2
MatchExpression *
/IfModule

#expires module tag for specifying the expiry of specific file types
 #IfModule mod_expires.c
 IfModule expires_module
  ExpiresActive On
  ExpiresByType image/gif now plus 7 day
  ExpiresByType image/jpg now plus 7 day
  ExpiresByType image/png now plus 7 day
  ExpiresByType application/javascript now plus 7 day
  ExpiresByType text/css now plus 7 day
 /IfModule
/Location

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



Display first web page in GWT

2011-11-13 Thread Jonathan Gossage
I am a complete beginner with GWT and web development generally and I
trying to build a GWT app using baby steps so I can understand each
step. I have created a tiny app that simply as a styled layout panel
in the RootPanel. My code in onModuleLoad is:


public void onModuleLoad() {
LayoutPanel p = new LayoutPanel();
p.setStylePrimaryName(appbackground);
RootLayoutPanel.get().add(p);
p.setVisible(true);
}

and I have the following entry in the application style sheet:

appbackground {
background-image: url   (WEB-INF/images/background.jpg);
width: 80%; height: 80%; border: 10px,solid,red;
}

My problem is that I do not see any evidence of the styling in the
displayed web page. I have verified that the onModuleLoad() method is
being called. Can anyone spot what I  could be doing wrong:

Jonathan Gossage

-- 
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 HTTP RequestBuilder

2011-11-13 Thread karun
Hi Jens

Yes i am sure, i got response code as 200 and the jsp from J2EE server
is also getting displayed,

sorry for typo  my application is in server 2 and J2EE application is
in server 1.

to overcome SOP only, we have setup the 2 servers in above format. so
that domain name and port are same, both servers end with

1. example.com

2. and also both servers have same port no. 8111

when i went through the sop policy in gwt documentation, i came across
below way of  loading images and javascript files from different
server. which i felt is similiar to our setup.

 part of documentation is pasted below:

However, many organizations setup their deployment platform in such a
way that their main host HTML page is served up from http://mydomain.com/,
but any other resources such as images and JavaScript files are served
up from a separate static server under http://static.mydomain.com/. In
older versions of GWT, this configuration would not be possible as the
SOP prevented the GWT bootstrap process from allowing script from
files that were added from a different server to access the iframe in
the main host HTML page. As of GWT 1.5, the bootstrap model now
provides support for this kind of server configuration via the cross-
site linker (xs-linker).

When using the cross-site linker the compiler will still generate a
module.nocache.js that you will want to reference within your
index.html. The difference though, is that the module.nocache.js
produced by the cross-site linker will link in a cache.js file for
each of your permutations rather than a cache.html file.

To enable the cross-site linking simply add the following to your
module.gwt.xml and include a reference to your module.nocache.js
in your index.html as you normally would.

add-linker name=xs/

according to this doesn't our setup overcome SOP.

Thanks
kumar

On Nov 12, 1:55 am, Jens jens.nehlme...@gmail.com wrote:
 Sure you got a 200 in IE? IE should also give some error if you try to make
 a request to a different domain/port. Also shouldn't your code snippet use
 factory-dev109.example.com if server 2 is the server you want to request?

 Well but in general you have three options to make cross domain requests:

 1.) You have to use a reverse proxy so you can make requests to external
 servers without leaving the domain which serves the GWT application.
 2.) Make a GWT request to server 1 (works because there is no SOP) and then
 let your server side code on server 1 do a request to server 2 using plain
 java.
 3.) Use JsonpRequestBuilder. But this would require some rewrite of your
 server 2 code as you now need to provide your data as JSON and also wrap
 this JSON data in a javascript callback function whose name is send by GWT
 to your server 2 via a GET parameter.

 -- J.

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



Re: Apache - Httpd.conf Entry - Static images

2011-11-13 Thread Thomas Broyer
You should apply a very short expiry on *.nocache.*, see 
http://code.google.com/webtoolkit/doc/latest/DevGuideCompilingAndDebugging.html#perfect_caching

-- 
You received this message because you are subscribed to the Google Groups 
Google Web Toolkit group.
To view this discussion on the web visit 
https://groups.google.com/d/msg/google-web-toolkit/-/Xz2_ahNLZL8J.
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 HTTP RequestBuilder

2011-11-13 Thread Thomas Broyer


On Sunday, November 13, 2011 7:59:38 PM UTC+1, karun wrote:

 Hi Jens 

 Yes i am sure, i got response code as 200 and the jsp from J2EE server 
 is also getting displayed, 

 sorry for typo  my application is in server 2 and J2EE application is 
 in server 1. 

 to overcome SOP only, we have setup the 2 servers in above format. so 
 that domain name and port are same, both servers end with 

 1. example.com 

 2. and also both servers have same port no. 8111


That's not enough: factory-dev03.example.com is different from 
factory-dev109.example.com, so they're different origins.
 

 when i went through the sop policy in gwt documentation,


See http://en.wikipedia.org/wiki/Same_origin_policy, and 
http://www.schemehostport.com/2011/10/foundations-origin.html
 

 i came across 
 below way of  loading images and javascript files from different 
 server. which i felt is similiar to our setup. 

  part of documentation is pasted below: 

 However, many organizations setup their deployment platform in such a 
 way that their main host HTML page is served up from http://mydomain.com/, 

 but any other resources such as images and JavaScript files are served 
 up from a separate static server under http://static.mydomain.com/. In 
 older versions of GWT, this configuration would not be possible as the 
 SOP prevented the GWT bootstrap process from allowing script from 
 files that were added from a different server to access the iframe in 
 the main host HTML page. As of GWT 1.5, the bootstrap model now 
 provides support for this kind of server configuration via the cross- 
 site linker (xs-linker). 

 When using the cross-site linker the compiler will still generate a 
 module.nocache.js that you will want to reference within your 
 index.html. The difference though, is that the module.nocache.js 
 produced by the cross-site linker will link in a cache.js file for 
 each of your permutations rather than a cache.html file. 

 To enable the cross-site linking simply add the following to your 
 module.gwt.xml and include a reference to your module.nocache.js 
 in your index.html as you normally would. 

 add-linker name=xs/ 
  
 according to this doesn't our setup overcome SOP.


That's only about serving the GWT files from another server, it doesn't 
change anything about RPC/RequestFactory/RequestBuilder: they have to be 
issued by the same origin (your HTML host page) as the one they try to 
reach (or they can use CORS in non-IE browsers).
In other words, the URL you see in your browser should be factory-dev109 if 
your servlets are on that server; you can serve the *.nocache.js and 
associated *.cache.* files from the factory-dev03 server.

Also, note that the xs linker is being deprecated in favor of the 
xsiframe linker.

-- 
You received this message because you are subscribed to the Google Groups 
Google Web Toolkit group.
To view this discussion on the web visit 
https://groups.google.com/d/msg/google-web-toolkit/-/cbNk-efJ06cJ.
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.



Deferred binding with ClientBundle?

2011-11-13 Thread Ed
How can I override a ClientBundle through Deferred binding to override
or add resources like images?

Explain:
I have a CLientbundle LoginResources that extends from Clientbundle.
The LoginResources contains images that are used in the CSS file.
I like to be able to use the  RichLoginResources interfaces that
extends LoginResources that override some images methods in
LoginResources such that other images are shown (I want to use this
for Themes).

So my gwt configuration contains:
---
replace-with class=theme.standard.RichLoginResources
when-type-is class=bla.LoginResources /
/replace-with
--

The ClientBundle is created through:
GWT.log(LoginResources.class);
This works well until I add the above gwt config.
GWT complaints that RichLoginResources is abstract:
--
00:05:16,827 [ERROR] Deferred binding result type
'theme.standard.RichLoginResouces' should not be abstract
---

I understand the error as RichLoginResources is an interface, just
like LoginResources. However, I would expect that GWT is smart enough
to see that it concerns a ClientBundle an generate the code itself,
just like it does for LoginResources without the above gwt config.

What is going wrong here? And how could I make this work?
- Ed


-- 
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: Sessions and Activities and Places

2011-11-13 Thread Ashton Thomas
I handle this in two areas:

1) onModuleLoad: isAuthenticated/Valid Session 

2) 

-- 
You received this message because you are subscribed to the Google Groups 
Google Web Toolkit group.
To view this discussion on the web visit 
https://groups.google.com/d/msg/google-web-toolkit/-/T6HkY06Cz_gJ.
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: Sessions and Activities and Places

2011-11-13 Thread Ashton Thomas
I handle this in two areas:

1) onModuleLoad: isAuthenticated/Valid Session 

2) 

-- 
You received this message because you are subscribed to the Google Groups 
Google Web Toolkit group.
To view this discussion on the web visit 
https://groups.google.com/d/msg/google-web-toolkit/-/47RRkzwO8OEJ.
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.



Breakpoints don't work in Development Mode

2011-11-13 Thread Hans Schmitt
Hi,

after switching to a Mac I just set up Eclipse and GWT and was trying
to debug the Stockwatcher sample application. But the debugger doesn't
stop at any breakpoint, no matter if it is located in client or in
server code. (Yes, I'm sure that I started 'Development Mode'.) In non-
GWT projects debugging works just fine.

Here some informations about my setup:

OSX 10.7, JDK 1.6.0_29-b11-402, GWT 2.4.0, Eclipse Indigo Service
Release 1.

The JDK and Eclipse are 64bit versions.

Any ideas (please)?

-- 
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: Sessions and Activities and Places

2011-11-13 Thread -sowdri-
Have your tried moving login part to a separate GWT module, with a 
different url (consequently a separate host html) and let the container 
handle the session management?

-- 
You received this message because you are subscribed to the Google Groups 
Google Web Toolkit group.
To view this discussion on the web visit 
https://groups.google.com/d/msg/google-web-toolkit/-/vd9ZItvamt0J.
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.



EntityProxy equals

2011-11-13 Thread Hilco Wijbenga
Hi all,

I was trying to check the presence of an EntityProxy in a
SetEntityProxy [i.e. set.contains(proxy)]. This returned false even
though the proxy was an element of the set. As it turns out
EntityProxy.equals() doesn't work, or, more precisly, it seems to
behave as the default equals() and check reference equality instead of
value equality.

So how do I get a working value checking equals? Without it,
SetEntityProxy is just about useless. I didn't see anything relevant
in [1] and Google was no help either. (I did find a similar question
but it went unanswered.)

Cheers,
Hilco

[1] http://code.google.com/webtoolkit/doc/latest/DevGuideRequestFactory.html

-- 
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 Spring Interjection

2011-11-13 Thread Dave Potts


hi,

What is the best way of intergrating  a Gwt project with the spring
Framework?

I have seen several different attempts at doing this

gwt-spring-starter-app
orcades-gwt-spring
spring4gwt
gwtrpc-spring

The gwt application is going to be making simple Gwt Servlet requests and
will be expecting several strings or a jpg worth of data back.

Does anybody have suggestions as to which is the better choice or can
suggest another way of doing this type of thing?

Thanks in advance.

DAve.

-- 


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