What about the relation between IsRenderable and the ElementBuilder API?

I know that IsRenderable is used to first render the widget content as 
safehtml/html, and then attach (claim) the 'real' widget to it. Can the 
rendering part be deferred to the server (given the lazy nature of 
RenderablePanel)? Any samples out there of this technique?

The other element I see somehow involved in a possible server-side 
rendering, is ElementBuilder (http://gwt-code-reviews.appspot.com/1455802). 
Reading the RFC, it is possible to define even server-side builders (like 
HtmlDivBuilder) and build an html/safehtml context by chaining calls. But 
what if I would like to add/remove handlers to a such server-side-generated 
dom element? Wrap? Maybe is this the IsRenderable purpose?

Server-side widget rendering it's a really interesting topic (mobile 
development, server-driven UIs, ...), but I can't find any more 
informations/design docs/samples other than reading all relevant 
commits/experiment myself.

On Wednesday, May 23, 2012 12:57:22 PM UTC+2, Thomas Broyer wrote:
>
>
> On Wednesday, May 16, 2012 4:03:40 PM UTC+2, Chris Lercher wrote:
>>
>> There are several competing (or complemental) new/experimental (or 
>> deprecated) classes around, which deal with rendering Widgets in 
>> alternative (often lazy) ways in GWT:
>>
>> - GXT2's lazy 
>> Component<http://grepcode.com/file/repo1.maven.org/maven2/com.extjs/gxt/2.2.0/com/extjs/gxt/ui/client/widget/Component.java>
>>  (which 
>> has been deprecated in GXT3)
>> - 
>> LazyPanel<http://google-web-toolkit.googlecode.com/svn/javadoc/latest/com/google/gwt/user/client/ui/LazyPanel.html>
>> - 
>> PotentialElement<http://google-web-toolkit.googlecode.com/svn/javadoc/latest/com/google/gwt/user/client/ui/PotentialElement.html>
>>  ["experimental"]
>> - 
>> IsRenderable<http://google-web-toolkit.googlecode.com/svn/javadoc/latest/com/google/gwt/user/client/ui/IsRenderable.html>
>>  ["very 
>> experimental"] and 
>> RenderablePanel<http://google-web-toolkit.googlecode.com/svn/javadoc/latest/com/google/gwt/user/client/ui/RenderablePanel.html>
>>  ["experimental"]
>>
>> Seeing how GXT2 had problems with their lazy rendering, what can we 
>> expect from these concepts? Looking into trunk, IsRenderable seems to 
>> evolve (using a new RenderableStamper class), so there's probably something 
>> in the pipeline...
>>
>> I know, that this is not a concrete question - I'm just curious if 
>> someone has interesting information about this subject?
>>
>
> AFAICT, PotentialElement and IsRenderable are to speed-up rendering of 
> widgets, particularly when used within an HTMLPanel or RenderablePanel in a 
> UiBinder template: the widget is "rendered" to SafeHtml (and stamped), 
> concatenated to the HTML of the containing HTMLPanel and "rendered" as a 
> single big HTML string, then the stamped element is retrieved out of the 
> HTMLPanel and the widget is "attached" to it (claimElement) and finally 
> "logically attached" to the HTMLPanel (as its parent widget).
> I suppose they could also be used to attach widgets to some HTML generated 
> (pre-rendered) on the server-side (similar to Closure's decorate(), and the 
> various static wrap() methods used in "basic" GWT widgets; there's no 
> notion of canDecorate() as in Closure though, so it'd be your 
> responsibility to build this into your widgets; not really for reusable 
> widgets, more for applications you control from end-to-end).
>

-- 
You received this message because you are subscribed to the Google Groups 
"Google Web Toolkit" group.
To view this discussion on the web visit 
https://groups.google.com/d/msg/google-web-toolkit/-/j8J_cdBENwgJ.
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.

Reply via email to