Re: [gwt-contrib] Emma or JaCoCo support needs some attention

2014-05-22 Thread Nicolas Wetzel
Hi David,

Sorry to be late,

gwt-test-utils support all of your stuff (CssRessource, Gin, etc) it' build
with java assist wich modify widget bycode on the fly to prevents all call
to GWT.create
We use it in my project (very big apps in telecom since 2010). About 1000
integration test (full scenario ) and a lot of  unit test (Presenter)
It's fast, quick to write et easy to run (junit) .
It's made by a friend of mine : Gael Lazzari

Hope it helps

Nicolas


2014-05-20 19:12 GMT+02:00 David david.no...@gmail.com:

 Hi Nicolas,

 No I did not try that one. I tried GWT Mockito which looked promising and
 I actually managed to test a few widgets until someone added CssResources
 and other GWT features and then GWTMockito just exploded with a generic
 error that I should try disabling the classloading cache.

 I am using GIN and I never do a GWT.create directly (GIN does that for
 you). That helps a lot in testing the higher level classes like Activities.
 But it does not really help with widgets. (We have some customisations on
 top of the DataGrid and CellTable and it does not look possible to automate
 the testing of those.

 And using GWTTestCases is really painful especially since we can't even
 proof that we are doing decent code coverage in our tests.

 David



 On Tue, May 20, 2014 at 6:19 PM, Nicolas Wetzel wetz...@gmail.com wrote:

 HI !

 did you try gwt-test-utils ?
 it's a very good tool for testing widgets and more without GWTTestCase.




 2014-04-11 21:11 GMT+02:00 David david.no...@gmail.com:

 Any plans to improve unit testing abilities so that we might be able to
 do more unittesting without using GWTTestCase ?

 I've been trying out gwtmockito as an alternative and it is great, but
 for unit testing widgets it has many limitations.

 Sure I am using MVP for the main application logic. But custom widgets
 are hard to implement and even harder to test the way it currently is.

 I think with a little help of GWT changes that maybe it could become
 easier to inject mocks in the right place instead of using class rewriting
 and other nasty tricks like gwtmockito is doing.

 For many things having some server side fake for GWT.create would
 already help a lot (for things like CssResources or Messages it is rather
 easy to just use some dynamic proxy to fake what you normally generate for
 the client. Maybe some basic working DOM class would be great as wel,
 because then most widgets could just be created without much problems.

 Only the JSNI stuff remains a problem, but maybe if the great ideas of
 JsInterop and such might make if feasible to even find a solution there ?
 Or at least putting them in a separate class and using an interface in the
 widgets to make them mockable for test purposes would be great.

 One thing that would make GWT a lot easier to mock for testing purpose
 is if it would embrace an injection framework like GIN or as done in JBoss
 Errai. You can basically get rid of all the GWT.create invocations and
 start using @Inject so that we can replace them with either a generated
 class or a mocked class.

 David



 On Fri, Apr 11, 2014 at 8:08 PM, Goktug Gokdogan gok...@google.comwrote:

 Emma (which is already broken for some cases) is going to go away with
 dev mode. We have been talking about js based alternative but I'm not sure
 when that will be ready.


 On Fri, Apr 11, 2014 at 6:44 AM, David david.no...@gmail.com wrote:

 No feedback from the GWT developers ?


 On Mon, Apr 7, 2014 at 3:09 PM, stuckagain david.no...@gmail.comwrote:

 What is the state for supporting Emma with GWTTestCase ?

 I see that the documentation still refers to a very old version of
 Emma (and EclEmma).
 How can we use JaCoCo to do automated testing with code coverage with
 GWT TestCase ?

 What will happen when moving to Java 8 ? I guess that the old Emma as
 referred to in the documentation will have a problem with this (does it
 even support full Java 7 syntax ?)

 Will GWTTestCase support remain once DevMode goes away ? or do I
 understand that wrongly ?





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


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


  --
 http://groups.google.com/group/Google-Web-Toolkit-Contributors
 ---
 You received this message because you are subscribed to the Google
 Groups GWT Contributors group

Re: [gwt-contrib] Emma or JaCoCo support needs some attention

2014-05-20 Thread Nicolas Wetzel
HI !

did you try gwt-test-utils ?
it's a very good tool for testing widgets and more without GWTTestCase.




2014-04-11 21:11 GMT+02:00 David david.no...@gmail.com:

 Any plans to improve unit testing abilities so that we might be able to do
 more unittesting without using GWTTestCase ?

 I've been trying out gwtmockito as an alternative and it is great, but for
 unit testing widgets it has many limitations.

 Sure I am using MVP for the main application logic. But custom widgets are
 hard to implement and even harder to test the way it currently is.

 I think with a little help of GWT changes that maybe it could become
 easier to inject mocks in the right place instead of using class rewriting
 and other nasty tricks like gwtmockito is doing.

 For many things having some server side fake for GWT.create would already
 help a lot (for things like CssResources or Messages it is rather easy to
 just use some dynamic proxy to fake what you normally generate for the
 client. Maybe some basic working DOM class would be great as wel, because
 then most widgets could just be created without much problems.

 Only the JSNI stuff remains a problem, but maybe if the great ideas of
 JsInterop and such might make if feasible to even find a solution there ?
 Or at least putting them in a separate class and using an interface in the
 widgets to make them mockable for test purposes would be great.

 One thing that would make GWT a lot easier to mock for testing purpose is
 if it would embrace an injection framework like GIN or as done in JBoss
 Errai. You can basically get rid of all the GWT.create invocations and
 start using @Inject so that we can replace them with either a generated
 class or a mocked class.

 David



 On Fri, Apr 11, 2014 at 8:08 PM, Goktug Gokdogan gok...@google.comwrote:

 Emma (which is already broken for some cases) is going to go away with
 dev mode. We have been talking about js based alternative but I'm not sure
 when that will be ready.


 On Fri, Apr 11, 2014 at 6:44 AM, David david.no...@gmail.com wrote:

 No feedback from the GWT developers ?


 On Mon, Apr 7, 2014 at 3:09 PM, stuckagain david.no...@gmail.comwrote:

 What is the state for supporting Emma with GWTTestCase ?

 I see that the documentation still refers to a very old version of Emma
 (and EclEmma).
 How can we use JaCoCo to do automated testing with code coverage with
 GWT TestCase ?

 What will happen when moving to Java 8 ? I guess that the old Emma as
 referred to in the documentation will have a problem with this (does it
 even support full Java 7 syntax ?)

 Will GWTTestCase support remain once DevMode goes away ? or do I
 understand that wrongly ?





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


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


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


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


-- 
You received this message because you are subscribed to the Google Groups GWT 
Contributors group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to google-web-toolkit-contributors+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/google-web-toolkit-contributors/CAO64A8NSwyvzi%2B%2B3gCSkr2akM%3DYUgHZ45ZULkQXNhqTcUc%2BDnQ%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


Re: Image Sprites + IE6/7

2012-05-15 Thread Nicolas Wetzel
Hello,

According to the Thomas's response, we've made a ClientBundle with a
CssResource containing image Sprites in png format.
Everything works fine in Firefox and IE8 but in IE7 the clip  doesn't work
correctly:
The result of a FlowPanel (div) with a cssClass having a sprite image is a
bad cliped image background.
We work with the last version of GWT 2.4 and the Bundle contains about 50
simple png.
Maybe the bundle is too big?  Any suggestions?





2010/1/11 Thomas Broyer t.bro...@gmail.com



 On 11 jan, 22:44, Chris Lercher cl_for_mail...@gmx.net wrote:
  Hi,
 
  I'm reading the DevGuide on ClientBundle. In the Image Sprites
  paragraph, it says:
 
  Support for IE6 isn't feasible in this format, because structural
  changes to the DOM are necessary to implement a windowing effect.
  Once it's possible to distinguish ie6 and ie7 in user.agent, we could
  revisit support for ie6. In the current implementation, the ie6 code
  won't render correctly, although is a purely cosmetic issue.
 
  What does that mean?
  - Do image sprites work with IE6/7 at all

 Yes

  - If yes, what's the cosmetic issue?

 Transparent regions of your images will appear in a kind of grey/blue
 in IE6 (everything's OK in IE7, the issue is only with IE6, and with
 transparent images)

  - Should it be we could revisit support for ie7 instead of we could
  revisit support for ie6?

 No, the issue is only with IE6. For now, GWT treats IE6 and IE7 the
 same, so when it'll start to distinguish between them (without
 introducing a new user.agent value and permutation) it will be able
 (maybe) to generate specific code for IE6.

 For a workaround (using DD_BelatedPNG, which will modify the DOM by
 inserting an element just before every @sprite-d element), see
 http://code.google.com/p/google-web-toolkit/issues/detail?id=3236#c6

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





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



open native popup window and fill it with gwt doesn't work

2011-09-20 Thread Nicolas Wetzel
Hi all,

I my app, i want to alert the user for an important information, even he is
working on a other things (i.e word or other app). To alert him only native
popup (windows popup ws popup panel) can be put at the front of his desk.


So here is my code to do that, it's running without error but nothing is
display on the popup. With the java gwt debugger we have the dom
corresponding html content to the code:
divdiv class=gwt-label...Text for popup window/div/div
With firebug we can see the dom structure but it's in shadowing code writed.


I know that it's a huggly way to use gwt but for me it's should be work.


private static void displayWarningDialogBox() {

openInNewWindow(new Label(Text for popup window));


}

private static void openInNewWindow(Widget widget) {
Element ele = createWindow(widget.toString());
MyWindow win = new MyWindow(ele);
win.add(widget);
win.toString();
}

private static class MyWindow extends ComplexPanel {
public MyWindow(Element ele) {
setElement(ele);
}

@Override
public void add(Widget w) {
add(w, getElement());
}

}

private static native com.google.gwt.dom.client.Element
createWindow(String htmlCode) /*-{
myWindow = window.open(, mywindow,
location=1,status=1,scrollbars=1,  width=100,height=100);
myDiv = myWindow.document.createElement(div);
myWindow.document.body.appendChild(myDiv)
return myDiv;

}-*/;

-- 
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: NativePreviewHandler doesn't catch ONBLUR events on TextBox

2011-03-14 Thread Nicolas Wetzel
Thanks Thomas!



On Mon, Mar 14, 2011 at 4:38 PM, Thomas Broyer t.bro...@gmail.com wrote:

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

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


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



Re: Table tree ?

2010-06-19 Thread Nicolas Wetzel
look at the bikeshed project inside the 2.1 version of gwt there is an
sample with a tree table

On Tue, Mar 20, 2007 at 4:52 PM, OlivierMatt matt.oliv...@gmail.com wrote:


 Hi Sha-India,

 I am not sure its a good idea for me to create a flextable for each
 item i want to display (since there is no sharing of the columns).
 What I need is somthing like you get in a thread viewing mode of a
 mail client.

 Any idea ?

 Sincerely,

 Olivier MATT

 On 14 mar, 08:04, sha-india agshar...@gmail.com wrote:
  put a flextable(or a flowPanel) inside a TreeItem
 
  On Mar 13, 10:41 pm, OlivierMatt matt.oliv...@gmail.com wrote:
 
   Dear developers,
 
   I am new to the GWT and it seems to be a great and cute toolkit :)
 
   I am trying to figure out how to display a table tree which is a
   tree with more than one column...
 
   Any idea?
 
   Sincerely,
 
   Olivier MATT


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



-- 
You received this message because you are subscribed to the Google Groups 
Google Web Toolkit group.
To post to this group, send email to google-web-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: Twitter Emulation Using GWT

2009-12-27 Thread Nicolas Wetzel
go on the www.awdio.com, I've done this if you want the code i can give you
it

On Fri, Dec 25, 2009 at 3:54 PM, Prashant kv.prs...@gmail.com wrote:

 Hey all,

 I read this wonderful article on Nettuts called Twitter Emulation
 Using MooTools 1.2 and PHP. I love Mootools and am comfortable with
 PHP. I wanted to know how to emulate Twitter as done using PHP and
 Mootools. The scenario is the same.

 A text box is provided for input and a button to submit the text.
 There are click and key handlers provided. Now my query is how can one
 go about adding the text in display. What element could be used? I
 thought of a list box but it doesn't give the Twitter list effect. I
 thought of using HTML and adding any text dynamically but this is
 where everything is coming to a halt. Unable to understand how to go
 about this.

 Any help will be greatly appreciated.

 Thank you.

 --

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




--

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




Re: Setting DataSource (JNDI) in GWT 1.6 (hosted mode - Jetty)

2009-03-12 Thread Nicolas Wetzel
Hi
these are some things you have to do for setting a datasource:

1: put two additionnals jars in your classpath: jetty-naming-6.1.11.jar and
jetty-plus-6.1.11.jar to add some J2EE features on Jetty

2: change the startup JettyLauncher to your own custom JettyLauncher (works
with -server option ) : put this line in the tab Arguments eclipse setting
run program option:
-server com.myproject.MyCustomJettyLauncher

3 create your own MyCustomJettyLauncher : copy and past the JettyLauncher
to add some Configuration

private static String[] __dftConfigurationClasses =
{
org.mortbay.jetty.webapp.WebInfConfiguration, //
org.mortbay.jetty.plus.webapp.EnvConfiguration,//jetty-env
org.mortbay.jetty.plus.webapp.Configuration, //web.xml
org.mortbay.jetty.webapp.JettyWebXmlConfiguration,//jettyWeb
} ;

and at the end of the start() method  call
wac.setConfigurationClasses(__dftConfigurationClasses);

 WebAppContext wac = new WebAppContextWithReload(
appRootDir.getAbsolutePath(), /);
wac.setConfigurationClasses(__dftConfigurationClasses);
server.setHandler(wac);
server.start();
server.setStopAtShutdown(true);

4) edit a jetty-env.xml on the web-inf to specify a dataSource

