How to transnfer big and complex object to JS library

Hello
I have java complext Object


Chart{
    Series {
        Serie {...}
    }
    Option{...}
    AAA{}
    BBB{
       CCC{
            ....
       }
    }
}

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

  1. question:
    [/b]
    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.
by:


  @Override
    public void paintContent(PaintTarget target) throws PaintException {
        try {
            super.paintContent(target);

            //FIXME hack for nested map support, Use Mixins with ASM or wrap object
            Field field = JsonPaintTarget.class.getDeclaredField("tag");
            field.setAccessible(true);
            Object jsonTagObject = field.get(target);
            Method jsonTagObject_addAttribute = jsonTagObject.getClass().getMethod("addAttribute", String.class);
            jsonTagObject_addAttribute.setAccessible(true);
            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 http://www.davidshah.com/2011/08/gwt-unterminated-string-constant.html . Do you escape these chars to?

EDIT:
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:
[b]
is vaadin able to handle and refresh +1000 toooltips? are they properly garbaged?

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

[/b]

Thank you