diff options
author | Joonas Lehtinen <joonas.lehtinen@itmill.com> | 2007-09-30 13:56:37 +0000 |
---|---|---|
committer | Joonas Lehtinen <joonas.lehtinen@itmill.com> | 2007-09-30 13:56:37 +0000 |
commit | ddd21c36586473dc3123cb27b6af153de4e99fa0 (patch) | |
tree | 1a9a8e1f2c2caed635b356d4579e104e5c1f49dc /src/com/itmill/toolkit/ui/AbstractComponent.java | |
parent | 00596710405fa2c56a7b51a7f237cfc5bd170ca4 (diff) | |
download | vaadin-framework-ddd21c36586473dc3123cb27b6af153de4e99fa0.tar.gz vaadin-framework-ddd21c36586473dc3123cb27b6af153de4e99fa0.zip |
UIDL Caching system implemenatation. Closes #855
svn changeset:2396/svn branch:trunk
Diffstat (limited to 'src/com/itmill/toolkit/ui/AbstractComponent.java')
-rw-r--r-- | src/com/itmill/toolkit/ui/AbstractComponent.java | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/src/com/itmill/toolkit/ui/AbstractComponent.java b/src/com/itmill/toolkit/ui/AbstractComponent.java index 9befb25f1c..18ce5b59a5 100644 --- a/src/com/itmill/toolkit/ui/AbstractComponent.java +++ b/src/com/itmill/toolkit/ui/AbstractComponent.java @@ -518,6 +518,7 @@ public abstract class AbstractComponent implements Component, MethodEventSource * interface. */ public void attach() { + requestRepaint(); } /* @@ -551,7 +552,10 @@ public abstract class AbstractComponent implements Component, MethodEventSource */ public final void paint(PaintTarget target) throws PaintException { - if (!target.startTag(this, this.getTag())) { + if (!target.startTag(this, this.getTag()) || repaintRequestListenersNotified) { + + // Paint the contents of the component + if (styles != null && styles.size() > 0) target.addAttribute("style", getStyle()); if (isReadOnly()) @@ -580,6 +584,10 @@ public abstract class AbstractComponent implements Component, MethodEventSource if (error != null) error.paint(target); } + } else { + + // Contents have not changed, only cached presentation can be used + target.addAttribute("cached", true); } target.endTag(this.getTag()); |