--
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+unsubscribe@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/google-web-toolkit?hl=en.
Thursday, March 31, 2011
GWT designer for Netbeans
Re: Few problems with creating/ updating entities with requestfactory and appengine
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+unsubscribe@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/google-web-toolkit?hl=en.
Re: Overriding panel's iterator() prevents clickHandler from being called.
> Correct. You weren't abusing the iterator itself, you were abusing
> the iterator method, which other things used.
>
> You can still extend ScrollPanel, but just add your own bit of
> interface on top of it. Like this bit of pseudocode.
>
Ok, thanks for the help.
> This is all a very view-centric way of doing it, however. I might
> suggest reading up on the MVP pattern, which would help abstract away
> the details of the panels entirely.
>
I see. Thanks again, off to reading on MVP I guess.
Regards,
Olivier
--
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+unsubscribe@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/google-web-toolkit?hl=en.
GWT Date Serialization problem
I havnt tested extensively for what dates cause this problem, but I do see this randomly. Yes the Client and the Server are in different time zones, but I am not setting the time component (using sql.date on the server side, which essentially has no time component).
Anybody has encountered this before? I can work aound this (by passing the DD, MM, YYYY components separately), but want to understand the problem better.
Thanks
--
You received this message because you are subscribed to the Google Groups "Google Web Toolkit" group.
To post to this group, send email to google-web-toolkit@googlegroups.com.
To unsubscribe from this group, send email to google-web-toolkit+unsubscribe@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/google-web-toolkit?hl=en.
Re: Overriding panel's iterator() prevents clickHandler from being called.
the iterator method, which other things used.
You can still extend ScrollPanel, but just add your own bit of
interface on top of it. Like this bit of pseudocode.
class MyScrollPanel extends ScrollPanel {
private FlowPanel mySecretFlowPanel;
public void addThing(Thing x) { //add things to secret flow panel
here }
public void removeThing(Thing x) { //you get the idea }
public Iterator<Thing> getThingIterator() { return
mySecretFlowPanel.iterator(); }
}
This is all a very view-centric way of doing it, however. I might
suggest reading up on the MVP pattern, which would help abstract away
the details of the panels entirely.
-Ben
On Mar 31, 12:02 pm, Vhann3000 <vhann3...@gmail.com> wrote:
> On Mar 31, 11:53 am, Vhann3000 <vhann3...@gmail.com> wrote:> 2- When the Button gets clicked, it should call the ItemClickHandler
> > (but it does not if and only the overriden iterator() is not there).
>
> I meant it doesn't work when I override iterator().
>
> Now, from what I understand, GWT relies on being to walk through the
> panel tree using iterators() and that means I can't "hide" a panel
> like that
> (hence why it fails).
>
> If I'm correct, then what are my options? Obviously, I can't use
> ScrollPanel
> because it implements the "HasOneWidget" interface. But then, if I
> don't
> extend ScrollPanel, how can I implement HasScrollHandlers: to do that,
> I must implement addScrollHandler() which returns a
> HandlerRegistration.
> The problem is that, as far as I know, HandlerRegistration can only be
> returned by
> HandlerManager and its subclasses (DefaultHandlerManager) yet these
> are deprecated
> with no replacement :s .
>
> Regards,
> Olivier
--
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+unsubscribe@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/google-web-toolkit?hl=en.
Re: seemingly misleading verbiage in the documentation...
JSON.parse function
is used. For older browsers including IE6 and IE7 that lack a JSON.parse
function, the input is validated as described in RFC 4627 for safety and passed to eval()
."eval()
function, which can execute arbitrary script. DO NOT pass an untrusted string into this method."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+unsubscribe@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/google-web-toolkit?hl=en.
Re: Few problems with creating/ updating entities with requestfactory and appengine
Hi Juan1. I added @Basic annotation with fetch type eager and it works. Till now I was pretty sure that embedded object are always fetched and I thought that this problem is related to the appengine.2. Here is my persistence.xml file. Do you suggest that I should use transactions to get it working ? I'm using appengine for the first time and this app is actually testing app, I'm testing the new api Editors, RF. That's why i don't know much about appengine and its datastore.<?xml version="1.0" encoding="UTF-8" standalone="no"?><persistence xmlns="http://java.sun.com/xml/ns/persistence"xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" version="1.0"xsi:schemaLocation="http://java.sun.com/xml/ns/persistence http://java.sun.com/xml/ns/persistence/persistence_1_0.xsd"><persistence-unit name="transactions-optional"><provider>org.datanucleus.store.appengine.jpa.DatastorePersistenceProvider</provider><properties><property name="datanucleus.NontransactionalRead" value="true" /><property name="datanucleus.NontransactionalWrite" value="true" /><property name="datanucleus.ConnectionURL" value="appengine" /></properties></persistence-unit></persistence>--
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+unsubscribe@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+unsubscribe@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/google-web-toolkit?hl=en.
Re: Few problems with creating/ updating entities with requestfactory and appengine
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+unsubscribe@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/google-web-toolkit?hl=en.
RichTextArea, SafeHtml, and general rich text best practices
(using the RichTextToolbar from the Showcase). I'm not quite sure I
understand the best practices for using RichTextArea with SafeHtml.
GWT's RichTextArea.java has the methods:
void setHTML(SafeHtml)
String getHTML()
Let's say I'm writing an app which let's the user:
1) Create new posts
2) Edit posts
3) Display posts
-----
1) Create new posts
a) First, they create a post by typing in the RichTextArea using the
various formatting buttons available in the toolbar.
b) This post needs to be persisted somewhere (a database or
whatever). Is it necessary to "sanitize" the user input at this
point????? I assume it's not necessary. So we simply call
RichTextArea.getHTML() and persist this raw string containing
<span>'s, <b>'s etc.
2) Edit posts
To edit the posts, we take the raw HTML the user previously entered
that was persisted somewhere, and call
RichTextArea.setHTML(SafeHtml). Right? The problem is we cannot
generate SafeHtml that does not escape even the basic HTML outputted
previously from the RichTextArea. For instance, RichTextArea
generates <span>'s for most of the content. SafeHtmlUtils and
SimpleHtmlSanitizer will escape this tag. I'm assuming using
RichTextArea.setHTML(String) is a bad practice, so I'm looking for the
proper way to do this.
3) Display posts
Displaying posts is similar to editing them, but with the added
problem that unless they're displayed in an iframe (or another
RichTextArea), the post will look different than what the user
inputted (since it inherits styles from the rest of the page).
Can someone explain the best practices for using RichTextArea? I'm
not really knowledgeable in this area. I'm starting to think that web
applications actually do not store HTML at all for posts/discussions.
They'll use some other markup like bbcode, markdown, wikipedia style,
etc. If that's the case, why do all the rich text widgets (CKEditor,
tinymce, GXT RTE, GWT RichTextArea output HTML instead of some other
"safe" format?
... like RichTextArea.setRichText(RichText text) and
RichTextArea.getRichText()...
Hopefully someone can help explain this to me.
Thanks!
--
You received this message because you are subscribed to the Google Groups "Google Web Toolkit" group.
To post to this group, send email to google-web-toolkit@googlegroups.com.
To unsubscribe from this group, send email to google-web-toolkit+unsubscribe@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/google-web-toolkit?hl=en.
CellBrowser-Tree Node
In a Single Selection Cell Browser, I am able to get the selected
object from the TreeNode. But how do I get the entire path of the
selection.
For example
If I am selecting a Child node from the browser, how do I get the
parent info along with it.
A(Root) - > Aa(Child) ->A1(Leaf)
I would like to get A.Aa.A1 as the path of my selection.
Thanks
--
You received this message because you are subscribed to the Google Groups "Google Web Toolkit" group.
To post to this group, send email to google-web-toolkit@googlegroups.com.
To unsubscribe from this group, send email to google-web-toolkit+unsubscribe@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/google-web-toolkit?hl=en.
Re: Overriding panel's iterator() prevents clickHandler from being called.
> 2- When the Button gets clicked, it should call the ItemClickHandler
> (but it does not if and only the overriden iterator() is not there).
>
I meant it doesn't work when I override iterator().
Now, from what I understand, GWT relies on being to walk through the
panel tree using iterators() and that means I can't "hide" a panel
like that
(hence why it fails).
If I'm correct, then what are my options? Obviously, I can't use
ScrollPanel
because it implements the "HasOneWidget" interface. But then, if I
don't
extend ScrollPanel, how can I implement HasScrollHandlers: to do that,
I must implement addScrollHandler() which returns a
HandlerRegistration.
The problem is that, as far as I know, HandlerRegistration can only be
returned by
HandlerManager and its subclasses (DefaultHandlerManager) yet these
are deprecated
with no replacement :s .
Regards,
Olivier
--
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+unsubscribe@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/google-web-toolkit?hl=en.
Re: Problems running GWT & Maven project in hosted mode (I18N?)
Hi,I'm currently trying to add Maven support to my GWT project. I've added all the necessary dependencies and everything seems to be ok. However, I can't run the project in hosted mode as I get the following exception (see below).Anybody have any idea what this means?Thanks,JonLoading modulesuk.ac.glam.smartwps.SmartWPSLoading inherited module 'com.google.gwt.user.User'Loading inherited module 'com.google.gwt.i18n.I18N'[ERROR] Element 'property-provider' beginning on line 75 contains unexpected attribute 'generator'[ERROR] Failure while parsing XMLcom.google.gwt.core.ext.UnableToCompleteException: (see previous log entries)at com.google.gwt.dev.util.xml.DefaultSchema.onUnexpectedAttribute(DefaultSchema.java:72)at com.google.gwt.dev.util.xml.Schema.onUnexpectedAttribute(Schema.java:80)at com.google.gwt.dev.util.xml.Schema.onUnexpectedAttribute(Schema.java:80)at com.google.gwt.dev.util.xml.ReflectiveParser$Impl.startElement(ReflectiveParser.java:228)at org.apache.xerces.parsers.AbstractSAXParser.startElement(Unknown Source)at org.apache.xerces.parsers.AbstractXMLDocumentParser.emptyElement(Unknown Source)at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanStartElement(Unknown Source)at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl$FragmentContentDispatcher.dispatch(Unknown Source)at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanDocument(Unknown Source)at org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source)at org.apache.xerces.parsers.DTDConfiguration.parse(Unknown Source)at org.apache.xerces.parsers.XMLParser.parse(Unknown Source)at org.apache.xerces.parsers.AbstractSAXParser.parse(Unknown Source)at com.google.gwt.dev.util.xml.ReflectiveParser$Impl.parse(ReflectiveParser.java:331)at com.google.gwt.dev.util.xml.ReflectiveParser$Impl.access$100(ReflectiveParser.java:48)at com.google.gwt.dev.util.xml.ReflectiveParser.parse(ReflectiveParser.java:402)at com.google.gwt.dev.cfg.ModuleDefLoader.nestedLoad(ModuleDefLoader.java:266)at com.google.gwt.dev.cfg.ModuleDefSchema$BodySchema.__inherits_begin(ModuleDefSchema.java:413)at sun.reflect.GeneratedMethodAccessor1.invoke(Unknown Source)at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)at java.lang.reflect.Method.invoke(Method.java:597)at com.google.gwt.dev.util.xml.HandlerMethod.invokeBegin(HandlerMethod.java:230)at com.google.gwt.dev.util.xml.ReflectiveParser$Impl.startElement(ReflectiveParser.java:274)at org.apache.xerces.parsers.AbstractSAXParser.startElement(Unknown Source)at org.apache.xerces.parsers.AbstractXMLDocumentParser.emptyElement(Unknown Source)at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanStartElement(Unknown Source)at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl$FragmentContentDispatcher.dispatch(Unknown Source)at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanDocument(Unknown Source)at org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source)at org.apache.xerces.parsers.DTDConfiguration.parse(Unknown Source)at org.apache.xerces.parsers.XMLParser.parse(Unknown Source)at org.apache.xerces.parsers.AbstractSAXParser.parse(Unknown Source)at com.google.gwt.dev.util.xml.ReflectiveParser$Impl.parse(ReflectiveParser.java:331)at com.google.gwt.dev.util.xml.ReflectiveParser$Impl.access$100(ReflectiveParser.java:48)at com.google.gwt.dev.util.xml.ReflectiveParser.parse(ReflectiveParser.java:402)at com.google.gwt.dev.cfg.ModuleDefLoader.nestedLoad(ModuleDefLoader.java:266)at com.google.gwt.dev.cfg.ModuleDefSchema$BodySchema.__inherits_begin(ModuleDefSchema.java:413)at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)at java.lang.reflect.Method.invoke(Method.java:597)at com.google.gwt.dev.util.xml.HandlerMethod.invokeBegin(HandlerMethod.java:230)at com.google.gwt.dev.util.xml.ReflectiveParser$Impl.startElement(ReflectiveParser.java:274)at org.apache.xerces.parsers.AbstractSAXParser.startElement(Unknown Source)at org.apache.xerces.parsers.AbstractXMLDocumentParser.emptyElement(Unknown Source)at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanStartElement(Unknown Source)at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl$FragmentContentDispatcher.dispatch(Unknown Source)at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanDocument(Unknown Source)at org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source)at org.apache.xerces.parsers.DTDConfiguration.parse(Unknown Source)at org.apache.xerces.parsers.XMLParser.parse(Unknown Source)at org.apache.xerces.parsers.AbstractSAXParser.parse(Unknown Source)at com.google.gwt.dev.util.xml.ReflectiveParser$Impl.parse(ReflectiveParser.java:331)at com.google.gwt.dev.util.xml.ReflectiveParser$Impl.access$100(ReflectiveParser.java:48)at com.google.gwt.dev.util.xml.ReflectiveParser.parse(ReflectiveParser.java:402)at com.google.gwt.dev.cfg.ModuleDefLoader.nestedLoad(ModuleDefLoader.java:266)at com.google.gwt.dev.cfg.ModuleDefLoader$1.load(ModuleDefLoader.java:178)at com.google.gwt.dev.cfg.ModuleDefLoader.doLoadModule(ModuleDefLoader.java:294)at com.google.gwt.dev.cfg.ModuleDefLoader.loadFromClassPath(ModuleDefLoader.java:147)at com.google.gwt.dev.DevModeBase.loadModule(DevModeBase.java:973)at com.google.gwt.dev.DevMode.loadModule(DevMode.java:482)at com.google.gwt.dev.DevMode.doSlowStartup(DevMode.java:372)at com.google.gwt.dev.DevModeBase.startUp(DevModeBase.java:1081)at com.google.gwt.dev.DevModeBase.run(DevModeBase.java:795)at com.google.gwt.dev.DevMode.main(DevMode.java:282)[ERROR] Unexpected error while processing XMLcom.google.gwt.core.ext.UnableToCompleteException: (see previous log entries)at com.google.gwt.dev.util.xml.ReflectiveParser$Impl.parse(ReflectiveParser.java:355)at com.google.gwt.dev.util.xml.ReflectiveParser$Impl.access$100(ReflectiveParser.java:48)at com.google.gwt.dev.util.xml.ReflectiveParser.parse(ReflectiveParser.java:402)at com.google.gwt.dev.cfg.ModuleDefLoader.nestedLoad(ModuleDefLoader.java:266)at com.google.gwt.dev.cfg.ModuleDefSchema$BodySchema.__inherits_begin(ModuleDefSchema.java:413)at sun.reflect.GeneratedMethodAccessor1.invoke(Unknown Source)at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)at java.lang.reflect.Method.invoke(Method.java:597)at com.google.gwt.dev.util.xml.HandlerMethod.invokeBegin(HandlerMethod.java:230)at com.google.gwt.dev.util.xml.ReflectiveParser$Impl.startElement(ReflectiveParser.java:274)at org.apache.xerces.parsers.AbstractSAXParser.startElement(Unknown Source)at org.apache.xerces.parsers.AbstractXMLDocumentParser.emptyElement(Unknown Source)at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanStartElement(Unknown Source)at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl$FragmentContentDispatcher.dispatch(Unknown Source)at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanDocument(Unknown Source)at org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source)at org.apache.xerces.parsers.DTDConfiguration.parse(Unknown Source)at org.apache.xerces.parsers.XMLParser.parse(Unknown Source)at org.apache.xerces.parsers.AbstractSAXParser.parse(Unknown Source)at com.google.gwt.dev.util.xml.ReflectiveParser$Impl.parse(ReflectiveParser.java:331)at com.google.gwt.dev.util.xml.ReflectiveParser$Impl.access$100(ReflectiveParser.java:48)at com.google.gwt.dev.util.xml.ReflectiveParser.parse(ReflectiveParser.java:402)at com.google.gwt.dev.cfg.ModuleDefLoader.nestedLoad(ModuleDefLoader.java:266)at com.google.gwt.dev.cfg.ModuleDefSchema$BodySchema.__inherits_begin(ModuleDefSchema.java:413)at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)at java.lang.reflect.Method.invoke(Method.java:597)at com.google.gwt.dev.util.xml.HandlerMethod.invokeBegin(HandlerMethod.java:230)at com.google.gwt.dev.util.xml.ReflectiveParser$Impl.startElement(ReflectiveParser.java:274)at org.apache.xerces.parsers.AbstractSAXParser.startElement(Unknown Source)at org.apache.xerces.parsers.AbstractXMLDocumentParser.emptyElement(Unknown Source)at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanStartElement(Unknown Source)at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl$FragmentContentDispatcher.dispatch(Unknown Source)at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanDocument(Unknown Source)at org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source)at org.apache.xerces.parsers.DTDConfiguration.parse(Unknown Source)at org.apache.xerces.parsers.XMLParser.parse(Unknown Source)at org.apache.xerces.parsers.AbstractSAXParser.parse(Unknown Source)at com.google.gwt.dev.util.xml.ReflectiveParser$Impl.parse(ReflectiveParser.java:331)at com.google.gwt.dev.util.xml.ReflectiveParser$Impl.access$100(ReflectiveParser.java:48)at com.google.gwt.dev.util.xml.ReflectiveParser.parse(ReflectiveParser.java:402)at com.google.gwt.dev.cfg.ModuleDefLoader.nestedLoad(ModuleDefLoader.java:266)at com.google.gwt.dev.cfg.ModuleDefLoader$1.load(ModuleDefLoader.java:178)at com.google.gwt.dev.cfg.ModuleDefLoader.doLoadModule(ModuleDefLoader.java:294)at com.google.gwt.dev.cfg.ModuleDefLoader.loadFromClassPath(ModuleDefLoader.java:147)at com.google.gwt.dev.DevModeBase.loadModule(DevModeBase.java:973)at com.google.gwt.dev.DevMode.loadModule(DevMode.java:482)at com.google.gwt.dev.DevMode.doSlowStartup(DevMode.java:372)at com.google.gwt.dev.DevModeBase.startUp(DevModeBase.java:1081)at com.google.gwt.dev.DevModeBase.run(DevModeBase.java:795)at com.google.gwt.dev.DevMode.main(DevMode.java:282)[ERROR] Line 38: Unexpected exception while processing element 'inherits'com.google.gwt.core.ext.UnableToCompleteException: (see previous log entries)at com.google.gwt.dev.cfg.ModuleDefLoader.nestedLoad(ModuleDefLoader.java:269)at com.google.gwt.dev.cfg.ModuleDefSchema$BodySchema.__inherits_begin(ModuleDefSchema.java:413)at sun.reflect.GeneratedMethodAccessor1.invoke(Unknown Source)at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)at java.lang.reflect.Method.invoke(Method.java:597)at com.google.gwt.dev.util.xml.HandlerMethod.invokeBegin(HandlerMethod.java:230)at com.google.gwt.dev.util.xml.ReflectiveParser$Impl.startElement(ReflectiveParser.java:274)at org.apache.xerces.parsers.AbstractSAXParser.startElement(Unknown Source)at org.apache.xerces.parsers.AbstractXMLDocumentParser.emptyElement(Unknown Source)at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanStartElement(Unknown Source)at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl$FragmentContentDispatcher.dispatch(Unknown Source)at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanDocument(Unknown Source)at org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source)at org.apache.xerces.parsers.DTDConfiguration.parse(Unknown Source)at org.apache.xerces.parsers.XMLParser.parse(Unknown Source)at org.apache.xerces.parsers.AbstractSAXParser.parse(Unknown Source)at com.google.gwt.dev.util.xml.ReflectiveParser$Impl.parse(ReflectiveParser.java:331)at com.google.gwt.dev.util.xml.ReflectiveParser$Impl.access$100(ReflectiveParser.java:48)at com.google.gwt.dev.util.xml.ReflectiveParser.parse(ReflectiveParser.java:402)at com.google.gwt.dev.cfg.ModuleDefLoader.nestedLoad(ModuleDefLoader.java:266)at com.google.gwt.dev.cfg.ModuleDefSchema$BodySchema.__inherits_begin(ModuleDefSchema.java:413)at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)at java.lang.reflect.Method.invoke(Method.java:597)at com.google.gwt.dev.util.xml.HandlerMethod.invokeBegin(HandlerMethod.java:230)at com.google.gwt.dev.util.xml.ReflectiveParser$Impl.startElement(ReflectiveParser.java:274)at org.apache.xerces.parsers.AbstractSAXParser.startElement(Unknown Source)at org.apache.xerces.parsers.AbstractXMLDocumentParser.emptyElement(Unknown Source)at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanStartElement(Unknown Source)at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl$FragmentContentDispatcher.dispatch(Unknown Source)at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanDocument(Unknown Source)at org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source)at org.apache.xerces.parsers.DTDConfiguration.parse(Unknown Source)at org.apache.xerces.parsers.XMLParser.parse(Unknown Source)at org.apache.xerces.parsers.AbstractSAXParser.parse(Unknown Source)at com.google.gwt.dev.util.xml.ReflectiveParser$Impl.parse(ReflectiveParser.java:331)at com.google.gwt.dev.util.xml.ReflectiveParser$Impl.access$100(ReflectiveParser.java:48)at com.google.gwt.dev.util.xml.ReflectiveParser.parse(ReflectiveParser.java:402)at com.google.gwt.dev.cfg.ModuleDefLoader.nestedLoad(ModuleDefLoader.java:266)at com.google.gwt.dev.cfg.ModuleDefLoader$1.load(ModuleDefLoader.java:178)at com.google.gwt.dev.cfg.ModuleDefLoader.doLoadModule(ModuleDefLoader.java:294)at com.google.gwt.dev.cfg.ModuleDefLoader.loadFromClassPath(ModuleDefLoader.java:147)at com.google.gwt.dev.DevModeBase.loadModule(DevModeBase.java:973)at com.google.gwt.dev.DevMode.loadModule(DevMode.java:482)at com.google.gwt.dev.DevMode.doSlowStartup(DevMode.java:372)at com.google.gwt.dev.DevModeBase.startUp(DevModeBase.java:1081)at com.google.gwt.dev.DevModeBase.run(DevModeBase.java:795)at com.google.gwt.dev.DevMode.main(DevMode.java:282)[ERROR] Failure while parsing XMLcom.google.gwt.core.ext.UnableToCompleteException: (see previous log entries)at com.google.gwt.dev.util.xml.DefaultSchema.onHandlerException(DefaultSchema.java:58)at com.google.gwt.dev.util.xml.Schema.onHandlerException(Schema.java:66)at com.google.gwt.dev.util.xml.Schema.onHandlerException(Schema.java:66)at com.google.gwt.dev.util.xml.HandlerMethod.invokeBegin(HandlerMethod.java:240)at com.google.gwt.dev.util.xml.ReflectiveParser$Impl.startElement(ReflectiveParser.java:274)at org.apache.xerces.parsers.AbstractSAXParser.startElement(Unknown Source)at org.apache.xerces.parsers.AbstractXMLDocumentParser.emptyElement(Unknown Source)at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanStartElement(Unknown Source)at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl$FragmentContentDispatcher.dispatch(Unknown Source)at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanDocument(Unknown Source)at org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source)at org.apache.xerces.parsers.DTDConfiguration.parse(Unknown Source)at org.apache.xerces.parsers.XMLParser.parse(Unknown Source)at org.apache.xerces.parsers.AbstractSAXParser.parse(Unknown Source)at com.google.gwt.dev.util.xml.ReflectiveParser$Impl.parse(ReflectiveParser.java:331)at com.google.gwt.dev.util.xml.ReflectiveParser$Impl.access$100(ReflectiveParser.java:48)at com.google.gwt.dev.util.xml.ReflectiveParser.parse(ReflectiveParser.java:402)at com.google.gwt.dev.cfg.ModuleDefLoader.nestedLoad(ModuleDefLoader.java:266)at com.google.gwt.dev.cfg.ModuleDefSchema$BodySchema.__inherits_begin(ModuleDefSchema.java:413)at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)at java.lang.reflect.Method.invoke(Method.java:597)at com.google.gwt.dev.util.xml.HandlerMethod.invokeBegin(HandlerMethod.java:230)at com.google.gwt.dev.util.xml.ReflectiveParser$Impl.startElement(ReflectiveParser.java:274)at org.apache.xerces.parsers.AbstractSAXParser.startElement(Unknown Source)at org.apache.xerces.parsers.AbstractXMLDocumentParser.emptyElement(Unknown Source)at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanStartElement(Unknown Source)at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl$FragmentContentDispatcher.dispatch(Unknown Source)at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanDocument(Unknown Source)at org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source)at org.apache.xerces.parsers.DTDConfiguration.parse(Unknown Source)at org.apache.xerces.parsers.XMLParser.parse(Unknown Source)at org.apache.xerces.parsers.AbstractSAXParser.parse(Unknown Source)at com.google.gwt.dev.util.xml.ReflectiveParser$Impl.parse(ReflectiveParser.java:331)at com.google.gwt.dev.util.xml.ReflectiveParser$Impl.access$100(ReflectiveParser.java:48)at com.google.gwt.dev.util.xml.ReflectiveParser.parse(ReflectiveParser.java:402)at com.google.gwt.dev.cfg.ModuleDefLoader.nestedLoad(ModuleDefLoader.java:266)at com.google.gwt.dev.cfg.ModuleDefLoader$1.load(ModuleDefLoader.java:178)at com.google.gwt.dev.cfg.ModuleDefLoader.doLoadModule(ModuleDefLoader.java:294)at com.google.gwt.dev.cfg.ModuleDefLoader.loadFromClassPath(ModuleDefLoader.java:147)at com.google.gwt.dev.DevModeBase.loadModule(DevModeBase.java:973)at com.google.gwt.dev.DevMode.loadModule(DevMode.java:482)at com.google.gwt.dev.DevMode.doSlowStartup(DevMode.java:372)at com.google.gwt.dev.DevModeBase.startUp(DevModeBase.java:1081)at com.google.gwt.dev.DevModeBase.run(DevModeBase.java:795)at com.google.gwt.dev.DevMode.main(DevMode.java:282)[ERROR] Unexpected error while processing XMLcom.google.gwt.core.ext.UnableToCompleteException: (see previous log entries)at com.google.gwt.dev.util.xml.ReflectiveParser$Impl.parse(ReflectiveParser.java:355)at com.google.gwt.dev.util.xml.ReflectiveParser$Impl.access$100(ReflectiveParser.java:48)at com.google.gwt.dev.util.xml.ReflectiveParser.parse(ReflectiveParser.java:402)at com.google.gwt.dev.cfg.ModuleDefLoader.nestedLoad(ModuleDefLoader.java:266)at com.google.gwt.dev.cfg.ModuleDefSchema$BodySchema.__inherits_begin(ModuleDefSchema.java:413)at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)at java.lang.reflect.Method.invoke(Method.java:597)at com.google.gwt.dev.util.xml.HandlerMethod.invokeBegin(HandlerMethod.java:230)at com.google.gwt.dev.util.xml.ReflectiveParser$Impl.startElement(ReflectiveParser.java:274)at org.apache.xerces.parsers.AbstractSAXParser.startElement(Unknown Source)at org.apache.xerces.parsers.AbstractXMLDocumentParser.emptyElement(Unknown Source)at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanStartElement(Unknown Source)at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl$FragmentContentDispatcher.dispatch(Unknown Source)at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanDocument(Unknown Source)at org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source)at org.apache.xerces.parsers.DTDConfiguration.parse(Unknown Source)at org.apache.xerces.parsers.XMLParser.parse(Unknown Source)at org.apache.xerces.parsers.AbstractSAXParser.parse(Unknown Source)at com.google.gwt.dev.util.xml.ReflectiveParser$Impl.parse(ReflectiveParser.java:331)at com.google.gwt.dev.util.xml.ReflectiveParser$Impl.access$100(ReflectiveParser.java:48)at com.google.gwt.dev.util.xml.ReflectiveParser.parse(ReflectiveParser.java:402)at com.google.gwt.dev.cfg.ModuleDefLoader.nestedLoad(ModuleDefLoader.java:266)at com.google.gwt.dev.cfg.ModuleDefLoader$1.load(ModuleDefLoader.java:178)at com.google.gwt.dev.cfg.ModuleDefLoader.doLoadModule(ModuleDefLoader.java:294)at com.google.gwt.dev.cfg.ModuleDefLoader.loadFromClassPath(ModuleDefLoader.java:147)at com.google.gwt.dev.DevModeBase.loadModule(DevModeBase.java:973)at com.google.gwt.dev.DevMode.loadModule(DevMode.java:482)at com.google.gwt.dev.DevMode.doSlowStartup(DevMode.java:372)at com.google.gwt.dev.DevModeBase.startUp(DevModeBase.java:1081)at com.google.gwt.dev.DevModeBase.run(DevModeBase.java:795)at com.google.gwt.dev.DevMode.main(DevMode.java:282)[ERROR] Line 4: Unexpected exception while processing element 'inherits'com.google.gwt.core.ext.UnableToCompleteException: (see previous log entries)at com.google.gwt.dev.cfg.ModuleDefLoader.nestedLoad(ModuleDefLoader.java:269)at com.google.gwt.dev.cfg.ModuleDefSchema$BodySchema.__inherits_begin(ModuleDefSchema.java:413)at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)at java.lang.reflect.Method.invoke(Method.java:597)at com.google.gwt.dev.util.xml.HandlerMethod.invokeBegin(HandlerMethod.java:230)at com.google.gwt.dev.util.xml.ReflectiveParser$Impl.startElement(ReflectiveParser.java:274)at org.apache.xerces.parsers.AbstractSAXParser.startElement(Unknown Source)at org.apache.xerces.parsers.AbstractXMLDocumentParser.emptyElement(Unknown Source)at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanStartElement(Unknown Source)at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl$FragmentContentDispatcher.dispatch(Unknown Source)at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanDocument(Unknown Source)at org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source)at org.apache.xerces.parsers.DTDConfiguration.parse(Unknown Source)at org.apache.xerces.parsers.XMLParser.parse(Unknown Source)at org.apache.xerces.parsers.AbstractSAXParser.parse(Unknown Source)at com.google.gwt.dev.util.xml.ReflectiveParser$Impl.parse(ReflectiveParser.java:331)at com.google.gwt.dev.util.xml.ReflectiveParser$Impl.access$100(ReflectiveParser.java:48)at com.google.gwt.dev.util.xml.ReflectiveParser.parse(ReflectiveParser.java:402)at com.google.gwt.dev.cfg.ModuleDefLoader.nestedLoad(ModuleDefLoader.java:266)at com.google.gwt.dev.cfg.ModuleDefLoader$1.load(ModuleDefLoader.java:178)at com.google.gwt.dev.cfg.ModuleDefLoader.doLoadModule(ModuleDefLoader.java:294)at com.google.gwt.dev.cfg.ModuleDefLoader.loadFromClassPath(ModuleDefLoader.java:147)at com.google.gwt.dev.DevModeBase.loadModule(DevModeBase.java:973)at com.google.gwt.dev.DevMode.loadModule(DevMode.java:482)at com.google.gwt.dev.DevMode.doSlowStartup(DevMode.java:372)at com.google.gwt.dev.DevModeBase.startUp(DevModeBase.java:1081)at com.google.gwt.dev.DevModeBase.run(DevModeBase.java:795)at com.google.gwt.dev.DevMode.main(DevMode.java:282)[ERROR] Failure while parsing XMLcom.google.gwt.core.ext.UnableToCompleteException: (see previous log entries)at com.google.gwt.dev.util.xml.DefaultSchema.onHandlerException(DefaultSchema.java:58)at com.google.gwt.dev.util.xml.Schema.onHandlerException(Schema.java:66)at com.google.gwt.dev.util.xml.Schema.onHandlerException(Schema.java:66)at com.google.gwt.dev.util.xml.HandlerMethod.invokeBegin(HandlerMethod.java:240)at com.google.gwt.dev.util.xml.ReflectiveParser$Impl.startElement(ReflectiveParser.java:274)at org.apache.xerces.parsers.AbstractSAXParser.startElement(Unknown Source)at org.apache.xerces.parsers.AbstractXMLDocumentParser.emptyElement(Unknown Source)at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanStartElement(Unknown Source)at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl$FragmentContentDispatcher.dispatch(Unknown Source)at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanDocument(Unknown Source)at org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source)at org.apache.xerces.parsers.DTDConfiguration.parse(Unknown Source)at org.apache.xerces.parsers.XMLParser.parse(Unknown Source)at org.apache.xerces.parsers.AbstractSAXParser.parse(Unknown Source)at com.google.gwt.dev.util.xml.ReflectiveParser$Impl.parse(ReflectiveParser.java:331)at com.google.gwt.dev.util.xml.ReflectiveParser$Impl.access$100(ReflectiveParser.java:48)at com.google.gwt.dev.util.xml.ReflectiveParser.parse(ReflectiveParser.java:402)at com.google.gwt.dev.cfg.ModuleDefLoader.nestedLoad(ModuleDefLoader.java:266)at com.google.gwt.dev.cfg.ModuleDefLoader$1.load(ModuleDefLoader.java:178)at com.google.gwt.dev.cfg.ModuleDefLoader.doLoadModule(ModuleDefLoader.java:294)at com.google.gwt.dev.cfg.ModuleDefLoader.loadFromClassPath(ModuleDefLoader.java:147)at com.google.gwt.dev.DevModeBase.loadModule(DevModeBase.java:973)at com.google.gwt.dev.DevMode.loadModule(DevMode.java:482)at com.google.gwt.dev.DevMode.doSlowStartup(DevMode.java:372)at com.google.gwt.dev.DevModeBase.startUp(DevModeBase.java:1081)at com.google.gwt.dev.DevModeBase.run(DevModeBase.java:795)at com.google.gwt.dev.DevMode.main(DevMode.java:282)[ERROR] Unexpected error while processing XMLcom.google.gwt.core.ext.UnableToCompleteException: (see previous log entries)at com.google.gwt.dev.util.xml.ReflectiveParser$Impl.parse(ReflectiveParser.java:355)at com.google.gwt.dev.util.xml.ReflectiveParser$Impl.access$100(ReflectiveParser.java:48)at com.google.gwt.dev.util.xml.ReflectiveParser.parse(ReflectiveParser.java:402)at com.google.gwt.dev.cfg.ModuleDefLoader.nestedLoad(ModuleDefLoader.java:266)at com.google.gwt.dev.cfg.ModuleDefLoader$1.load(ModuleDefLoader.java:178)at com.google.gwt.dev.cfg.ModuleDefLoader.doLoadModule(ModuleDefLoader.java:294)at com.google.gwt.dev.cfg.ModuleDefLoader.loadFromClassPath(ModuleDefLoader.java:147)at com.google.gwt.dev.DevModeBase.loadModule(DevModeBase.java:973)at com.google.gwt.dev.DevMode.loadModule(DevMode.java:482)at com.google.gwt.dev.DevMode.doSlowStartup(DevMode.java:372)at com.google.gwt.dev.DevModeBase.startUp(DevModeBase.java:1081)at com.google.gwt.dev.DevModeBase.run(DevModeBase.java:795)at com.google.gwt.dev.DevMode.main(DevMode.java:282)[ERROR] shell failed in doSlowStartup method--
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+unsubscribe@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+unsubscribe@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/google-web-toolkit?hl=en.
Re: MVP + Handlers + Carelessness = Memory Leak ?
shedding some light on garbage collection, etc. :-) (I'm no full time
programmer, so I don't know many subtleties of programming...)
The point is, that I kind of have an old but "big" (relative I guess)
application (in fact I wrote it myself in my GWT starter times, with
GWT 1.7.1 knowledge ;-) and now I'm building widgets following MVP and
integrating them into the old application. Normally I just inject a
SimpleEventbus via Gin into the presenter to let the application
attach custom handlers, then I use standard GWT to get the view
interactive. Meaning I just insert Methods to do stuff like
view.getButton().addClickHandler(new ClickHandler(){ ... })
into the view, so the view has
HasClickHandlers getButton();
in the interface and returns the appropriate button.
I guess GWT is maintaining these handlers itself, disposing of them,
when necessary? So I don't have to null out those ClickHandlers at any
time? Or do I have to care? I guess if the views are singletons I
definitely have to, right? But what if all gets disposed at the same
time? Are the ClickHandlers killed?
Anyway recently I hacked something similar into it with a custom
interface / class, same as the BlubbHandler above, which has no
HandlerManager / Eventbus, and just does it directly, not taking care
of disposing anything. So I kind of have a Presenter -> View ->
BlubbHandler -> Presenter dependency and no HandlerManager. And it is
altogether thrown away, when not used anymore. I guess due to Thomas'
comment this means, that the memory is still freed, correct?
Besides that the application is of course more complex, it normally
follows the pattern load(new Page()) where a Page-Object is created,
then the page-object instantiates all it's widgets which are partially
in MVP containing other widgets partially in MVP.
So I guess often a pattern like the following appears:
A1 is disposed, the references are A1 -> ... -> An -> B -> C -> An
I take it, that still normally all those things should be garbage
collected, since there is no reference from the running application to
any of them anymore. Is this generally the case?
I always thought Places / Activities are for the bottom structure, and
not for constructing single widgets. Unfortunately I'm not independent
in creating this application and my suggestion for a refactoring to
activities / places was rejected... Therefore I can just follow
patterns and best practices I have learned in time for new parts of
the application.
Would it be a good pattern to do the following:
- Declare the View as Singleton in Gin (to spare the heavy unnecessary
DOM operations)
- Attach a DisposeHandler to the View, enabling to fire Dispose events
that will make the underlying Presenter detach itself from the view
- Override the void onUnload() method of the view to fire a
DisposeEvent
Therefore by adding a DisposeHandler to the View in the Constructor of
the Presenter would be sufficient to make sure that whenever the
widget is unloaded, the presenter's references are nulled out and the
presenter (being not singleton) is disposed
Then I could also write a base class AbstractPresenter that would
already take care of adding such a Handler and a base class
AbstractView, etc. providing an addDisposeHandler(DisposeHandler
handler) method and overriding the onUnload() method. Just so I would
never forget to null out the presenter's references...
Is there an error in this pattern? Or would it provide the following:
- One time instantiation of Views
- New Presenters for every call
- Save approach to presenter <-> view references, that nulls out view
references before the presenter is disposed
- And of course: No memory leaks ;-)
Thank you all for helping me to improve my GWT knowledge :-)
On Mar 31, 12:54 pm, Thomas Broyer <t.bro...@gmail.com> wrote:
> On Wednesday, March 30, 2011 7:58:43 PM UTC+2, pete wrote:
>
> > Hallo,
>
> > I'm not sure how GWT handles this, so I want to evaluate a short
> > example scenario for memory leaks. Suppose I write my own handler
>
> > public Interface BlubbHandler {
> > void onBlubb(BlubbEvent event);
> > }
>
> > have my presenter
>
> > public class MyPresenter {
> > private final MyView view;
> > private final StringContainer justToBeFinal;
>
> > @Inject
> > public MyPresenter(MyView view) {
> > this.view = view;
> > view.addBlubbHandler(new BlubbHandler(){
> > justToBeFinal.setText("BLUBB");
> > });
> > }
> > }
>
> > and now my Widget is disposed. Will the memory it uses ever be freed?
> > Or does the reference to view prevent view from being disposed,
>
> Yes.
>
> > and
> > the reference of view's BlubbHandler to justToBeFinal prevent
> > MyPresenter to be disposed?
>
> It depends how the view keeps a reference to the BlubbHandler (or rather *
> who* keeps a reference to it).
> Having A keeping a reference on B, and B a reference on A doesn't
> (necessarily) create a memory leak: both will be reclaimed when there's no
> longer any reference to any of them.
>
> > I'm not even sure, how it would be in Java, but I think in Java this
> > would cause a memory leak, wouldn't it?
> > So do I have to add a dispose() method to pesenter, that must be
> > called to null out the BlubbHandlers of view?
> > And how is this handled with GWT's own event system? Or with event
> > systems constructed on top of GWTs own one, using SimpleEventBus and
> > extending / implementing GWT's classes?
>
> As I said above, it depends *who* keeps a reference on the handlers, and its
> lifetime. If you're using a HandlerManager (or EventBus) that has the same
> lifetime as the view, then you've just changed the A->B->A above to
> A->B->C->A, but it's still OK.
>
> > Anyone who is more versatile in these matters and can help me would be
> > very appreciated :-) I don't want to find out after lines and lines of
> > code, that I'm memory leaking like stupid...
>
> Given that anything related to the DOM is quite heavyweight and slow, it
> could be a good idea to keep some views around as singletons (instead of
> building a new one each time). Presenters are on the other hand generally
> lightweight objects, so having them short-lived makes them easier to code
> (as you don't have to reset their internal state each time they're reused).
> That means it's good practice to include "dispose" methods in presenters to
> "detach" from the view, thus preventing memory leaks (if you create 10
> presenters for a single view, and never "detach" them, you'll still have all
> 10 in memory *and* listening to events *and* probably trying to update the
> shared view all at once; bad for memory usage, bad for performance, and
> highly error prone!)
> As Jambi suggested, GWT 2.1 Activities makes it easy, as an activity's
> lifecycle is clearly define: it starts (time where you "attach" to the view)
> and then either is cancelled (before it has finished
> asynchronously-starting) or is later stopped (time to "detach" from the
> view).
>
> In the end, it all depends how you manage the lifecycle and lifetime of your
> objects.
--
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+unsubscribe@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/google-web-toolkit?hl=en.
Problems running GWT & Maven project in hosted mode (I18N?)
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+unsubscribe@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/google-web-toolkit?hl=en.