?xml version=1.0  encoding=ISO-8859-1?
!DOCTYPE Configure PUBLIC -//Mort Bay Consulting//DTD Configure//EN 
http://jetty.mortbay.org/configure.dtd;
Configure class=org.mortbay.jetty.webapp.WebAppContext
New id=DSTest class=org.mortbay.jetty.plus.naming.Resource
Argjdbc/projectDS/Arg
Arg
New
class=com.mysql.jdbc.jdbc2.optional.MysqlConnectionPoolDataSource
Set name=Urljdbc:mysql://localhost:3306/database
/Set
Set name=UsermyUserName/Set
Set name=PasswordmyPassword/Set
/New
/Arg
/New
/Configure

5) make a reference on it in your web-inf/web.xml

resource-ref
descriptionDataSource's project/description
res-ref-namejdbc/projectDS/res-ref-name
res-typejavax.sql.DataSource/res-type
res-authContainer/res-auth
/resource-ref

it works for me

regards,

Nicolas Wetzel

On Thu, Mar 12, 2009 at 5:16 AM, wiltonj wilt...@gmail.com wrote:


 Hi,
 How to setting DataSource in GWT 1.6 (Hosted mode - Jetty)?

 Hoping for some guidance.

 Thanks  Regards,
 Wilton

 


