Garbled InfoWindows in gwt-maps

2008-09-30 Thread Alberto Núñez

Since the upgrade to the 1.0.0 version of gwt-maps, I cannot see the
InfoWindows properly. They are messed up, displaying the complete
resource background image behind the text. For example, the InfoWindow
shadow is shown as this image: 
http://maps.google.com/intl/es_ALL/mapfiles/iws2.png

Is there any importante change in the library that could be affecting
me? I've been reviewing my code but I cannot find what could be making
this happen.
--~--~-~--~~~---~--~~
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 [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/Google-Web-Toolkit?hl=en
-~--~~~~--~~--~--~---



Re: Safe to make *ServiceAsync a singleton?

2008-09-30 Thread Lothar Kimmeringer

hezjing schrieb:

 I have many service creation (like the following code) in my GWT
 application,
 
 XxxxServiceAsync Service = GWT.create(XxxxrService.class);
 
 
 Is it safe to make all XxxxServiceAsync a singleton?

It's common practice. There are already IDEs that do that for you
automatically. In general you implement a Util-class that is holding
the system-wide Async-Instance:

Inside the Interface defining the remote service, in your
example above XxxxrService you put in the following:

/**
 * Utility class for simplifying access to the instance of async service.
 */
public static class Util {
private static XxxxrServiceAsync instance;

/**
 * Returns the system-wide instance of the endpoint allowing access
 * to the XxxxrService of the server
 * @return The instance
 */
public static XxxxrServiceAsync getInstance() {
if (instance == null) {
instance = (XxxxrServiceAsync) GWT.create(XxxxrService.class);
ServiceDefTarget target = (ServiceDefTarget) instance;
target.setServiceEntryPoint(GWT.getModuleBaseURL() + 
XxxxrService);
}
return instance;
}
}

So calling a RPC can be done with
XxxxrService.Util.getInstance.myRemoteFunction(param, callback);

This can be seen as Best practice (to refer to another thread
in this group ;-)


Regards, Lothar

--~--~-~--~~~---~--~~
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 [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/Google-Web-Toolkit?hl=en
-~--~~~~--~~--~--~---



Calendar button

2008-09-30 Thread Romain

Hello all,


I searched in gwt API if there was a calendar button to allow
selecting a date from a calendar in form.
But I didn't find it. Anybody can tell me if such button exist?

Thanks in advance,
Romain

--~--~-~--~~~---~--~~
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 [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/Google-Web-Toolkit?hl=en
-~--~~~~--~~--~--~---



Re: RichTextToolbar

2008-09-30 Thread ivan

+1 even for me

On 19 Set, 12:27, Martin Trummer [EMAIL PROTECTED] wrote:
 +1 from me

 On Sep 19, 4:52 am, Michael Neale [EMAIL PROTECTED] wrote:

  Is there any reason why RichTextToolbar is not including as part of
  GWT but is only as a sample ? (in the Showcase project)?

  Shouldn't this really be part of GWT itself, I mean the text area is
  not terribly helpful without it, and it seems a bit odd to create it
  each time (it is a bit tedious).

--~--~-~--~~~---~--~~
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 [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/Google-Web-Toolkit?hl=en
-~--~~~~--~~--~--~---



DialogBox in top window?

2008-09-30 Thread Nick

I'm currently integrating GWT into an already existing application.
The errors for this application are caught by a default handler in the
specific frame they occur.  I am currently dynamically populating a
dialogBox using this handler.  Unfortunately, the dialog box is
limited to the current frame the error is thrown/caught in.  Is there
a way that I can force the dialog box to come out in the browser
window instead of the frame?

Thanks for any help.

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



Issues with dynamic binding

2008-09-30 Thread Madhu

Strange issue. I am trying to use dynamic binding in my application. I
have set the meta property in my html file under head /head
meta name='gwt:property' content='customProvision=NetworkProf''
I have the following entries in my .gwt.xml b/w replace-with /
replace-with
any
when-property-is name=sparkDetailScreen
value=measureDetail /
/any
But when the hosted browser launches, it throws the error [ERROR]
Property 'sparkDetailScreen' not found. Any ideas? Am I missing any
jars or includes.

--~--~-~--~~~---~--~~
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 [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/Google-Web-Toolkit?hl=en
-~--~~~~--~~--~--~---



Enabling text selection on particular widget

2008-09-30 Thread Charan

I have disabled the default mouseEvents of browser by using the
following code

DOM.addEventPreview(new EventPreview()
{
public boolean onEventPreview(Event event)
{
switch (DOM.eventGetType(event))
{
case Event.ONMOUSEDOWN:
case Event.ONMOUSEMOVE:
case Event.ONMOUSEUP:
DOM.eventPreventDefault(event);
}
return true;
}
});

I have a several widgets in a FlexTable, one of widget is HTML widget
(in ScrollPanel) which displays static html data in it.
Now i need to enable text selection only on this HTML widget not all
widgets on browser.

i tried some ways which are enabling on the whole browser widgets.
This code enables for all browser
DOM.addEventPreview(new EventPreview()
{
public boolean onEventPreview(Event event)
{
switch (DOM.eventGetType(event))
{
case Event.ONMOUSEDOWN:
case Event.ONMOUSEMOVE:
case Event.ONMOUSEUP:
//DOM.eventCancelBubble(event, 
true);
//DOM.eventGetToElement(event);

//disableTextSelect(getBodyElement(), false);

//DOM.setElementProperty(getBodyElement(), onselectstart,
null);
}

return true;
}
});


My requirement is to enable only for HTML widget.

Thanks in advance
Regards,
S.charan Kumar

--~--~-~--~~~---~--~~
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 [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/Google-Web-Toolkit?hl=en
-~--~~~~--~~--~--~---



Seems like there is a conflict in the tutorial docs

2008-09-30 Thread Peter Recore

I have been working my way through some of the getting started docs,
and found what I think is a conflict on the page:

http://code.google.com/p/google-web-toolkit-doc-1-5/wiki/GettingStartedJSON

First we have this paragraph:
However, because eval() can execute any JavaScript code (not just JSON
data) this approach has some serious security implications. A much
safer option is to use a dedicated JSON parser instead, which will
only parse JSON text and never executable JavaScript code.
Fortunately, GWT happens to have just such a parser, which we'll use
to add JSON support to our StockWatcher sample application.

Basically, it says that GWT will supply us with a safe JSON parser so
we don't have to worry about accidentally eval()ing bad code.

But, a few paragraphs later we learn that we will need to call the
parse() method of JSONParser, which comes with this javadoc:
Evaluates a trusted JSON string and returns its JSONValue
representation. CAUTION! For efficiency, this method is implemented
using the JavaScript eval() function, which can execute arbitrary
script. DO NOT pass an untrusted string into this method.

So I think something is out of sync.


--~--~-~--~~~---~--~~
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 [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/Google-Web-Toolkit?hl=en
-~--~~~~--~~--~--~---



Enabling text selection on particular widget

2008-09-30 Thread Charan

hi,

I have disabled the default mouseEvents of browser by using the
following code

DOM.addEventPreview(new EventPreview()
{
public boolean onEventPreview(Event event)
{
switch (DOM.eventGetType(event))
{
case Event.ONMOUSEDOWN:
case Event.ONMOUSEMOVE:
case Event.ONMOUSEUP:
DOM.eventPreventDefault(event);
}
return true;
}
});

I have a several widgets in a FlexTable, one of widget is HTML widget
(in ScrollPanel) which displays static html data in it.
Now i need to enable text selection only on this HTML widget not all
widgets on browser.

i tried some ways which are enabling on the whole browser widgets.
This code enables for all browser
DOM.addEventPreview(new EventPreview()
{
public boolean onEventPreview(Event event)
{
switch (DOM.eventGetType(event))
{
case Event.ONMOUSEDOWN:
case Event.ONMOUSEMOVE:
case Event.ONMOUSEUP:
//DOM.eventCancelBubble(event, 
true);
//DOM.eventGetToElement(event);

//disableTextSelect(getBodyElement(), false);

//DOM.setElementProperty(getBodyElement(), onselectstart,
null);
}

return true;
}
});


My requirement is to enable only for HTML widget.

Thanks in advance
Regards,
S.charan Kumar

--~--~-~--~~~---~--~~
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 [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/Google-Web-Toolkit?hl=en
-~--~~~~--~~--~--~---



RichTextToolbar ...great!

2008-09-30 Thread ivan

+1 for me!

--~--~-~--~~~---~--~~
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 [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/Google-Web-Toolkit?hl=en
-~--~~~~--~~--~--~---



Re: Gwt with php

2008-09-30 Thread John

On 9/29/08, stymie [EMAIL PROTECTED] wrote:

  Hi,

  I cannot figure out how to get gwt working with php on the server
  side.

I can describe my setup, if it helps.

First, I have Xampp (linux, but Windows would be the same) set up on
my computer, and apache is configured so that
http://localhost/MySite/index.php shows my the home page of my test
site.

On the eclipse side, select your Project  Properties  Run/Debug
Settings and under the Arguments tab, use Edit to look at it, and
you should see something like this:

-out www com.yourdomain.yourproject.Module/index.htm

Now, back on the Run/Debug Settings, use Duplicate to add another
Run/Debug setting.  Change the name to add something like php
version so you can change back and forth.

Use Edit to change the Arguments to something like this:

-port 80 -noserver  -out full path to your document root/gwtfiles
MySite/mypage.php

Just to go over that, you're changing to port 80, you're saying DO NOT
use Tomcat, you're saying compile into a directory in your document
root directory called /gwtfiles, and you're saying that your project
page is mypage.php in your server's document root directory.  This
page can be a full-fledged normal php document, as long as you have
the div that Gwt is looking for.

Do as much as you can on the simple Tomcat hosted gwt development,
because it's easier, faster.  When you need to switch over to the php
setup, launch the php version, and hit the compile/browse button on
the top of the Gwt window.  This will put a directory of gwt stuff
under the /gwtfiles directory on your server.

If you do it like this, you can have multiple gwt projects on one
website, and they will each have their own subdirectory under
/gwtfiles

Also, if you have your css file in the same directory as your
index.htm (ie, on the tomcat side), then add something like
stylesheet src=myfilename.css / to the Module.gwt.xml file.  By
doing that, you will automatically update css on the php side when you
compile.  (of course, if your css is in a subdirectory, make the
appropriate change above)

When you make changes and then try testing, if you don't see any
effects from your changes, you probably forgot to hit the compile
button.  You get used to it.

I hope I haven't seriously misled you but this is what works for me.
If I left out details, just ask.

John

--~--~-~--~~~---~--~~
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 [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/Google-Web-Toolkit?hl=en
-~--~~~~--~~--~--~---



Re: linkable resources, caching, xslt xhtml generation with embedded js

2008-09-30 Thread Lawrence

Walden,

What you say is quite true. Transformation/XSLT is not ideal.
However, our system is all written in C++ and generates XML.
I can't change that. I can't put java on the server and I'm not sure
it would make any sense.
So basically no RPC, no serialization of objects .. i'm stuck with
xml.

The xml transformation is done by a stylesheet that is very old, about
750 lines of xsl.
It takes the xml and transforms it in a xhtml form with tabs, fields,
drop downs, etc ..
Actually, it shouldn't be too hard to rewrite that in java .. its just
about 1500 words.

So I guess I will look into it..Its always hard to convince management
that rewriting/refactoring something is
*that* necessary..



On Sep 29, 8:06 pm, walden [EMAIL PROTECTED] wrote:
 Lawrence,

 To paraphrase you, what you would like to do is switch to a client-
 centric model of writing your client.  That's good.  GWT is good for
 that.

 The part that doesn't make sense to me is to keep the XML-HTML via
 XSLT transformations.  That's not the way to build portable widgets in
 GWT.  Why don't you try writing a simple client in GWT that gets Java
 Objects from the server, and constructs Widgets to display information
 and ineract with the user?  Calling a widget constructor automatically
 invokes the right code for the browser where your application is
 running, where doing an XSLT transform puts you back in charge of
 managing N transforms for N browsers.

 As a bonus, you get to design, write and debug your entire application
 as if it were Java, including the user's interaction with it.  Who
 wants to debug an xslt transform session?

 Walden

 On Sep 29, 9:47 am, Lawrence [EMAIL PROTECTED] wrote:

  Hi all!

  Been lurking for a while now and I like this vibrant community a lot,
  so, thank you for that :)

  I need to redesign our web app so that it can support IE 7, gecko,
  Opera, webkit (one day IE8).
  The old one was hand crafted to work only with IE6.

  The idea is to use gwt and get coding on business requirements rather
  than trying to work around all browsers .. but I have a few question :

  Currently we serve dynamic pages and we use ajax just to get
  notifications if something changed.
  We then recreate the page with the updated content and send it back to
  the browser.
  Part of this pages is generated via XSLT (on server)
  We have our XML data we transform it via xslt with our stylesheet
  (xhtml) and we return the new consturcted page.
  This styleshee converts our data to all sort of controls : checkboxes,
  date pickers, drop down, labels, buttons, etc.
  Every data page can be bookmarked.

  What I would like to do is recreate the web app via GWT, but instead
  of retrieving an entire page every time some data
  is requested I would prefer to only do an ajax request for the xml and
  then to the transformation locally on the client.
  I saw someone porting sarissa to GWT so this should be possible.

  The only problem is that we embedded quite a few js calls in the
  stylesheet, and those now will need to be handled by GWT rather than
  the old, IE6 only, js scripts.
  I know that gwt compress/obscure the output js to make it faster, so I
  wonder, how can I mix the two ? Is it possible ?

  Also, if I do everything via ajax/xml, does this mean people can no
  longer save link to pages, bookmark them ?

  Thanks

  Lawrence
--~--~-~--~~~---~--~~
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 [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/Google-Web-Toolkit?hl=en
-~--~~~~--~~--~--~---



Problem in running GWT-EXT

2008-09-30 Thread vimalp015

Hi,
 Am facing few problems with my gwt-ext application. Its a simple
tree more or less very similar to one in showcase checkbox tree. I
have done all the things, even I got the desired output, but wen I
compile/browse and I take the output, the HTML output runs fine on:

 http://localhost:/com.vimal.GwtExtTree/GwtExtTree.html

but does not showup the tree when run on

file://localhost/D:/Eclipse/workspace/GwtExtVal/build/gwtOutput/com.vimal.GwtExtTree/GwtExtTree.html

It seems like its not fetching the XML I have written for tree nodes.

Please let me know wat the problem is., thank you in advance.

Thx,
Vimal

--~--~-~--~~~---~--~~
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 [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/Google-Web-Toolkit?hl=en
-~--~~~~--~~--~--~---



Re: How to call applet in gwt

2008-09-30 Thread Lothar Kimmeringer

Hello ... whoever,

ship schrieb:

 I am using gwt in a application in which when i click on a button,
 then an applet will be called.
 How can i call a simple java applet in my gwt app???
 Pl help me!

first of all, your keyboard needs a repair, it repeats ! and ?
all the time.

What exactly do you mean with call an applet? If we're
talking of just starting an applet, you can create a
HTML-widget and set the HTML-tags for the applet (directly
typed in, might not work):

HTML applet = new HTML();
panel.add(applet);
applet.setHTML(APPLET src=\/applets/MyApplet.class\ etc.);

The browser happily interprets the HTML and should load and
start the applet. That way you should also be able to pass
arguments using the PARAM-tags.

If you want a steady communication, you have to use the Java-
to-Javascript-bridge provided by the browser, that you have
to access using JSNI.


Regards, Lothar

--~--~-~--~~~---~--~~
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 [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/Google-Web-Toolkit?hl=en
-~--~~~~--~~--~--~---



onBrowserEvent override of Tree

2008-09-30 Thread ArunDhaJ

Hi,
I'm overriding the onBrowserEvent event of Tree for capturing mouse
right click, for generating context menu. How to get the Tree Item
which has been right clicked in onBrowserEvent?

else is there any way to capture right click event of TreeItem?

Thanks in Advance

-ArunDhaJ
--~--~-~--~~~---~--~~
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 [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/Google-Web-Toolkit?hl=en
-~--~~~~--~~--~--~---



Enable Text Selection on HTML widget while browser default events are prevented

2008-09-30 Thread Charan

hi,

I have disabled the default mouseEvents of browser by using the
following code

DOM.addEventPreview(new EventPreview()
{
public boolean onEventPreview(Event event)
{
switch (DOM.eventGetType(event))
{
case Event.ONMOUSEDOWN:
case Event.ONMOUSEMOVE:
case Event.ONMOUSEUP:
DOM.eventPreventDefault(event);
}
return true;
}
});

I have a several widgets in a FlexTable, one of widget is HTML widget
(in ScrollPanel) which displays static html data in it.
Now i need to enable text selection only on this HTML widget not all
widgets on browser.

i tried some ways which are enabling on the whole browser widgets.
This code enables for all browser
DOM.addEventPreview(new EventPreview()
{
public boolean onEventPreview(Event event)
{
switch (DOM.eventGetType(event))
{
case Event.ONMOUSEDOWN:
case Event.ONMOUSEMOVE:
case Event.ONMOUSEUP:
//DOM.eventCancelBubble(event, 
true);
//DOM.eventGetToElement(event);

//disableTextSelect(getBodyElement(), false);

//DOM.setElementProperty(getBodyElement(), onselectstart,
null);
}

return true;
}
});


My requirement is to enable only for HTML widget.

Thanks in advance
Regards,
S.charan Kumar

--~--~-~--~~~---~--~~
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 [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/Google-Web-Toolkit?hl=en
-~--~~~~--~~--~--~---



Re: Background color for DecoratedTabPanel

2008-09-30 Thread Shri

Thanks but it didnt work for .gwt-DecoratedTabBar also.

On Sep 29, 10:28 am, Ian Bambury [EMAIL PROTECTED] wrote:
 .gwt-DecoratedTab*Bar* .gwt-TabBarItem  {
   background:#FF0;

 }

 Ian

 http://examples.roughian.com

 2008/9/29 Shri [EMAIL PROTECTED]





  Hi,
  I am not able to change the background color of DecoratedTabPanel tab
  baritems. I tried to use background attribute in - .gwt-
  DecoratedTabPanel .gwt-TabBarItem but it doesn't work. Please help me
  on this issue.

  Thanks,
  Shridhar- 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 [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/Google-Web-Toolkit?hl=en
-~--~~~~--~~--~--~---



Re: GWT and servlet session

2008-09-30 Thread walden

Sim123,

I don't think you mentioned whether you are using the regular Hosted
Mode or the -noserver variant of that.  To test ServletFilter
behavior, you will have to go with -noserver, or else test in a web
mode environment.  That's the first thing.

Second, you are making assumptions about how GWT RPC maps onto an HTTP
POST.  You cannot expect to dig RPC parameters out of the request as
if they were HTTP parameters.  Basically, RPC is opaque.

So here's the rub, and now I get to preach from the top of my little
crate again.  You are hand-rolling security by piggybacking
authentication session information right in the application layer of
your RPC stuff.  You are paying the price for this doubly: (1) you are
polluting your applicationi logic with extra security parameters,
which should be orthogonal to your business logic, and (2) you can't
dig the session out of the RPC serialized mess, so even though you're
enduring the pain of (1), it won't work.

If I were you, I'd consider using either HTTP Basic, HTTP Digest, or
HTTP Basic over SSL for establishing and maintaining a secure session
with your server.  It all depends on how secure your app needs to be.
If you just need reasonable protection against stolen credentials, the
second option above should be fine.

Walden

On Sep 29, 4:52 pm, sim123 [EMAIL PROTECTED] wrote:
 Thanks for reply, actually I don't know where exactly the problem is,
 please bare with me.

 First thing is : Compile/Browser option is not working when Filter is
 enabled, this filter just checks for existing session using
 request.getSession(false), if session exists request is valid other
 wise I am throwing an error message saying session is null.

 In hosted mode everything works fine, no issues at all.

 Another thing which I noticed is strange behavior of
 request.getParameter method in case of RPC. RPC method are http POST
 method and now I am passing sessionID with request payload i.e.
 another parameter in my method

 public String getData(String studentID, string sessionID);

 I am trying to get this sessionID in my filter's dofilter method

 public void doFilter(ServletRequest request, ServletResponse response,
 FilterChain chain) ServletException {
 if ( ! isLoginRequest(request) ) {
                         session = ((HttpServletRequest) request).getSession();
                         String sessionIDFromReq =
 ((HttpServletRequest)
 request).getSession().getParamter(sessionID); //this ID is null

                         if ( session.getID().equals( sessionIDFromReq) ) {
                                 chain.doFilter(request, response);

                         } else {

                                 throw new ServletException(session is null);
                         }
         }

 }

 The only thing I know is for some reason I am not getting sessionID in
 filter even thought session is created. Please help, I hope I made
 things little more clear this time.
 Thanks
 On Sep 29, 6:14 am, walden [EMAIL PROTECTED] wrote:



  I'm not sure, but I think Tomcat should 
  treathttp://localhostandhttp://ip-address as different origins requiring 
  separate sessions.
  If this is your only problem, then don't use the IP address to access
  your site.

  If it's not the only problem, thenpostsome meaningful diagnostics
  from your server log.  You should have done that in your firstpost.

  Walden

  On Sep 28, 1:08 pm, sim123 [EMAIL PROTECTED] wrote:

   Someone please look into this issue, I really have no clue what is
   going on.

   On Sep 27, 3:38 pm, sim123 [EMAIL PROTECTED] wrote:

I have a simple application built in GWT and java servlet

1. User login : user logs in using a asynchronous call to server, RPC
service creates a session and return it to client, on OnSuccess of
this login call I load data on to browser, there are few RPC calls and
one call to downlaod pictures from another tomcat instance.

2. I have servlet filter implemented to check if the request is valid
or not, based on session coming from Cookies this filter validates the
request and pass it to appropriate RPC or non RPC Servlet.

Now everything is working fine in hosted mode browser but when I do
compile/browse I get authentication exception in filter, I don't know
ehy is it so as I am getting the session ID back in onSuccess method
of Login call and after that I am performing all other operaitons. I
created a war file and deployed it on external tomcat, everything
works fine if I type http://localhost:8080/login/Login.html;, but if
I type ip address of my machine instead of localhost I get same
authentication exception saying session is null, is there something
realated to redirecting to another tomcat's instance when loading
images? If that is the case why it is not happening in hosted mode and
inlocalhsot ?

I would really appreciate if somebody could please help me with this
issue.

Thansk for all the 

Re: FocusPanel not allowing focus on nested text fields

2008-09-30 Thread walden

Michael,

I suspect you have not built your composite correctly.  Please post
your composite code here.

Walden

On Sep 29, 10:41 pm, Michael Neale [EMAIL PROTECTED] wrote:
 I am just trying to detect that the user has clicked on ANYTHING
 within the FP. I just capture an event that they clicked and note
 that, that is all.





 On Tue, Sep 23, 2008 at 6:05 PM, Thomas Broyer [EMAIL PROTECTED] wrote:

  On 23 sep, 07:11, Michael Neale [EMAIL PROTECTED] wrote:
  If I have a composite, which in turn has text fields in it, when I
  wrap all that in a FocusPanel - I can't seem to *easily* click on it
  (I have to click a few times) to set the focus on the field to edit
  it.

  Any ideas on what this is? (tabbing seems to work - its the mouse
  clicking). Am I abusing FocusPanel?

  Maybe (probably?). What are you using the FocusPanel for? What's the
  use case? What's the intended behavior?

 --
 Michael D Neale
 home:www.michaelneale.net
 blog: michaelneale.blogspot.com- 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 [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/Google-Web-Toolkit?hl=en
-~--~~~~--~~--~--~---



Re: I18n in GWT1.5 sufficiently mature?

2008-09-30 Thread jbdhl

Yes, the problem is about sufficient tools to provide appropriate
information for the translators, but indirectly also about GWTs use of
conventional java property files and their lack of support for meta
data. I filed an issue about the need for better translator tools
here:
   http://code.google.com/p/google-web-toolkit/issues/detail?id=2926
and apparently google works actively on supporting XLIFF as an
alternative to property files. (XLIFF is a standard for exchanging
translations which allows meta data and even non-Germanic plural
forms.) This will be a *huge* improvement of GWT towards large
internationalized deployments. Property files just isn't an elegant
solution.

However, I can't find any information about the progress on
implementing XLIFF and unfortunately my question about it to this
group also resulted in no answers:
   
http://groups.google.com/group/Google-Web-Toolkit/browse_thread/thread/f332ae539b9bb6f4

So I guess the conclusion on all this is the following: Until XLIFF is
supported by GWT, the only way of providing appropriate information to
the translators is to manually build various somewhat un-elegant
contraptions upon version trackers, diff and possibly other tools to
provide non-techie-readable output. When XLIFF support arrives, there
will (finally) be a base on which tools like the merge tool I
mention in the above issue (#2926) can be build. Such a tool would
ease the work for both developers and translators considerably.

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 [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/Google-Web-Toolkit?hl=en
-~--~~~~--~~--~--~---



Re: Combobox Display problem

2008-09-30 Thread walden

Mark,

I'm not sure about your ComboBox.  That's a Gwt-Ext widget, something
whose internal structure I'm not familiar with, and for support with
that you ought to consult the right group.

However, I can clear up a CSS misunderstanding for you.  The 'dot' at
the beginning of a CSS selector means that the string of characters
that follow are a style class name, so .img would apply to elements
that look like this:

div class=imgstuff/div !-- this is not an img element --

That's not what you want.  Without the 'dot', the selector refers to
an element type, in this case all img elements.  The question is
whether you want that kind of margin setting on all images, including
those in your ComboBox.  I suspect not.  In order to cancel that, you
need to either override that same rule

img { margin-top: 0;}

or supercede it in the cascade with a more specific rule.  For
example, if the img element in your ComboBox has a CSS class of
foo, then you can do

.foo { margin-top: 0;}

There may be many ways, depending on the tag structure and the
associated style classes, to accomplish this, but it entails detailed
knowledge of how the widget is composed and classed, which I don't
have.

Hope this gives you a start...

Walden


On Sep 30, 4:42 am, mark morreny [EMAIL PROTECTED] wrote:
 Hi,

 I am getting a strange ComboBox problem where the pulldown is displayed
 properly but the scroll image is displayed below the pulldown box instead of
 on the right of the pulldown box.

 I found the following thred from the Internet:
 (http://gwt-ext.com/forum/viewtopic.php?f=8t=1975p=7459#p7459)
 *I found the problem and while I do feel a bit stupid, I will post it here
 to warn others.

 The GWT application creator produces a sample CSS file that for some crazy
 reason includes:

 img {
 margin-top: 20px;

 }*

 I tried pasting:
 .img {
 *margin-top: 20px;* }

 into my css file, but it still does not fix the problem.  Does anyone know
 how I can get ComboBox displayed properly?

 Thanks,
 Mark
--~--~-~--~~~---~--~~
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 [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/Google-Web-Toolkit?hl=en
-~--~~~~--~~--~--~---



ANNOUNCE: HtmlUnit 2.3 now supports GWT 1.5

2008-09-30 Thread Ahmed Ashour

Dear all,

It is a pleasure to announce that HtmlUnit 2.3 is released, and GWT
support is one of its main points.

The other additions:
- Better generics: which eliminates casting for the most commonly
used 'get' methods.
- Add Firefox 3 support, and making Internet Explorer 7 the
default browser.
- Various bug fixes, the change log resides in
http://htmlunit.sourceforge.net/changes-report.html#a2.3

Awaiting your feedback on your live GWT projects.

Yours,
Ahmed
--~--~-~--~~~---~--~~
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 [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/Google-Web-Toolkit?hl=en
-~--~~~~--~~--~--~---



Re: Garbled InfoWindows in gwt-maps

2008-09-30 Thread Eric Ayers
Hello Alberto,
I've not heard of this before.  Can you send a small code sample that
reproduces the issue along with the necessary resources?

-Eric.

On Tue, Sep 30, 2008 at 3:13 AM, Alberto Núñez [EMAIL PROTECTED] wrote:


 Since the upgrade to the 1.0.0 version of gwt-maps, I cannot see the
 InfoWindows properly. They are messed up, displaying the complete
 resource background image behind the text. For example, the InfoWindow
 shadow is shown as this image:
 http://maps.google.com/intl/es_ALL/mapfiles/iws2.png

 Is there any importante change in the library that could be affecting
 me? I've been reviewing my code but I cannot find what could be making
 this happen.
 



-- 
Eric Z. Ayers - GWT Team - Atlanta, GA USA
http://code.google.com/webtoolkit/

--~--~-~--~~~---~--~~
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 [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/Google-Web-Toolkit?hl=en
-~--~~~~--~~--~--~---



Re: Enabling text selection on particular widget

2008-09-30 Thread Charan
hi can anyone help me in this it should only highlight / text
selection only on HTML widget only

On Sep 29, 8:16 pm, Charan [EMAIL PROTECTED] wrote:
 hi,

 I have disabled the default mouseEvents of browser by using the
 following code

 DOM.addEventPreview(new EventPreview()
                 {
                         public boolean onEventPreview(Event event)
                         {
                                 switch (DOM.eventGetType(event))
                                 {
                                 case Event.ONMOUSEDOWN:
                                 case Event.ONMOUSEMOVE:
                                 case Event.ONMOUSEUP:
                                         DOM.eventPreventDefault(event);
                                 }
                                 return true;
                         }
                 });

 I have a several widgets in a FlexTable, one of widget is HTML widget
 (in ScrollPanel) which displays static html data in it.
 Now i need to enable text selection only on this HTML widget not all
 widgets on browser.

 i tried some ways which are enabling on the whole browser widgets.
 This code enables for all browser
 DOM.addEventPreview(new EventPreview()
                 {
                         public boolean onEventPreview(Event event)
                         {
                                 switch (DOM.eventGetType(event))
                                 {
                                         case Event.ONMOUSEDOWN:
                                         case Event.ONMOUSEMOVE:
                                         case Event.ONMOUSEUP:
                                                 
 //DOM.eventCancelBubble(event, true);
                                                 
 //DOM.eventGetToElement(event);
                                                 
 //disableTextSelect(getBodyElement(), false);
                                                 
 //DOM.setElementProperty(getBodyElement(), onselectstart,
 null);
                                 }

                                 return true;
                         }
                 });

 My requirement is to enable only for HTML widget.

 Thanks in advance
 Regards,
 S.charan Kumar
--~--~-~--~~~---~--~~
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 [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/Google-Web-Toolkit?hl=en
-~--~~~~--~~--~--~---



Re: Delaying a loop.

2008-09-30 Thread sutarsa giri
Hi Peter,
i think you should change your callback method, so server 2 restart request
invoke after server1 restart command complete(onSuccess or onFailure invoked
by call back)

-gede-

On Mon, Sep 29, 2008 at 10:49 PM, Peter D. [EMAIL PROTECTED] wrote:


 I've read a few posts on here on how to delay loops and such using
 Timers but I am unsure if they fit with my particular needs. I am
 writing a feature for a GWT app I inherited that controls application
 server states. (e.g. Start/Stop/Restart etc). I thought it would be a
 cool idea to allow the users to set delays between each command sent
 to the app server.

 Example:

 SERVER1 - RESTART
 DELAY 15 SECONDS
 SERVER2 - RESTART
 DELAY 15 SECONDS
 ...

 The problem I am having is with the delaying. Using a Timer would not
 work because the timers return instantly when you set them on a
 schedule. So any servers set with an action below any timers would
 start right away. And all delay timers would start almost at the same
 time.

 The functionality I want is to be able to go through that list and do
 each action one by one. Send restart server 1 command, delay 15
 seconds, send restart server 2 command, delay 15 seconds, etc...

 I would appreciate any suggestions or insights on this problem, 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 [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/Google-Web-Toolkit?hl=en
-~--~~~~--~~--~--~---



Re: Delaying a loop.

2008-09-30 Thread Thomas Broyer


On 29 sep, 17:49, Peter D. [EMAIL PROTECTED] wrote:
 I've read a few posts on here on how to delay loops and such using
 Timers but I am unsure if they fit with my particular needs. I am
 writing a feature for a GWT app I inherited that controls application
 server states. (e.g. Start/Stop/Restart etc). I thought it would be a
 cool idea to allow the users to set delays between each command sent
 to the app server.

 Example:

 SERVER1 - RESTART
 DELAY 15 SECONDS
 SERVER2 - RESTART
 DELAY 15 SECONDS
 ...

 The problem I am having is with the delaying. Using a Timer would not
 work because the timers return instantly when you set them on a
 schedule. So any servers set with an action below any timers would
 start right away. And all delay timers would start almost at the same
 time.

 The functionality I want is to be able to go through that list and do
 each action one by one. Send restart server 1 command, delay 15
 seconds, send restart server 2 command, delay 15 seconds, etc...

 I would appreciate any suggestions or insights on this problem, thank
 you.

Push commands into a queue.
Commands are all asynchronous (server restart might be synchronous
if you don't wait for a response that the restart order has been
received and taken into account), so you'll wait for the command to
complete before launching the following one.
In a few word:
 - each command would know how to run and report completeness
(AsyncCallback for RPCs, RequestCallback for RequestBuilder, an
interface of your choice for Timers that'd be called from the Timer's
run() method)
 - your callback passed to each command's run() method simply
dequeue and run and the next command, passing itself as the callback
(to dequeue and run the next command, etc.)


--~--~-~--~~~---~--~~
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 [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/Google-Web-Toolkit?hl=en
-~--~~~~--~~--~--~---



Re: common stuff

2008-09-30 Thread walden

In my project, I have my own data proxy class that behaves pretty much
like what you describe.  It's a singleton that proxies all requests to
the actual RPC (generated) proxy.  It is the layer into which I make
all RPC calls.  It performs caching and notification for certain data
queries.  It supports a 'reference data set', which is expected to be
static for the duration of a client session, which is retrieved once
and cached.  It has the ability to register listeners on certain data
sets (including the refrence data), and will invoke their callbacks
whenever that set gets refreshed from the server.  Is this what you
had in mind?

BTW, Remember that after your code is compiled by the GWT compiler,
it's not Java, and so Java class loading is the wrong paradigm.

Walden

On Sep 29, 4:40 pm, rty [EMAIL PROTECTED] wrote:
 Hi

 I want to write one common class which does some startup things for my
 project.I want to make sure that class is loaded first and all the gwt
 rpc calls should go through that class first. How should I proceed for
 it.

 thanks
 rty
--~--~-~--~~~---~--~~
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 [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/Google-Web-Toolkit?hl=en
-~--~~~~--~~--~--~---



Re: My googlebot approach for GWT: UserBotRouter

2008-09-30 Thread jdwyah

Hey John,
From what I can tell, you need to be careful with that approach
(although it's pretty darn cool). Google get's very nervous when it
finds out that the googlebot is going one place but users are going
another since this is something that evil, spam-y websites do. It's
tough to get a definitive answer, but my decision from reading the
google bot forums was that it was too dangerous to try this approach.

I'm totally biased of course, but you might check out the interview I
did with InfoQ that includes a free chapter of my book. The chapter
just happens to be the one about SEO with GWT, so you might find it
useful. It's available at http://www.infoq.com/articles/progwt

My solution was to serialize data into the page itself instead of RPC
and then output in noscript tags. The process is described in the
chapter available above.

gl,

-Jeff


On Sep 28, 11:41 pm, John Fowler [EMAIL PROTECTED] wrote:
 Please advise concerning my approach for enabling googlebot to index
 my GWT site:http://www.SudokuComplete.com/

 First, I needed to create a static, flattened, html-only view of my
 website.  To do this, I created a simple .Net program that uses the IE
 WebBrowser control to navigate to my GWT site.  The program takes a
 URL with a history token, let's the browser run through the GWT
 javascript, and then saves a copy of the resulting DOM html to a file
 with a name based on the history token.  This file is essentially an
 html-only view of the site as-of the history token.  I use the program
 to save static versions of each of the major history tokens on the
 site.  These files are the ones I want googlebot to index.  And to
 provide navigation for googlebot, I add links between all the files at
 the end of each of them.

 Next, I created my UserBotRouter, a .Net HttpModule (analagous to a
 J2EE Web Filter) that analizes the incoming requests to the website.
 It checks the UserAgent header to see if the request is being made by
 a bot or a standard browser.  If it is a bot, then it routes the
 request to the appropriate static html page (created in step #1).  If,
 however, a standard (non-bot) browser requests one of the static
 pages, then my module sends an HTTP redirect to send the user's
 browser to the corresponding GWT page including the respective history
 token.  In this manner, I am able to route users to the GWT pages, and
 bots to the static HTML pages.

 Am I missing anything?  Does this sound like a workable approach?

 Can GWT build something like this into their compiler?  That is, if
 GWT compiles different versions for the different browsers, why not
 create a set of standard bot pages.  In the module XML file the
 developer could specify the tokens for which GWT should create html
 pages.  GWT would use an approach similar to mine above to create
 static html files for the tokens.  Then, in these static html files,
 some javascript could redirect the browser to the corresponding GWT
 url.  This javascript redirect would affect actual user's browsers,
 whereas bots would continue to read the page as-is, following links to
 the other static pages.

 Please let me know what you think,

 john...
--~--~-~--~~~---~--~~
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 [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/Google-Web-Toolkit?hl=en
-~--~~~~--~~--~--~---



Re: linkable resources, caching, xslt xhtml generation with embedded js

2008-09-30 Thread walden

Hi Lawrence,

That's life I guess.  You still have some options, though.  For
instance, what if you create an alternate set of transforms that
output JSON, and again just concentrate on outputting application
data, not HTML elements.  Then you can do RequestBuilder requests from
your client to fetch application data, not pages, and still use GWT
widget programming to control the UI.  You really need to find a
bridge from your current stuff to *widget programming* on the client,
or else I fear that GWT will give you little for your investment.

If your management wants to ride the web 2.0 wave, they're going to
have to invest something too.  It ain't free.

Walden

On Sep 30, 5:45 am, Lawrence [EMAIL PROTECTED] wrote:
 Walden,

 What you say is quite true. Transformation/XSLT is not ideal.
 However, our system is all written in C++ and generates XML.
 I can't change that. I can't put java on the server and I'm not sure
 it would make any sense.
 So basically no RPC, no serialization of objects .. i'm stuck with
 xml.

 The xml transformation is done by a stylesheet that is very old, about
 750 lines of xsl.
 It takes the xml and transforms it in a xhtml form with tabs, fields,
 drop downs, etc ..
 Actually, it shouldn't be too hard to rewrite that in java .. its just
 about 1500 words.

 So I guess I will look into it..Its always hard to convince management
 that rewriting/refactoring something is
 *that* necessary..

 On Sep 29, 8:06 pm, walden [EMAIL PROTECTED] wrote:



  Lawrence,

  To paraphrase you, what you would like to do is switch to a client-
  centric model of writing your client.  That's good.  GWT is good for
  that.

  The part that doesn't make sense to me is to keep the XML-HTML via
  XSLT transformations.  That's not the way to build portable widgets in
  GWT.  Why don't you try writing a simple client in GWT that gets Java
  Objects from the server, and constructs Widgets to display information
  and ineract with the user?  Calling a widget constructor automatically
  invokes the right code for the browser where your application is
  running, where doing an XSLT transform puts you back in charge of
  managing N transforms for N browsers.

  As a bonus, you get to design, write and debug your entire application
  as if it were Java, including the user's interaction with it.  Who
  wants to debug an xslt transform session?

  Walden

  On Sep 29, 9:47 am, Lawrence [EMAIL PROTECTED] wrote:

   Hi all!

   Been lurking for a while now and I like this vibrant community a lot,
   so, thank you for that :)

   I need to redesign our web app so that it can support IE 7, gecko,
   Opera, webkit (one day IE8).
   The old one was hand crafted to work only with IE6.

   The idea is to use gwt and get coding on business requirements rather
   than trying to work around all browsers .. but I have a few question :

   Currently we serve dynamic pages and we use ajax just to get
   notifications if something changed.
   We then recreate the page with the updated content and send it back to
   the browser.
   Part of this pages is generated via XSLT (on server)
   We have our XML data we transform it via xslt with our stylesheet
   (xhtml) and we return the new consturcted page.
   This styleshee converts our data to all sort of controls : checkboxes,
   date pickers, drop down, labels, buttons, etc.
   Every data page can be bookmarked.

   What I would like to do is recreate the web app via GWT, but instead
   of retrieving an entire page every time some data
   is requested I would prefer to only do an ajax request for the xml and
   then to the transformation locally on the client.
   I saw someone porting sarissa to GWT so this should be possible.

   The only problem is that we embedded quite a few js calls in the
   stylesheet, and those now will need to be handled by GWT rather than
   the old, IE6 only, js scripts.
   I know that gwt compress/obscure the output js to make it faster, so I
   wonder, how can I mix the two ? Is it possible ?

   Also, if I do everything via ajax/xml, does this mean people can no
   longer save link to pages, bookmark them ?

   Thanks

   Lawrence- 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 [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/Google-Web-Toolkit?hl=en
-~--~~~~--~~--~--~---



Standard themes not crossbrowser?

2008-09-30 Thread mattscape

I've written a small GWT application using a standard theme. After
testing my site in IE6 I was rather surprised that the site is looking
so different in IE6.

If you for example compare 
http://gwt.google.com/samples/Showcase/Showcase.html#CwBasicButton
in IE6 and Firefox 3.0 you get two different UIs:
In IE 6
- Fonts are bigger
- Buttons are much bigger
- GWT-Icon is missing
- Icons in Tabletree are missing
- Rounded-Border Icon is missing
...

I've did a screenshot of both: http://www.ipernity.com/doc/mattscape/3082839

What are you doing if you are using a standard theme?

Matthias

--~--~-~--~~~---~--~~
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 [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/Google-Web-Toolkit?hl=en
-~--~~~~--~~--~--~---



Re: onBrowserEvent override of Tree

2008-09-30 Thread gaurava

Attach a listener to the tree and select the event as treeEventObj's
right click.
But it will work only with jdk 1.5 and not jdk 1.6.

Create a Menu inside the isRightClick condition,and attach the menu
to the tree as context menu.
Please see the sample code below:-



 tree.addListener( Events.SelectionChange, new ListenerTreeEvent() {
  public void handleEvent( final TreeEvent treeEventObj)
  {
if( treeEventObj.isRightClick() ) {
  final Menu contextMenu = new Menu();
  contextMenu.setWidth( 130 );
  final MenuItem addNodeMenu = new MenuItem( Menu A );
 final MenuItem addAttributeMenu = new MenuItem( Menu B );
  contextMenu.add( addNodeMenu );
  contextMenu.add( addAttributeMenu );
  tree.setContextMenu( contextMenu );
}

   }
  });

On Sep 30, 2:20 pm, ArunDhaJ [EMAIL PROTECTED] wrote:
 Hi,
 I'm overriding the onBrowserEvent event of Tree for capturing mouse
 right click, for generating context menu. How to get the Tree Item
 which has been right clicked in onBrowserEvent?

 else is there any way to capture right click event of TreeItem?

 Thanks in Advance

 -ArunDhaJ

--~--~-~--~~~---~--~~
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 [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/Google-Web-Toolkit?hl=en
-~--~~~~--~~--~--~---



Re: linkable resources, caching, xslt xhtml generation with embedded js

2008-09-30 Thread Lawrence

Oh, I agree completely.
You got to invest time if you want it to be done *right*.
We really want to offload any transformation on the client side, such
as xml - xhtml or xml - json.
However I see how we would be better off controlling the UI via GWT
rather than generating it, so I believe
I'm going to redo what the xsl stylesheet does in Java..we do it on
the client AND we have control of the widgets.

Since we are there we are also thinking to do it in a RESTful manner,
but I wonder how GWT handles rest and
how can I link to resources..but this is an other story :)

Walden, thanks for your time!

Lawrence
--~--~-~--~~~---~--~~
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 [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/Google-Web-Toolkit?hl=en
-~--~~~~--~~--~--~---



Re: Integration testing ImageBundles

2008-09-30 Thread Thomas Broyer


On 29 sep, 18:25, mfuzzey [EMAIL PROTECTED] wrote:
 Hi;
 I'm trying to integration test a GWT application using ImageBundle
 with WebDriver.
 At one point I have images that represent various states of an object
 and I need to check the correct image is being displayed.
 However due to the use of ImageBundle the browser is actually seeing
 something like :

 img border=0 style=background: transparent url(http://localhost:
 8180/aftDemo/aftDemo.gwtui.Application/
 2EC9C8781E703938548B91FFE5106226.cache.png) no-repeat scroll -16px
 0px; width: 16px; height: 16px; -moz-background-clip: -moz-initial; -
 moz-background-origin: -moz-initial; -moz-background-inline-policy: -
 moz-initial; src=http://localhost:8180/aftDemo/
 aftDemo.gwtui.Application/clear.cache.gif

 How can I decode this back into the initial images?

 I tried doing GWT.create(MyImageBundle.class).my_image.getHTML() from
 java but i'm not allowed to call GWT.create there  (only from client
 side code or GWTUnit)

 Other solutions I can imagine:
 1) extract just the pixel offsets from the style attribute and
 manually map these to the effective image name in the test fixture :
 simple but probably quite brittle (if new images are added the offsets
 are likely to change)

 2) Load the composite image and perform image manipulation to extract
 the displayed part and compare to the original image : seems rather
 complicated and I don't want to test GWT but my code!

 Any other Ideas?

Implement an ImageBundleGenerator-like that:
 - copy each image into the public/ folder (actually, emit a public
resource in generator parlance)
 - implement the methods to simply returns unclipped images (there's a
ClippedImagePrototype in com.google.gwt.user.client.ui.impl; copy it
and transform it for unclipped images; passing in the file name of
each image, that has been copied to the public folder, so accessible
from the compiled app)

And then use that particular generator in your module in place of the
normal one (that assemble images in a sprite):
generate-with class=my.NonSpriteImageBundleGenerator
   when-type-assignable
class=com.google.gwt.user.client.ui.ImageBundle /
/generate-with

This will have the same effect as if you were creating images with new
Image(...) instead of myBundle.im_image().createImage(), i.e. not what
you expect from an ImageBundle, but something that you can easily
test.

Other possibilities:
 - add some classes to the com.google.gwt.user.rebind.ui package to
gain access to the package-protected methods from ImageBundleGenerator
and ImageBundleBuilder, to try to determine the position of each image
within the sprite (arrangement is deterministic, this is tested by
ImageBundleGeneratorTest; see the code from this class to find some
uses of the package-protected methods)
 - override/overwrite the ImageBundleGenerator to output a debug log
file with the position of each image in the generated sprite; and then
use this file from you test code.

It would be valuable if GWT provided such an
UnclippedImageBundleGenerator (call it DebugImageBundleGenerator if
you want) and/or debug log file.


--~--~-~--~~~---~--~~
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 [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/Google-Web-Toolkit?hl=en
-~--~~~~--~~--~--~---



Re: Random elem is null errors on Firefox 3

2008-09-30 Thread Sumit Chandel
Hi Steve,
Could you link the thread or issue report you've started to report the
problem back to the folks at Mozilla? It would be interesting to track the
issue, especially for other community members who might run into the same
problem.

From the snippet of code you've traced down, it seems like this is an FF3
issue rather than an issue related to GWT, but it would be interesting to
track just to make sure.

Cheers,
-Sumit Chandel

On Sat, Sep 27, 2008 at 9:12 PM, Alan_C [EMAIL PROTECTED] wrote:


 I'm seeing a very similar problem running Firefox 3.0.2.

 Here's the JS snippet that is dying (line 28630):

 function $Image_1(this$static, url, left, top, width, height){
 28628 $clinit_505();
 28629 this$static.state = $Image$ClippedState(new Image
 $ClippedState(), this$static, url, left, top, width, height);
 28630 this$static.element['className'] = 'gwt-Image';
 28631 return this$static;
 28632}

 In Firebug, inspecting this$static, everything looks fine, with
 'className' assigned  going into $Image_1().  The resulting error
 generated is  this$static.element is null.

 Does anyone know a solution / workaround to this problem?  I just
 downloaded FF 3.0.3 today, haven't seen the error yet though.

 Thanks
 Alan

 On Aug 7, 5:13 pm, [EMAIL PROTECTED] [EMAIL PROTECTED]
 wrote:
  ok, one more datapoint.
 
  While trying to debug and work around this issue, I ended up with the
  following (generated) JS code:
 
  function $missingElement(this$static){
var el, msg;
el = createDiv();
this$static.element = el;
msg = 'FF3: Created missing element ' + el + ' ' + this
  $static.element;
log_0(msg, $Error(new Error_0(), msg));
return this$static.element;
 
  }
 
  And eventually I got this exception: FF3: Created missing element
  [object HTMLDivElement] null
 
  So something is definitely wrong with Firefox 3.  I'll file a bug
  report with them tomorrow.

 


--~--~-~--~~~---~--~~
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 [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/Google-Web-Toolkit?hl=en
-~--~~~~--~~--~--~---



Re: My googlebot approach for GWT: UserBotRouter

2008-09-30 Thread Junyang

Creative idea.

One big note of caution. This technique of showing a different page to
the search engine bot from one that is seen by a normal user is often
considered as black hat SEO and can get your site banned.

Secondly, using user-agent to detect search engine is unreliable. I do
not want to go into black-hat SEO, but those perpetrators are using
other sophisticated techniques like known bot IP addresses instead on
relying on user-agent request.

Therefore, I think while your technique is creative and should be
submitted for consideration on how Google should solve the GWT-SEO
problem, it is not safe to employ this technique now.

On Sep 29, 11:41 am, John Fowler [EMAIL PROTECTED] wrote:
 Please advise concerning my approach for enabling googlebot to index
 my GWT site:http://www.SudokuComplete.com/

 First, I needed to create a static, flattened, html-only view of my
 website.  To do this, I created a simple .Net program that uses the IE
 WebBrowser control to navigate to my GWT site.  The program takes a
 URL with a history token, let's the browser run through the GWT
 javascript, and then saves a copy of the resulting DOM html to a file
 with a name based on the history token.  This file is essentially an
 html-only view of the site as-of the history token.  I use the program
 to save static versions of each of the major history tokens on the
 site.  These files are the ones I want googlebot to index.  And to
 provide navigation for googlebot, I add links between all the files at
 the end of each of them.

 Next, I created my UserBotRouter, a .Net HttpModule (analagous to a
 J2EE Web Filter) that analizes the incoming requests to the website.
 It checks the UserAgent header to see if the request is being made by
 a bot or a standard browser.  If it is a bot, then it routes the
 request to the appropriate static html page (created in step #1).  If,
 however, a standard (non-bot) browser requests one of the static
 pages, then my module sends an HTTP redirect to send the user's
 browser to the corresponding GWT page including the respective history
 token.  In this manner, I am able to route users to the GWT pages, and
 bots to the static HTML pages.

 Am I missing anything?  Does this sound like a workable approach?

 Can GWT build something like this into their compiler?  That is, if
 GWT compiles different versions for the different browsers, why not
 create a set of standard bot pages.  In the module XML file the
 developer could specify the tokens for which GWT should create html
 pages.  GWT would use an approach similar to mine above to create
 static html files for the tokens.  Then, in these static html files,
 some javascript could redirect the browser to the corresponding GWT
 url.  This javascript redirect would affect actual user's browsers,
 whereas bots would continue to read the page as-is, following links to
 the other static pages.

 Please let me know what you think,

 john...
--~--~-~--~~~---~--~~
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 [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/Google-Web-Toolkit?hl=en
-~--~~~~--~~--~--~---



Re: common stuff

2008-09-30 Thread sumanth s
Hi walden

thanks for ur reply. Your are saying  It is the layer into which you make
all RPC calls.so what you are saying is every RPC call from client class
will go first to this so called proxy class before calling implementation
class..is it right? How did u do that?How can u call a common class from all
the client classes? This is what I need to do in my project.I need to call
one common class which inturn should call the specific implementation
classes.

Thanks in advance
rty

On Tue, Sep 30, 2008 at 7:38 AM, walden [EMAIL PROTECTED] wrote:


 In my project, I have my own data proxy class that behaves pretty much
 like what you describe.  It's a singleton that proxies all requests to
 the actual RPC (generated) proxy.  It is the layer into which I make
 all RPC calls.  It performs caching and notification for certain data
 queries.  It supports a 'reference data set', which is expected to be
 static for the duration of a client session, which is retrieved once
 and cached.  It has the ability to register listeners on certain data
 sets (including the refrence data), and will invoke their callbacks
 whenever that set gets refreshed from the server.  Is this what you
 had in mind?

 BTW, Remember that after your code is compiled by the GWT compiler,
 it's not Java, and so Java class loading is the wrong paradigm.

 Walden

 On Sep 29, 4:40 pm, rty [EMAIL PROTECTED] wrote:
  Hi
 
  I want to write one common class which does some startup things for my
  project.I want to make sure that class is loaded first and all the gwt
  rpc calls should go through that class first. How should I proceed for
  it.
 
  thanks
  rty
 


--~--~-~--~~~---~--~~
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 [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/Google-Web-Toolkit?hl=en
-~--~~~~--~~--~--~---



Integration testing ImageBundles

2008-09-30 Thread mfuzzey

Hi;
I'm trying to integration test a GWT application using ImageBundle
with WebDriver.
At one point I have images that represent various states of an object
and I need to check the correct image is being displayed.
However due to the use of ImageBundle the browser is actually seeing
something like :

img border=0 style=background: transparent url(http://localhost:
8180/aftDemo/aftDemo.gwtui.Application/
2EC9C8781E703938548B91FFE5106226.cache.png) no-repeat scroll -16px
0px; width: 16px; height: 16px; -moz-background-clip: -moz-initial; -
moz-background-origin: -moz-initial; -moz-background-inline-policy: -
moz-initial; src=http://localhost:8180/aftDemo/
aftDemo.gwtui.Application/clear.cache.gif

How can I decode this back into the initial images?

I tried doing GWT.create(MyImageBundle.class).my_image.getHTML() from
java but i'm not allowed to call GWT.create there  (only from client
side code or GWTUnit)

Other solutions I can imagine:
1) extract just the pixel offsets from the style attribute and
manually map these to the effective image name in the test fixture :
simple but probably quite brittle (if new images are added the offsets
are likely to change)

2) Load the composite image and perform image manipulation to extract
the displayed part and compare to the original image : seems rather
complicated and I don't want to test GWT but my code!

Any other Ideas?

Thanks;

Martin Fuzzey

--~--~-~--~~~---~--~~
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 [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/Google-Web-Toolkit?hl=en
-~--~~~~--~~--~--~---



Upload XML file

2008-09-30 Thread Stefano Cristiani

I'm trying to upload an XML file on the server to get back the string
of the file content to parse on the client side, but it seem that the
server side code that you suggested doesen't work properly. This is my
code : 
http://home.izforge.com/index.php/2006/10/29/295-handling-file-uploads-with-the-google-web-toolkit
 Can you tell me where I'm wrong? Thaks 

--~--~-~--~~~---~--~~
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 [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/Google-Web-Toolkit?hl=en
-~--~~~~--~~--~--~---



GTW tutorial - a minor inaccurateness?

2008-09-30 Thread Jaroslav Záruba

Couple of times there is the instruction browse to the StockWatcher
(and run some GWT command), I believe it is misleading.
In the scenario the StockWatcher folder is placed under GWT install-
dir so obviously the commands can not be resolved (without using some
path-prefix or adjusting the classpath environmental variable)... When
I navigate back to the install-dir and run the command again it works
just fine.

Could someone revise that section (Create a GWT project) and confirm/
fix this for future readers, 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 [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/Google-Web-Toolkit?hl=en
-~--~~~~--~~--~--~---



Re: common stuff

2008-09-30 Thread walden

rty,

google 'singleton pattern'.  if it's not that, then i don't understand
what you are missing.

walden

On Sep 30, 10:06 am, sumanth s [EMAIL PROTECTED] wrote:
 Hi walden

 thanks for ur reply. Your are saying  It is the layer into which you make
 all RPC calls.so what you are saying is every RPC call from client class
 will go first to this so called proxy class before calling implementation
 class..is it right? How did u do that?How can u call a common class from all
 the client classes? This is what I need to do in my project.I need to call
 one common class which inturn should call the specific implementation
 classes.

 Thanks in advance
 rty



 On Tue, Sep 30, 2008 at 7:38 AM, walden [EMAIL PROTECTED] wrote:

  In my project, I have my own data proxy class that behaves pretty much
  like what you describe.  It's a singleton that proxies all requests to
  the actual RPC (generated) proxy.  It is the layer into which I make
  all RPC calls.  It performs caching and notification for certain data
  queries.  It supports a 'reference data set', which is expected to be
  static for the duration of a client session, which is retrieved once
  and cached.  It has the ability to register listeners on certain data
  sets (including the refrence data), and will invoke their callbacks
  whenever that set gets refreshed from the server.  Is this what you
  had in mind?

  BTW, Remember that after your code is compiled by the GWT compiler,
  it's not Java, and so Java class loading is the wrong paradigm.

  Walden

  On Sep 29, 4:40 pm, rty [EMAIL PROTECTED] wrote:
   Hi

   I want to write one common class which does some startup things for my
   project.I want to make sure that class is loaded first and all the gwt
   rpc calls should go through that class first. How should I proceed for
   it.

   thanks
   rty- 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 [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/Google-Web-Toolkit?hl=en
-~--~~~~--~~--~--~---



Re: onBrowserEvent override of Tree

2008-09-30 Thread ArunDhaJ

Hi,
I'm using GWT 1.4.62. Is this code applicable to this?

-ArunDhaJ
--~--~-~--~~~---~--~~
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 [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/Google-Web-Toolkit?hl=en
-~--~~~~--~~--~--~---



GWT Menu Active Item Hightlighted

2008-09-30 Thread karmela

Hi all,
Hope someone can help me with this.
I want to have the active menu item to be highlighted. Basically when
an item gets selected and goes to a page, i want that link (menu item)
to be in a different color.
Is that possible to do with GWT?

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 [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/Google-Web-Toolkit?hl=en
-~--~~~~--~~--~--~---



Re: SEO for web toolkit

2008-09-30 Thread jdwyah

Hey Flockton,
You might check out the SEO for GWT approach outlined in the free
chapter of my book, posted here: http://www.infoq.com/articles/progwt

It pipes GWT serialization into the page itself and then puts code in
noscript blocks as well.

-jeff

On Sep 26, 4:04 am, MN [EMAIL PROTECTED] wrote:
 no optimization is possible, because all things are in a javascript.
 so goolge search dont find any text.

 only possible solution:

 place all your text you use in divs at the hosting-html page. and
 later load the values from this divs instead from server: its faster
 than requesting from server.

 On 22 Sep., 00:11, flockton [EMAIL PROTECTED] wrote:

  I would like to know, how I can optimize my site programmed with 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 [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/Google-Web-Toolkit?hl=en
-~--~~~~--~~--~--~---



Re: Delaying a loop.

2008-09-30 Thread Peter D.

This makes a lot of sense thank you. But I am still unsure about how
to create a delay. If I were to create a command with a Timer in it
would it cause a delay in calling the next command in the queue?

On Sep 30, 8:33 am, Thomas Broyer [EMAIL PROTECTED] wrote:
 On 29 sep, 17:49, Peter D. [EMAIL PROTECTED] wrote:



  I've read a few posts on here on how to delay loops and such using
  Timers but I am unsure if they fit with my particular needs. I am
  writing a feature for a GWT app I inherited that controls application
  server states. (e.g. Start/Stop/Restart etc). I thought it would be a
  cool idea to allow the users to set delays between each command sent
  to the app server.

  Example:

  SERVER1 - RESTART
  DELAY 15 SECONDS
  SERVER2 - RESTART
  DELAY 15 SECONDS
  ...

  The problem I am having is with the delaying. Using a Timer would not
  work because the timers return instantly when you set them on a
  schedule. So any servers set with an action below any timers would
  start right away. And all delay timers would start almost at the same
  time.

  The functionality I want is to be able to go through that list and do
  each action one by one. Send restart server 1 command, delay 15
  seconds, send restart server 2 command, delay 15 seconds, etc...

  I would appreciate any suggestions or insights on this problem, thank
  you.

 Push commands into a queue.
 Commands are all asynchronous (server restart might be synchronous
 if you don't wait for a response that the restart order has been
 received and taken into account), so you'll wait for the command to
 complete before launching the following one.
 In a few word:
  - each command would know how to run and report completeness
 (AsyncCallback for RPCs, RequestCallback for RequestBuilder, an
 interface of your choice for Timers that'd be called from the Timer's
 run() method)
  - your callback passed to each command's run() method simply
 dequeue and run and the next command, passing itself as the callback
 (to dequeue and run the next command, etc.)
--~--~-~--~~~---~--~~
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 [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/Google-Web-Toolkit?hl=en
-~--~~~~--~~--~--~---



Re: Safe to make *ServiceAsync a singleton?

2008-09-30 Thread obesga

In which fashion you mean safe ?

If it is about internet security, it doesn't hurt or make good - the
code will de downloaded by the client across the net and he can look
at it.
If it is about safe threading, f.e. to avoid two rpc calls  at same
time, the caveats must be resolved by your code before.

You would use the static way if
+ You use the call a lot of times in your web app ( f.e. a
getActualData() call )
+ You love simplicity

You would generate the instance every call if you:
+ Use the call only once ( f.e. login() )
+ Want to call different servers or urls for the same RPC - take in
account Same Origin Policy

Take in mind that the AsyncCallback object is the one you're using new
( or maybe not  ) at every RPC call, so it's better to use the static
way by default


Oskar
--~--~-~--~~~---~--~~
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 [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/Google-Web-Toolkit?hl=en
-~--~~~~--~~--~--~---



RPC Across Modules

2008-09-30 Thread [EMAIL PROTECTED]

Hi, I have a fairly large gwt that is using a large number of
libraries.

To ensure there are no unwanted dependencies i am trying to split my
project into 3 modules client (everything ui related), server (server
processing related) and rpc (All my bussiness objects). both client
and server inherit from rpc.

The problem i have encountered is declaring the servlet in the gwt.xml
config files (of which there are 3, one for each module). I am getting
ClassNotFound exceptions. I dont want to inherit the server module in
the client and according to the GWT diagrams i shouldnt need to.

Is splitting the RPC section of my project possible and if so any help
would be greatly appreciated.

Regards,
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 [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/Google-Web-Toolkit?hl=en
-~--~~~~--~~--~--~---



GWT Help

2008-09-30 Thread vanitha saran
Hi all,

i have a question. i am trying to building a registration page with Name and
address(as an example). i have to store the data to a database.

i am MYSQL database.

how do i coneect database from GWT-eclipse platform.

clearly

1.Name and address widgets are created using GWT.
2. data entering must be stored in a MYSQL database.

How do i do that?
-thanks
vanitha

--~--~-~--~~~---~--~~
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 [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/Google-Web-Toolkit?hl=en
-~--~~~~--~~--~--~---



Bug - GWT1.1.0 - Loading Jar file modules generated from Eclipse

2008-09-30 Thread Kristal

My problem the same as aglaforge's, and I am still working on it. So I
find this discussion very interesting.

I have a GWT module, say MyGWT.
I also have a java class, say org.Foo, packaged in a jar file, say
foo.jar.
foo.jar contains the source files, and Foo is Serializable.

after specifying in the gwt.xml the external folder where foo.jar
originally was, I decided to move it inside my project's structure, in
a lib subdirectory of the client directory, and I added the
following lines to the gwt.xml :
   source path=jar:file:/D:/gwt-windows-1.5.2/projects/MyGWT/src/
client/lib/foo.jar!/org /
   source path=client/

It still doesn't work.
I still don't get the followings:
-Do I have to create a module for each jar I wish to import in my
client code? if so, how do I do it?
-Do I have to place the jar file in a subdirectory as the projet's
client directory? if so, can specify a relative path for the jar?

-What am I missing here?..

--~--~-~--~~~---~--~~
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 [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/Google-Web-Toolkit?hl=en
-~--~~~~--~~--~--~---



Re: Severe performance problem after upgrading to GWT 1.5.2 (final)

2008-09-30 Thread Manuel

Has anyone figgured this out.  I am having sever performance problems
with this.  accross the board all 1.5.2 compiled apps are a lot slower


On Sep 18, 4:59 am, hbatista [EMAIL PROTECTED] wrote:
 Thanks for the suggestion, but changing data types didn't help.
 I did not profile my code, but the observed behavior is:
 1. RPC call is made
 2. server side method runs and returns (quickly!)
 3. ... huge delay with no CPU activity ...
 4. finally client side onSuccess() RPC callback runs

 What could be happening on step 3 ?

 I took a quick look at the serializer source code, but it's too
 different from 1.4.60 to compare side by side.

 On Sep 18, 2:06 am, Tim [EMAIL PROTECTED] wrote:

  not sure, but maybe there are some datatype penalty issues (long vs
  double etc). Did you profile your server side code?

  On Sep 17, 10:28 am, hbatista [EMAIL PROTECTED] wrote:

   Hi,
   I've just upgraded one of my projects from 1.4.60 to1.5.2, and
   everything went very smoothly, but...
   when my application tries to fetch a large number of objects from the
   server (via RPC, returns HashMapInteger,xxx, about 6000 entries) it
   takes a very very long time!

   Before the upgrade this was very fast (at least in Firefox and Chrome,
   not in IE).

   Strangely, while waiting for the RPC call to return there is NO cpu
   activity...

   For me this seems related to some deep changes in the serialization
   code (taking a guess here), before the upgrade trying to fetch so many
   records from the server would crash IE with 'JavaScript SyntaxError
   exception: Out of memory', while now it works (good!) but is veryslow
   in all browsers (bad!).

   Can someone help me debug this problem?- 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 [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/Google-Web-Toolkit?hl=en
-~--~~~~--~~--~--~---



Re: IE8

2008-09-30 Thread Jamie

My condolences on getting blocker bugs against a beta product...
A brief use of IE8 seems to show that it has problems on virtually any
website, until you swtich it to compatibility mode.


On Sep 30, 1:00 am, [EMAIL PROTECTED]
[EMAIL PROTECTED] wrote:
 I've searched around this group, the buglist, googling keywords like
 'gwt ie8' and 'gwt ie8 compatability', etc and I find little all
 together on GWT and IE8.  I know IE8 is in beta, but still It makes me
 nervous when QA gives us blocker bugs like Does not work in IE8
 Beta.  Obviously I need to (somehow) install IE8  and replicate the
 bug my QA team encountered and report it to the bugilist, but I was
 just curious if there was some official line on IE8 compatibility?
 You don't even have to go as far as Google is fully supported to
 supporting IE8 when it emerges from beta, but maybe just a something
 like a href=http://extjs.com/forum/showthread.php?t=45610;this/a
 just to let us know you have your eye on the ball?
--~--~-~--~~~---~--~~
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 [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/Google-Web-Toolkit?hl=en
-~--~~~~--~~--~--~---



JSONNumber getValue() and ints

2008-09-30 Thread seven.reeds

Hi

I am using Eclipse 3.4.1, java 1.6.0_07, gwt 1.5.2 under linux.

I have a JSON object that contains an integer value.  I am trying the
following to get it:

int rowCount =
index.Info.get(RowCount).isNumber().getValue().intValue();

Eclipse tells me the getValue() for JSONNumber is depreciated

Is there a better way?
--~--~-~--~~~---~--~~
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 [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/Google-Web-Toolkit?hl=en
-~--~~~~--~~--~--~---



RE: JSONNumber getValue() and ints

2008-09-30 Thread Perelman Nathan (Nathan)

Use doubleValue() and then cast to int. All JavaScript numbers (and
therefore all JSONNumbers) are really doubles.

-Original Message-
From: Google-Web-Toolkit@googlegroups.com
[mailto:[EMAIL PROTECTED] On Behalf Of seven.reeds
Sent: Tuesday, September 30, 2008 16:43
To: Google Web Toolkit
Subject: JSONNumber getValue() and ints


Hi

I am using Eclipse 3.4.1, java 1.6.0_07, gwt 1.5.2 under linux.

I have a JSON object that contains an integer value.  I am trying the
following to get it:

int rowCount =
index.Info.get(RowCount).isNumber().getValue().intValue();

Eclipse tells me the getValue() for JSONNumber is depreciated

Is there a better way?


--~--~-~--~~~---~--~~
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 [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/Google-Web-Toolkit?hl=en
-~--~~~~--~~--~--~---



Re: JSONNumber getValue() and ints

2008-09-30 Thread Alex Rice

A very good question, because there is a doubleValue() but no
intValue() ... Hmm,

On Sep 30, 2:43 pm, seven.reeds [EMAIL PROTECTED] wrote:
 Hi

 I am using Eclipse 3.4.1, java 1.6.0_07, gwt 1.5.2 under linux.

 I have a JSON object that contains an integer value.  I am trying the
 following to get it:

 int rowCount =
 index.Info.get(RowCount).isNumber().getValue().intValue();

 Eclipse tells me the getValue() for JSONNumber is depreciated

 Is there a better way?



--~--~-~--~~~---~--~~
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 [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/Google-Web-Toolkit?hl=en
-~--~~~~--~~--~--~---



Re: JSONNumber getValue() and ints

2008-09-30 Thread Alex Rice

Got it! thanks

On Sep 30, 2:52 pm, Perelman Nathan (Nathan)
[EMAIL PROTECTED] wrote:
 Use doubleValue() and then cast to int. All JavaScript numbers (and
 therefore all JSONNumbers) are really doubles.

--~--~-~--~~~---~--~~
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 [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/Google-Web-Toolkit?hl=en
-~--~~~~--~~--~--~---



Re: RPC Across Modules

2008-09-30 Thread xavierunited

Can u tell me what the rcp folder is for i am lost.

On 09/30/2008, Jamie [EMAIL PROTECTED] wrote:

 In your module.gwt.xml, you need to add the rpc folder as a source.
 client is automatically added for you.

  module 
source path=client /
source path=rpc /
  /module 

 When building your war, or jar, or installing, you will need to
 compile the RPC stuff and included the classes.



 On Sep 30, 12:25 pm, [EMAIL PROTECTED]
 [EMAIL PROTECTED] wrote:
 Hi, I have a fairly large gwt that is using a large number of
 libraries.

 To ensure there are no unwanted dependencies i am trying to split my
 project into 3 modules client (everything ui related), server (server
 processing related) and rpc (All my bussiness objects). both client
 and server inherit from rpc.

 The problem i have encountered is declaring the servlet in the gwt.xml
 config files (of which there are 3, one for each module). I am getting
 ClassNotFound exceptions. I dont want to inherit the server module in
 the client and according to the GWT diagrams i shouldnt need to.

 Is splitting the RPC section of my project possible and if so any help
 would be greatly appreciated.

 Regards,
 Steve
 



-- 
Xavier A. Mathews
Student/Developer/Web-Master
GG Client Based Tech Support Specialist
Hazel Crest Illinois
[EMAIL PROTECTED]
Fear of a name, only increases fear of the thing itself.

--~--~-~--~~~---~--~~
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 [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/Google-Web-Toolkit?hl=en
-~--~~~~--~~--~--~---



Re: My googlebot approach for GWT: UserBotRouter

2008-09-30 Thread John Fowler

Jeff,

Thanks for the warning.  I think your warning is significant enough to
dissuade me from trying my way.  I'll have to think of another, or buy
your book...  I took a quick look at your book in Amazon, and it looks
comprehensive and well written.

john...

On Sep 30, 7:49 am, jdwyah [EMAIL PROTECTED] wrote:
 Hey John,
 From what I can tell, you need to be careful with that approach
 (although it's pretty darn cool). Google get's very nervous when it
 finds out that the googlebot is going one place but users are going
 another since this is something that evil, spam-y websites do. It's
 tough to get a definitive answer, but my decision from reading the
 google bot forums was that it was too dangerous to try this approach.

 I'm totally biased of course, but you might check out the interview I
 did with InfoQ that includes a free chapter of my book. The chapter
 just happens to be the one about SEO with GWT, so you might find it
 useful. It's available athttp://www.infoq.com/articles/progwt

 My solution was to serialize data into the page itself instead of RPC
 and then output in noscript tags. The process is described in the
 chapter available above.

 gl,

 -Jeff

 On Sep 28, 11:41 pm, John Fowler [EMAIL PROTECTED] wrote:



  Please advise concerning my approach for enabling googlebot to index
  my GWT site:http://www.SudokuComplete.com/

  First, I needed to create a static, flattened, html-only view of my
  website.  To do this, I created a simple .Net program that uses the IE
  WebBrowser control to navigate to my GWT site.  The program takes a
  URL with a history token, let's the browser run through the GWT
  javascript, and then saves a copy of the resulting DOM html to a file
  with a name based on the history token.  This file is essentially an
  html-only view of the site as-of the history token.  I use the program
  to save static versions of each of the major history tokens on the
  site.  These files are the ones I want googlebot to index.  And to
  provide navigation for googlebot, I add links between all the files at
  the end of each of them.

  Next, I created my UserBotRouter, a .Net HttpModule (analagous to a
  J2EE Web Filter) that analizes the incoming requests to the website.
  It checks the UserAgent header to see if the request is being made by
  a bot or a standard browser.  If it is a bot, then it routes the
  request to the appropriate static html page (created in step #1).  If,
  however, a standard (non-bot) browser requests one of the static
  pages, then my module sends an HTTP redirect to send the user's
  browser to the corresponding GWT page including the respective history
  token.  In this manner, I am able to route users to the GWT pages, and
  bots to the static HTML pages.

  Am I missing anything?  Does this sound like a workable approach?

  Can GWT build something like this into their compiler?  That is, if
  GWT compiles different versions for the different browsers, why not
  create a set of standard bot pages.  In the module XML file the
  developer could specify the tokens for which GWT should create html
  pages.  GWT would use an approach similar to mine above to create
  static html files for the tokens.  Then, in these static html files,
  some javascript could redirect the browser to the corresponding GWT
  url.  This javascript redirect would affect actual user's browsers,
  whereas bots would continue to read the page as-is, following links to
  the other static pages.

  Please let me know what you think,

  john...- 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 [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/Google-Web-Toolkit?hl=en
-~--~~~~--~~--~--~---



Re: RPC Across Modules

2008-09-30 Thread gregor

Hi Steve,

It's certainly possible to divide things up into separate modules. I
think you need to give us more info to help. For starters, when and
where are you getting the ClassNotFound exceptions? During compilation
when you try to run the application in hosted mode? What is the stack
trace?

regards
gregor

On Sep 30, 10:25 pm, [EMAIL PROTECTED] wrote:
 Can u tell me what the rcp folder is for i am lost.

 On 09/30/2008, Jamie [EMAIL PROTECTED] wrote:





  In your module.gwt.xml, you need to add the rpc folder as a source.
  client is automatically added for you.

   module 
     source path=client /
     source path=rpc /
   /module 

  When building your war, or jar, or installing, you will need to
  compile the RPC stuff and included the classes.

  On Sep 30, 12:25 pm, [EMAIL PROTECTED]
  [EMAIL PROTECTED] wrote:
  Hi, I have a fairly large gwt that is using a large number of
  libraries.

  To ensure there are no unwanted dependencies i am trying to split my
  project into 3 modules client (everything ui related), server (server
  processing related) and rpc (All my bussiness objects). both client
  and server inherit from rpc.

  The problem i have encountered is declaring the servlet in the gwt.xml
  config files (of which there are 3, one for each module). I am getting
  ClassNotFound exceptions. I dont want to inherit the server module in
  the client and according to the GWT diagrams i shouldnt need to.

  Is splitting the RPC section of my project possible and if so any help
  would be greatly appreciated.

  Regards,
  Steve

 --
 Xavier A. Mathews
 Student/Developer/Web-Master
 GG Client Based Tech Support Specialist
 Hazel Crest Illinois
 [EMAIL PROTECTED]
 Fear of a name, only increases fear of the thing itself.
--~--~-~--~~~---~--~~
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 [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/Google-Web-Toolkit?hl=en
-~--~~~~--~~--~--~---



How to disable The hyperlink

2008-09-30 Thread [EMAIL PROTECTED]

Hi all,
   In my application we have some hyperlinks. The hyperlink should
disable from number of clicks on the same hyperlink. So how can i
disable a  hyperlink.

 Thanks In Advance :)
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
Google Web Toolkit group.
To post to this group, send email to Google-Web-Toolkit@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/Google-Web-Toolkit?hl=en
-~--~~~~--~~--~--~---



GlassPanel bug: has anyone else encountered this

2008-09-30 Thread rusty

http://code.google.com/p/google-web-toolkit-incubator/issues/detail?id=152

I've been trying to work around it, but have given up. Has anyone else
had this issue with the GlassPanel from the gwt incubator?
--~--~-~--~~~---~--~~
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 [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/Google-Web-Toolkit?hl=en
-~--~~~~--~~--~--~---



[gwt-contrib] RR: make PopupPanels stay on the screen, even in RTL situations

2008-09-30 Thread Alex Rudnick
Hey Rajeev,

Would you review this patch for PopupPanel? It's a cleaned up version
of what we did yesterday. This fixes the odd behavior we noticed where
Popup Panels could not be placed near the right edge of the screen on
IE, and normalizes popups in RTL and LTR modes, so they can't be
dragged off the horizontal edges in either case.

Testing: we made sure popup panels worked as expected in Showcase on
all major browsers, both in Quirks and Standards mode. GWT tests all
still work.

Thanks!

-- 
Alex Rudnick
swe, gwt, atl

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

Index: user/src/com/google/gwt/user/client/ui/PopupPanel.java
===
--- user/src/com/google/gwt/user/client/ui/PopupPanel.java	(revision 3693)
+++ user/src/com/google/gwt/user/client/ui/PopupPanel.java	(working copy)
@@ -575,11 +575,24 @@
   public void setPopupPosition(int left, int top) {
 // Keep the popup within the browser's client area, so that they can't get
 // 'lost' and become impossible to interact with. Note that we don't attempt
-// to keep popups pegged to the bottom and right edges, as they will then
-// cause scrollbars to appear, so the user can't lose them.
-if (left  0) {
-  left = 0;
+// to keep popups pegged to the bottom edge; dragging a popup off the bottom
+// will cause scrollbars to appear, so the user can't lose them.
+
+int popupWidth = getOffsetWidth();
+int popupRightEdge = left + popupWidth;
+int clientLeft = Document.get().getBodyOffsetLeft();
+int clientWidth = Window.getClientWidth() + clientLeft;
+
+if (popupRightEdge = clientWidth) {
+  left = clientWidth - popupWidth;
 }
+
+// Not always 0. For example, on IE in RTL mode, there's a scrollbar
+// on the left-hand side.
+if (left  clientLeft) {
+  left = clientLeft;
+}
+
 if (top  0) {
   top = 0;
 }


[gwt-contrib] code review requested, shard TypeSerializerCreator createMethodMap

2008-09-30 Thread John Tamplin
[fix bad GWTC address]

Please review the attached patch for trunk, which fixes a hosted mode crash
with a large set of serializable types.

On Linux hosted mode, a very large list of serializable types can cause a
crash inside Mozilla.  This appears to be related to the size of the JSNI
function being evaluated to inject the code into the browser.

This patch adds a Java system property to control this behavior, and code to
split the createMethodMap if the numer of types exceeeds the specified
threshold.  If no parameter is supplied, the output code is unchanged.
After we get some feedback on exactly what this threshold should be, we may
change it to a reasonable default.  This parameter may also go away once
OOPHM is merged into trunk if it is no longer needed.  So, this should be
considered a short-term patch.

The relevant generated code previously looked like this:

public static native JavaScriptObject createMethodMap() /*-{
  return {
[Lcom.google.gwt.sample.dynatable.client.Person;/3792876907: [
@com.google.gwt.sample.dynatable.client.Person_Array_Rank_1_FieldSerializer::instantiate(Lcom/google/gwt/user/client/rpc/SerializationStreamReader;),
@com.google.gwt.sample.dynatable.client.Person_Array_Rank_1_FieldSerializer::deserialize(Lcom/google/gwt/user/client/rpc/SerializationStreamReader;[Lcom/google/gwt/sample/dynatable/client/Person;),
@com.google.gwt.sample.dynatable.client.Person_Array_Rank_1_FieldSerializer::serialize(Lcom/google/gwt/user/client/rpc/SerializationStreamWriter;[Lcom/google/gwt/sample/dynatable/client/Person;)
],
 ...
  };
}-*/;

it now looks like this if the threshold is exceeded:

public static JavaScriptObject createMethodMap() {
  JavaScriptObject map = JavaScriptObject.createObject();
  createMethodMap_0(map);
  createMethodMap_50(map);
  ...
  return map;
}

public static native void createMethodMap_0(JavaScriptObject map) /*-{
  map[[Lcom.google.gwt.sample.dynatable.client.Person;/3792876907]=[
@com.google.gwt.sample.dynatable.client.Person_Array_Rank_1_FieldSerializer::instantiate(Lcom/google/gwt/user/client/rpc/SerializationStreamReader;),
@com.google.gwt.sample.dynatable.client.Person_Array_Rank_1_FieldSerializer::deserialize(Lcom/google/gwt/user/client/rpc/SerializationStreamReader;[Lcom/google/gwt/sample/dynatable/client/Person;),
@com.google.gwt.sample.dynatable.client.Person_Array_Rank_1_FieldSerializer::serialize(Lcom/google/gwt/user/client/rpc/SerializationStreamWriter;[Lcom/google/gwt/sample/dynatable/client/Person;)
  ];
}-*/;

Note that the resulting code will be slightly larger and slower than before,
so this should only be used for Linux hosted mode where needed.  Since the
default behavior is unchanged, if you do nothing there will be no impact on
the output.

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

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

Index: user/src/com/google/gwt/user/rebind/rpc/TypeSerializerCreator.java
===
--- user/src/com/google/gwt/user/rebind/rpc/TypeSerializerCreator.java	(revision 3687)
+++ user/src/com/google/gwt/user/rebind/rpc/TypeSerializerCreator.java	(working copy)
@@ -19,6 +19,7 @@
 import com.google.gwt.core.client.JavaScriptObject;
 import com.google.gwt.core.ext.GeneratorContext;
 import com.google.gwt.core.ext.TreeLogger;
+import com.google.gwt.core.ext.UnableToCompleteException;
 import com.google.gwt.core.ext.typeinfo.JClassType;
 import com.google.gwt.core.ext.typeinfo.JMethod;
 import com.google.gwt.core.ext.typeinfo.JParameterizedType;
@@ -32,6 +33,8 @@
 import com.google.gwt.user.rebind.SourceWriter;
 
 import java.io.PrintWriter;
+import java.util.ArrayList;
+import java.util.List;
 
 /**
  * This class generates a class with name 'typeSerializerClassName' that is able
@@ -52,6 +55,17 @@
   + SerializationStreamWriter streamWriter, Object instance, String typeSignature)
   +  throws SerializationException;
 
+  /**
+   * Default number of types to split createMethodMap entries into.  Zero means
+   * no sharding occurs.
+   */
+  private static final int DEFAULT_CREATEMETHODMAP_SHARD_SIZE = 0;
+
+  /**
+   * Java system property name to override the above.
+   */
+  private static final String GWT_CREATEMETHODMAP_SHARD_SIZE = gwt.typecreator.shard.size;
+
   private final GeneratorContext context;
 
   private final JType[] serializableTypes;
@@ -77,7 +91,7 @@
 srcWriter = getSourceWriter(logger, context);
   }
 
-  public String realize(TreeLogger logger) {
+  public String realize(TreeLogger logger) throws UnableToCompleteException {
 logger = logger.branch(TreeLogger.DEBUG,
 Generating TypeSerializer for service interface '
 + getTypeSerializerClassName() + ', null);
@@ -92,7 +106,7 @@
 
 writeCreateMethods();
 
-writeCreateMethodMapMethod();
+

[gwt-contrib] Re: code review requested, shard TypeSerializerCreator createMethodMap

2008-09-30 Thread Freeland Abbott
Mostly LGTM.  The only (marginally) substantive complaint is that it may
make sense to rework the property parsing around lines 285-293 so that it's
done once, statically, rather than re-parsing the String-int conversion for
every TypeSerializer we create, especially if (as I suggest as a nit) you
change to use the System.getProperty(String propname, String default)
formulation.  Not that parsing a short string into int is any large amount
lot of work, but we may end up doing it often...

Nits

   - Can we note, probably in the comments around lines 58-66, that the
   shard size is measured in number of reachable types, not in e.g.
   characters?  (Yeah, I know characters would be hard to get at *a priori*,
   but since our issue seems to be string length of the JSNI body, that's what
   I expected size to be measured in.)
   - Also mentioned above, line 285-286, why avoid the
   System.getProperty(String prop, String default) formulation?  (You'd have to
   make the default a string, yes, but it saves you the if-null test.)
   - I'll take your word for the style-correctness of the added space on
   line 190.




On Tue, Sep 30, 2008 at 2:59 PM, John Tamplin [EMAIL PROTECTED] wrote:

 [fix bad GWTC address]


 Please review the attached patch for trunk, which fixes a hosted mode crash
 with a large set of serializable types.

 On Linux hosted mode, a very large list of serializable types can cause a
 crash inside Mozilla.  This appears to be related to the size of the JSNI
 function being evaluated to inject the code into the browser.

 This patch adds a Java system property to control this behavior, and code
 to split the createMethodMap if the numer of types exceeeds the specified
 threshold.  If no parameter is supplied, the output code is unchanged.
 After we get some feedback on exactly what this threshold should be, we may
 change it to a reasonable default.  This parameter may also go away once
 OOPHM is merged into trunk if it is no longer needed.  So, this should be
 considered a short-term patch.

 The relevant generated code previously looked like this:

 public static native JavaScriptObject createMethodMap() /*-{
   return {
 [Lcom.google.gwt.sample.dynatable.client.Person;/3792876907: [
 @com.google.gwt.sample.dynatable.client.Person_Array_Rank_1_FieldSerializer::instantiate(Lcom/google/gwt/user/client/rpc/SerializationStreamReader;),

 @com.google.gwt.sample.dynatable.client.Person_Array_Rank_1_FieldSerializer::deserialize(Lcom/google/gwt/user/client/rpc/SerializationStreamReader;[Lcom/google/gwt/sample/dynatable/client/Person;),

 @com.google.gwt.sample.dynatable.client.Person_Array_Rank_1_FieldSerializer::serialize(Lcom/google/gwt/user/client/rpc/SerializationStreamWriter;[Lcom/google/gwt/sample/dynatable/client/Person;)
 ],
  ...
   };
 }-*/;

 it now looks like this if the threshold is exceeded:

 public static JavaScriptObject createMethodMap() {
   JavaScriptObject map = JavaScriptObject.createObject();
   createMethodMap_0(map);
   createMethodMap_50(map);
   ...
   return map;
 }

 public static native void createMethodMap_0(JavaScriptObject map) /*-{
   map[[Lcom.google.gwt.sample.dynatable.client.Person;/3792876907]=[
 @com.google.gwt.sample.dynatable.client.Person_Array_Rank_1_FieldSerializer::instantiate(Lcom/google/gwt/user/client/rpc/SerializationStreamReader;),

 @com.google.gwt.sample.dynatable.client.Person_Array_Rank_1_FieldSerializer::deserialize(Lcom/google/gwt/user/client/rpc/SerializationStreamReader;[Lcom/google/gwt/sample/dynatable/client/Person;),

 @com.google.gwt.sample.dynatable.client.Person_Array_Rank_1_FieldSerializer::serialize(Lcom/google/gwt/user/client/rpc/SerializationStreamWriter;[Lcom/google/gwt/sample/dynatable/client/Person;)
   ];
 }-*/;

 Note that the resulting code will be slightly larger and slower than
 before, so this should only be used for Linux hosted mode where needed.
 Since the default behavior is unchanged, if you do nothing there will be no
 impact on the output.

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


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



[gwt-contrib] Re: code review requested, shard TypeSerializerCreator createMethodMap

2008-09-30 Thread Freeland Abbott
On Tue, Sep 30, 2008 at 4:27 PM, John Tamplin [EMAIL PROTECTED] wrote:

 On Tue, Sep 30, 2008 at 3:49 PM, Freeland Abbott 
 [EMAIL PROTECTED] wrote:

 Mostly LGTM.  The only (marginally) substantive complaint is that it may
 make sense to rework the property parsing around lines 285-293 so that it's
 done once, statically, rather than re-parsing the


 Ok.  I can't really do it in a static intiializer since I may need a
 TreeLogger, but I can only do it the first time.


Or you'd have to introduce a new static method, and call that from somewhere
early (i.e. after we have a TreeLogger, but before we're doing anything
that might loop over calls).




- Can we note, probably in the comments around lines 58-66, that the
shard size is measured in number of reachable types, not in e.g.
characters?  (Yeah, I know characters would be hard to get at *a priori
*, but since our issue seems to be string length of the JSNI body,
that's what I expected size to be measured in.)

 The comment for DEFAULT_CREATEMETHODMAP_SHARD_SIZE currently says:

 Default number of types to split createMethodMap entries into.  Zero means
 no sharding occurs.


 How are you suggesting that be rewritten?


Nevermind. :-/  That answers it; I just misread.



- Also mentioned above, line 285-286, why avoid the
System.getProperty(String prop, String default) formulation?  (You'd have 
 to
make the default a string, yes, but it saves you the if-null test.)

 So you would prefer doing:
 String shardSizeProperty =
 System.getProperty(GWT_CREATEMETHODMAP_SHARD_SIZE,
 String.valueOf(DEFAULT_CREATEMETHODMAP_SHARD_SIZE));


Yes, I like this better than the set-to-default-int, fetch-property,
test-for-null sequence.  Though my formulation had converted default to
String, rather than using String.valueOf(), which gets us to your next
comment...

This would always require converting the default to a string (or storing it
 as a string and losing type safety) and always parsing the result rather
 than a test telling you the parsing is needed.  It doesn't seem to be an
 improvement to me.


There's a reason it's in the nits category, and if you think it's a lose,
I don't mind if you skip the suggestion.

But, to make the case: I see one all-String code path as cleaner than two
paths with different data data types on each fork.  I'll grant that the
integer-fork else of your if is degenerate, but it takes a couple bytes
of code size to do the test.  Equally, surely it's not a real problem to
ensure that the compiled-in default is in fact an integer (that is, the
used-once compiled-in string's type safety is a small issue, even among
small issues), and we need to handle non-integer values gracefully anyway
(because the user can override).

But, again, it's a nit: my way saves at most ~10b of code size and could
gain or lose a few miliseconds in execution time depending on whether branch
prediction in the JVM is so far below bytecode interpretation that misses
appear free; your way is type-safe for a constant that's both clearly
documented as an integral value and likely to change exactly once in its
coded lifetime.  What color dresses are the angels on that pin wearing?

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



[gwt-contrib] Re: code review requested, shard TypeSerializerCreator createMethodMap

2008-09-30 Thread John Tamplin
On Tue, Sep 30, 2008 at 4:51 PM, Freeland Abbott [EMAIL PROTECTED]
 wrote:

 But, again, it's a nit: my way saves at most ~10b of code size and could
 gain or lose a few miliseconds in execution time depending on whether branch
 prediction in the JVM is so far below bytecode interpretation that misses
 appear free; your way is type-safe for a constant that's both clearly
 documented as an integral value and likely to change exactly once in its
 coded lifetime.  What color dresses are the angels on that pin wearing?


Ok, try this patch.

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

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

Index: user/src/com/google/gwt/user/rebind/rpc/TypeSerializerCreator.java
===
--- user/src/com/google/gwt/user/rebind/rpc/TypeSerializerCreator.java	(revision 3693)
+++ user/src/com/google/gwt/user/rebind/rpc/TypeSerializerCreator.java	(working copy)
@@ -19,6 +19,7 @@
 import com.google.gwt.core.client.JavaScriptObject;
 import com.google.gwt.core.ext.GeneratorContext;
 import com.google.gwt.core.ext.TreeLogger;
+import com.google.gwt.core.ext.UnableToCompleteException;
 import com.google.gwt.core.ext.typeinfo.JClassType;
 import com.google.gwt.core.ext.typeinfo.JMethod;
 import com.google.gwt.core.ext.typeinfo.JParameterizedType;
@@ -32,6 +33,8 @@
 import com.google.gwt.user.rebind.SourceWriter;
 
 import java.io.PrintWriter;
+import java.util.ArrayList;
+import java.util.List;
 
 /**
  * This class generates a class with name 'typeSerializerClassName' that is able
@@ -52,6 +55,39 @@
   + SerializationStreamWriter streamWriter, Object instance, String typeSignature)
   +  throws SerializationException;
 
+  /**
+   * Default number of types to split createMethodMap entries into.  Zero means
+   * no sharding occurs.  Stored as a string since it is used as a default
+   * property value.
+   */
+  private static final String DEFAULT_CREATEMETHODMAP_SHARD_SIZE = 0;
+
+  /**
+   * Java system property name to override the above.
+   */
+  private static final String GWT_CREATEMETHODMAP_SHARD_SIZE = gwt.typecreator.shard.size;
+
+  private static int shardSize = -1;
+
+  private static void computeShardSize(TreeLogger logger)
+  throws UnableToCompleteException {
+String shardSizeProperty = System.getProperty(
+GWT_CREATEMETHODMAP_SHARD_SIZE, DEFAULT_CREATEMETHODMAP_SHARD_SIZE);
+try {
+  shardSize = Integer.valueOf(shardSizeProperty);
+  if (shardSize  0) {
+logger.log(TreeLogger.ERROR, GWT_CREATEMETHODMAP_SHARD_SIZE
++  must be non-negative:  + shardSizeProperty);
+throw new UnableToCompleteException();
+  }
+} catch (NumberFormatException e) {
+  logger.log(TreeLogger.ERROR, Property 
+  + GWT_CREATEMETHODMAP_SHARD_SIZE +  not a number: 
+  + shardSizeProperty, e);
+  throw new UnableToCompleteException();
+}
+  }
+
   private final GeneratorContext context;
 
   private final JType[] serializableTypes;
@@ -66,7 +102,7 @@
 
   public TypeSerializerCreator(TreeLogger logger,
   SerializableTypeOracle serializationOracle, GeneratorContext context,
-  String typeSerializerClassName) {
+  String typeSerializerClassName) throws UnableToCompleteException {
 this.context = context;
 this.typeSerializerClassName = typeSerializerClassName;
 this.serializationOracle = serializationOracle;
@@ -75,9 +111,14 @@
 serializableTypes = serializationOracle.getSerializableTypes();
 
 srcWriter = getSourceWriter(logger, context);
+if (shardSize  0) {
+  computeShardSize(logger);
+}
+logger.log(TreeLogger.TRACE, Using a shard size of  + shardSize
++  for TypeSerializerCreator createMethodMap);
   }
 
-  public String realize(TreeLogger logger) {
+  public String realize(TreeLogger logger) throws UnableToCompleteException {
 logger = logger.branch(TreeLogger.DEBUG,
 Generating TypeSerializer for service interface '
 + getTypeSerializerClassName() + ', null);
@@ -92,7 +133,7 @@
 
 writeCreateMethods();
 
-writeCreateMethodMapMethod();
+writeCreateMethodMapMethod(logger);
 
 writeCreateSignatureMapMethod();
 
@@ -173,13 +214,13 @@
   packageName = className.substring(0, index);
   className = className.substring(index + 1, className.length());
 }
-return new String[]{packageName, className};
+return new String[] {packageName, className};
   }
-  
+
   private JType[] getSerializableTypes() {
 return serializableTypes;
   }
-  
+
   private SourceWriter getSourceWriter(TreeLogger logger, GeneratorContext ctx) {
 String name[] = getPackageAndClassName(getTypeSerializerClassName());
 String packageName = name[0];
@@ -207,6 +248,16 @@
   }
 
   /**
+   * @param type
+   * @return
+   */
+  

[gwt-contrib] Re: RR: Hosted mode accepts 'undefined' or 'null' for boolean primitive type

2008-09-30 Thread Eric Ayers
Thanks Scott - I'm glad you were following the thread!

On Sat, Sep 27, 2008 at 2:20 AM, Scott Blum [EMAIL PROTECTED] wrote:

 On Fri, Sep 26, 2008 at 11:37 AM, Eric Ayers [EMAIL PROTECTED] wrote:

 (arg2 == null ? false : arg2)


 Use the !! coerce-to-boolean idiom instead.

 



-- 
Eric Z. Ayers - GWT Team - Atlanta, GA USA
http://code.google.com/webtoolkit/

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



[gwt-contrib] Re: DatePicker review

2008-09-30 Thread Emily Crutcher

 Something like this?

  protected void refreshAll() {
getDatePicker().refresh();
   }


Yep, and baring unexpected events, all the changes should be committed into
incubator trunk tomorrow. Thanks for your help in pounding on it!



 
 
  On Mon, Sep 29, 2008 at 5:18 PM, Isaac Truett [EMAIL PROTECTED] wrote:
 
  Yeah, 99% of that code (I'm estimating...) is CP from the Default
  classes. The biggest difference from gen1 seems to be that more code
  is package-protected than before. I had to copy DefaultCalendarView
  even though I didn't have any change to make in it. Other seemingly
  unnecessary copies are the Css, CssHandling, and DateStyler inner
  classes of DatePicker.
 
  I've started to rewrite addMonths() in my MonthSelector and ran into
  another package-protected method, DatePicker.refresh(), and that's as
  far as I had gotten before having to return to real work.
 
 
 
  On Mon, Sep 29, 2008 at 5:03 PM, Emily Crutcher [EMAIL PROTECTED] wrote:
   I doubt it, as I'm still finishing the code to create it :-). Can you
   tell
   me the pain points?  As making it easy to extend is something we are
   committed to.Are you counting the code to cut/copy the default
   calendar
   and month selectors?
  
  
  
  
  
   On Mon, Sep 29, 2008 at 4:44 PM, Isaac Truett [EMAIL PROTECTED]
 wrote:
  
   Does anyone have a working extension of the gen2 DatePicker? I
 haven't
   had a lot of time to look at it so I may be doing something horribly
   wrong but it seems that extending it is much more complicated than it
   was with the old DatePicker. I have almost 500 lines of code so far
   and I still haven't finished -- all just to add drop down lists for
   month and year. With the old DatePicker, I did it in under 150 lines.
  
  
  
  
   On Mon, Sep 29, 2008 at 1:27 PM, Emily Crutcher [EMAIL PROTECTED]
 wrote:
Could you review the gen 2 date picker code? The code is in
com.google.gwt.gen2.datepicker. This code is going to be moved over
to
gwt
after the handler code is moved, so nitpicks would be very welcome.
   
 thanks!
   
   Emily
   
--
There are only 10 types of people in the world: Those who
 understand
binary, and those who don't
   

   
  
  
  
  
  
   --
   There are only 10 types of people in the world: Those who understand
   binary, and those who don't
  
   
  
 
 
 
 
 
  --
  There are only 10 types of people in the world: Those who understand
  binary, and those who don't
 
  
 

 



-- 
There are only 10 types of people in the world: Those who understand
binary, and those who don't

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



[gwt-contrib] Re: code review requested, shard TypeSerializerCreator createMethodMap

2008-09-30 Thread Freeland Abbott
LGTM

On Tue, Sep 30, 2008 at 5:26 PM, John Tamplin [EMAIL PROTECTED] wrote:

 On Tue, Sep 30, 2008 at 4:51 PM, Freeland Abbott 
 [EMAIL PROTECTED] wrote:

 But, again, it's a nit: my way saves at most ~10b of code size and could
 gain or lose a few miliseconds in execution time depending on whether branch
 prediction in the JVM is so far below bytecode interpretation that misses
 appear free; your way is type-safe for a constant that's both clearly
 documented as an integral value and likely to change exactly once in its
 coded lifetime.  What color dresses are the angels on that pin wearing?


 Ok, try this patch.

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


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