Best practice to serialize a org.w3c.dom.Document over RPC?

2010-07-05 Thread Richard Kennard
Hi guys,

A (hopefully easy) question: what is the GWT 'best practice' to take a
server-side DOM built with org.w3c.dom.Document and pass it over RPC?

Clearly once on the client-side it needs to become a
com.google.gwt.xml.client.Document, and I can achieve this by
serializing to and from a String of XML, but is there a better way?
Something more performant that uses some built-in DOM serialization
capabilities?

Regards,

Richard.

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



Re: Best practice to serialize a org.w3c.dom.Document over RPC?

2010-07-05 Thread Richard Kennard
Perfect! Thanks for the detailed and fast responses guys.

Richard.

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



Re: Metawidget, who has used metawidget

2010-06-03 Thread Richard Kennard
Sergio,

Thanks for your interest in Metawidget!

Metawidget is currently at v0.95, so it is not quite yet mature.
However it has already been used in several production GWT projects
and has decent documentation, examples, and test coverage. If you get
chance to give it a try, I'd be happy to help you work through any
issues you may encounter.

Metawidget is a purely *runtime* UI generator, so it is not like code
generation (which is static), nor quite like scaffolding (which is
runtime, but if you want to change anything you have to generate it
statically).

Regards,

Richard.

P.S. The project URL actually *is* http://metawidget.org, it just
redirects to http://metawidget.sourceforge.net. But in case one day I
want to change repository providers I don't want to hardcode
sourceforge.net into all the links :)

On Jun 4, 12:18 am, Sergio A. Campos Valdés chec...@gmail.com wrote:
 Excuse me. The project url is metawidget.sourceforge.net, it's not
 metawidget.org

 2010/6/3 Chech0x - Segio Campos V. chec...@gmail.com

  who has used metawidget (metawidget.org) with GWT and Spring javabeans
  facade? is it mature? does it work like scaffolding or codegeneration?

 --
 Deseando que Dios le bendiga se despide:

 Sergio Andrés Campos Valdés
 Ingeniero Informático.
 Perfil LinkedIn:http://cl.linkedin.com/in/scamposv
 Twitter: chech0x

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



'Best practice' for unit testing servlets with init-params?

2009-09-25 Thread Richard Kennard

Hi guys,

When unit testing a GWT app that uses servlets, it seems you cannot
use the 'real' servlet definition in your app's web.xml. Instead you
must put a 'servlet' element into your unit test's module.gwt.xml.

However, the module.gwt.xml 'servlet' element is not as capable as the
web.xml 'servlet' element. Specifically, it does not support init-
params.

So what is the 'best practice' for simulating my app's init-params? Is
there a way in module.gwt.xml? Or is there a way in my servlet to
detect I am running as a GWT unit test? Should I subclass my servlet
to make a test version?

Regards,

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



Hack my hack: how do I migrate FocusWidget::fireClickListeners to 1.6?

2009-05-22 Thread Richard Kennard

Hi guys,

In GWT 1.5 and earlier, I have been unit testing my click handlers as
explained on my blog here...

http://kennardconsulting.blogspot.com/2008/05/firing-onclicklisteners-in-gwt-unit.html

...this little hack no longer works in 1.6, because
FocusWidget::fireClickListeners is gone - replaced by (I assume)
FocusWidget::fireEvent. So my hack would become...

native void fireEvent( FocusWidget focusWidget, GwtEvent? event )
/*-{
focuswidg...@com.google.gwt.user.client.ui.focuswidget::fireEvent
(Lcom/google/gwt/event/shared/GwtEvent;)( event );
}-*/;

The problem is I can't instantiate a ClickEvent so I'm stuck how to
call this. Is there a better way to unit test click handlers in 1.6?

Regards,

Richard.


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



Does TypeOracle.getType support parameterized types?

2009-04-03 Thread Richard Kennard

Hi guys,

Is TypeOracle.getType, which the JavaDoc says 'finds a type given its
fully qualified name', meant to work with parameterized qualified
names?

I've got a Generator that does...

typeOracle.getType( myType.getQualifiedSourceName() )

...and it works fine, but when I change it to...

typeOracle.getType( myType.getParameterizedQualifiedSourceName() )

...which in my case is more accurate, I get zero results.

Is this not implemented? Is it meant to be?

Thanks,

Richard.

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



Re: Using JavaScript 'var s in obj' on a GWT object

2009-01-02 Thread Richard Kennard

Jason, Reinier,

Oh, okay. Wow. It works completely fine in hosted mode, but crashes
and burns in production mode. I guess I'll need to go back to using
generators.

Thank you both for your time, and for the heads up.

Regards,

Richard.

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



Re: Using JavaScript 'var s in obj' on a GWT object

2008-12-30 Thread Richard Kennard

Reinier,

Thanks for your quick response.

I'm a bit confused, though. If...

 GWT compresses the java identifier of any method or field down to a very 
 short random collection of symbols

...then how come I can still do...

o...@org.foo.foo::myMethod()();

...and even...

alert( obj[ '@org.foo.Foo::myMethod()' ] );

...is there some kind of one-way mapping going on?

Regards,

Richard.

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



Using JavaScript 'var s in obj' on a GWT object

2008-12-29 Thread Richard Kennard

Dear All,

First, thanks for all your hard work on GWT. It really is a fantastic
framework!

Is there a reason why GWT-compiled JavaScript objects are not
'reflectable' like regular JavaScript objects are? When I do (in JSNI
JavaScript):

for( var s in obj )
{
   alert( obj[s] );
}

I don't see any properties or actions for GWT-compiled objects, but I
do for regular JavaScript objects. I don't much understand the 'var s
in obj' technique, but it seems it should be able to reflect GWT
objects? For example, when I do...

   alert( obj[ '@org.foo.Foo::myMethod()' ] );

...then I CAN reflect the method okay?

Regards,

Richard.

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



Why are GWT JavaScript objects not enumerable?

2008-12-14 Thread Richard Kennard

Dear All,

First, thanks for all your hard work on GWT. It really is a fantastic
framework!

Is there a reason why GWT-compiled JavaScript objects are not
'reflectable' like regular JavaScript objects are? When I do (in
JavaScript):

for( var s in obj )
{
   alert( obj[s] );
}

I don't see any properties or actions for GWT-compiled objects, but I
do for regular JavaScript objects. I don't much understand the 'var s
in obj' technique, but it seems it should be able to reflect GWT
objects? For example, when I do...

   alert( obj[ '@org.foo.Foo::myMethod()' ] );

...then I CAN reflect the method okay?

Regards,

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