--~--~-~--~~~---~--~~
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: Jetty classpath in GWT 1.6

2009-03-05 Thread Nicolas Wetzel
look at the post of Sami jaber
http://groups.google.com/group/Google-Web-Toolkit-Contributors/browse_thread/thread/f4ad9f021c45275c?pli=1
he's has got the solution, but it's a hack.  You just have to override the
JettyLauncher and comment the if condition at the line 213 and 214.

On Thu, Mar 5, 2009 at 2:31 PM, Markus Knittig mar...@myd0.de wrote:


 On 03/04/2009 02:53 PM, Markus Knittig wrote:

  Currently it seems that Jetty only loads class files and jars from
  WEB-INF/classes and WEB-INF/lib. The classpath argument are getting
  ignored (worked with Tomcat). I tried to add extra classpath folder via
  jetty-web.xml / jetty-env.xml, but that doesn't seems to work (e.g.
  Spring throws an ClassNotFoundException before the extra classpath is
  added).
  This seems like a step backward to me. Especially since I use Maven and
  Jetty would not only be flexible enough to load classes / jars from
  different locations, but can also load static webapp files from differnt
  location:
  http://docs.codehaus.org/display/JETTY/Multiple+WebApp+Source+Directory
  This would make things with Maven much cleaner / easier...

 Seems like an known issue:
 http://code.google.com/p/google-web-toolkit/issues/detail?id=3435

 Best regards,
  Markus

 


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



