How to transnfer big and complex object to JS library

I have java complext Object

    Series {
        Serie {...}

This serialized (in json) object could have about 7MB

  1. question:
    What is the most clear way to add this attribute to PaintTarget target? I can’t convert this object to easy flat structure. I would like to put it as json structure… I’ll use this object by JS library Flot.

I’m converting my object to JSON by Jackson and by java reflection putting it into UUIDL.

    public void paintContent(PaintTarget target) throws PaintException {
        try {

            //FIXME hack for nested map support, Use Mixins with ASM or wrap object
            Field field = JsonPaintTarget.class.getDeclaredField("tag");
            Object jsonTagObject = field.get(target);
            Method jsonTagObject_addAttribute = jsonTagObject.getClass().getMethod("addAttribute", String.class);
            jsonTagObject_addAttribute.invoke(jsonTagObject, "\"data\":" + chartDataFactory.getCompleteConfiguration().toJSON());
            // TODO Paint any component specific content by setting attributes
            // These attributes can be read in updateFromUIDL in the widget.
        } catch (Exception ex) {
            Logger.getLogger(TimeLineChartComponent.class.getName()).log(Level.SEVERE, null, ex);

But Vaadin sometimes (once a 6 hours?) crashes on Communication problem :
(syntax error) unterminated string constant desription: Unterminated string constant number: -214627273

But if I refresh this page with same data everything is OK.

2/Is there any limit in UUIDL stream?

It could be vaadin IE8 issue too see . Do you escape these chars to?

I investigated this issue by wireshark and it seems to be browser issue. UIDL seem to be OK but uncomplete, but IE didn’t recieve all packets, there is in TCP stream just part of UIDL. It could case this behavior.

I was thinking how to reduce data which are transferred to client and I found out I have lot of generated tooltips which are long (each has some special meaning but their are long and contains html). So my next question is:
is vaadin able to handle and refresh +1000 toooltips? are they properly garbaged?

is it possible not to transfer all tooltip for each component, but request just one tooltip from server if it is required?


Thank you