SEO limitation for Hyperlink

2009-02-27 Thread Nicolas Wetzel
Hi all,

I'm working for a compagny which build a web site broadcasting music based
on gwt: www.awdio.com

On SEO, we've found some interresting stuff to cope with Ajax specifity :
search engine can't  have javascript engine so they are not able to retrieve
the entire html produced by gwt script (or by other ajax framework script).
So each page ie gwt screen   can not be indexed by them. Rather than
duplicate each page with a hand-made static html page accessible by the
noscript tag, we produce them with a java program which launches an
SWTBrowser (Eclipse 3.4) with the start url : http://www.awdio.com.

The main issue with this approach is that the client program has no means of
knowing when the page is fully rendered by the javascript process.
In the gwt awdio code we implemented a semaphore (flag) which notifies the
SWTBrowser based client of the completion.

This semaphore works with a hidden DIV drawing/DIV which is accessible
or not in the DOM, i.e the the html content produced contains it.
With org.eclipse.swt.browser.Browser.getText() we can retrieve the html
content, and test for the presence of the above mentioned flag.

To do that  the java program listens at the Browser statustext event
(org.eclipse.swt.browser.StatusTextListener).

Also, when the page is loaded, the program gets the content and looks up at
all the internal links a href=#  built by the gwt Hyperlink widget. Before
storing the html content in a cachable static page,  all the '#' are
remplaced by a '/' so that the bot will get fully qualified URLs (the
crawlers do not handle anchors).

Finally, the program follow each links with the SWTBrowser so all the static
version of the pages can be produced automaticaly.

At last in the awdio server, a front-end servlet detects the user-agent of
request and if it's a search engine the static produced page is returned.
else the gwt host page is returned.
As far as I understand, this might be considered shadowing. But the
content seen by the crawler is exactly the same as the one seen by the user
(after Javascript execution).

In the onModuleLoad of the awdio EntryPoint the right part of the url is
parsed to build the corresponding historyToken. So when the
www.awdio.com/events is requested on a browser, it react in the same way as
if the user clicked on an internal link (#events).

Everythink looksfine,  but there is still a big issue.

If a user copies and pastes one of our URLs on his own site, it will contain
the hash sign (e.g. : http://www.awdio.com/#events). Which means that the
search engine will not rank pages independently (all pages will be
considered as a single one : http://www.awdio.com).

We can still add link to this page buttons wherever necessary, but it's
not satisfactory.

To conclude, it seems that this whole solution solves the AJAX indexing
issue, with the very annoying exception of page ranking (due to the #anchor
URLs). Maybe Google should start to consider #anchors as having a new
meaning for our Web 2.0 generation ? Maybe by considering a specific value
of the rel attribute ? (e.g. :  A HREF=#mypage rel=ispagelinkMy
Page/A) ?

--~--~-~--~~~---~--~~
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: Memory leak with Widget.wrap method

2009-02-11 Thread Nicolas Wetzel
Thank you  Jason  for your usefull response


I missed it and it helps us to find a better solution than override the
gwt-user.jar  but there is still something wrong.
The wrap() method calls widget.onAttach(); so the wrapped widget is attached
when  created, we can't put it in the used hierarchie of Gwt widget
components : ie you can't call
myHTMLFragment.getChildren().add(w);
because when the parent (myHTMLFragment) will be attached, the recursive
call of the wrappedWidget.onAttach() will failed.
We have to manage the wrapped widgets with our own hierarchy like this :

@Override
public void add(Widget w) {
if (w.isAttached()) // wrapped widget
register(w);
else
super.add(w);
}

public void register(Widget w) {
getWrappedChildren().add(w);

}


@Override
protected void doDetachChildren() {
super.doDetachChildren();
DeferredCommand.addCommand(new Command(){
public void execute() {
for (Widget widget : getWrappedChildren())
if (widget.getParent() == null){// wrapped elements
RootPanel.detachNow(widget);//wrapped widget are
detached //
}

}});


}
it work fine but what happen's when you want to re-attache the HTMLFragment
? who can re-attach the wrapped widget ? (the onAttach() is protected)
the only way we found is to put wrapped widgets in the gwt hierachie after
the call of RootPanel.detachNow(widget);
and that's not a very good solution!
Nicolas


On Tue, Feb 10, 2009 at 7:30 PM, Jason Essington
jason.essing...@gmail.comwrote:

 RootPanel.detachNow(Widget) method should be called before removing a
 wrapped widget from DOM to prevent your memory leak.

 I believe that this method is documented in every widget that implements
 .wrap()

 -jason


 On Feb 10, 2009, at 10:55 AM, Nicolas Wetzel wrote:

 Hi all! ,

 The Widget.wrap()  API is very usefull to build widgets(fragments)  from
 html templates retrieved from server or bound with the java widget class at
 the compilation time (generators).
 By this way,  the design (HTML+CSS) is entirely delagated to Web
 Developpers, Java Gwt Developpers have to manage only with GWT Widget which
 are in fact only controllers:

 Each controler pick up some html element by id left in its corresponding
 template and build gwt widget (TextBox,Label etc...) with the wrap API  to
 manage the (dynamic) behavior.
 No css gwt api is used, no Panel for composition is used.

 Everything works fine while the  widget fragment is attached to the DOM
 (RootPanel) but there is a trouble :
   If the widget fragment is detached its components (i e widgets created
 with the wrap api)  are not garbaged because they don't have any parent.
   So there is a memory leak. The wrap method doesn't alow to link the life
 cycle of the component to its logical parent i e the widget parent. Here is
 the code of the wrap method :

 public static Label wrap(Element element) {
 // Assert that the element is attached.
 assert Document.get().getBody().isOrHasChild(element);

 Label label = new Label(element);

 // Mark it attached and remember it for cleanup.
 label.onAttach();
 RootPanel.detachOnWindowClose(label);

 return label;
   }


 By the call of RootPanel.detachOnWindowClose(label); the widget is
 gabaged only when the main window is closed. It is  not very clean if the
 fragment is garbaged. We reported this touble
 http://code.google.com/p/google-web-toolkit/issues/detail?id=3113 in
 the bug tracker few months ago but it still in the same state .












 


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



Memory leak with Widget.wrap method

2009-02-10 Thread Nicolas Wetzel
Hi all! ,

The Widget.wrap()  API is very usefull to build widgets(fragments)  from
html templates retrieved from server or bound with the java widget class at
the compilation time (generators).
By this way,  the design (HTML+CSS) is entirely delagated to Web
Developpers, Java Gwt Developpers have to manage only with GWT Widget which
are in fact only controllers:

Each controler pick up some html element by id left in its corresponding
template and build gwt widget (TextBox,Label etc...) with the wrap API  to
manage the (dynamic) behavior.
No css gwt api is used, no Panel for composition is used.

Everything works fine while the  widget fragment is attached to the DOM
(RootPanel) but there is a trouble :
  If the widget fragment is detached its components (i e widgets created
with the wrap api)  are not garbaged because they don't have any parent.
  So there is a memory leak. The wrap method doesn't alow to link the life
cycle of the component to its logical parent i e the widget parent. Here is
the code of the wrap method :

public static Label wrap(Element element) {
// Assert that the element is attached.
assert Document.get().getBody().isOrHasChild(element);

Label label = new Label(element);

// Mark it attached and remember it for cleanup.
label.onAttach();
RootPanel.detachOnWindowClose(label);

return label;
  }


By the call of RootPanel.detachOnWindowClose(label); the widget is gabaged
only when the main window is closed. It is  not very clean if the fragment
is garbaged. We reported this touble
http://code.google.com/p/google-web-toolkit/issues/detail?id=3113 in the
bug tracker few months ago but it still in the same state .

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