Animator - Trouble With Fading In A Sub Window

Hi,

I attempted to implement the fading in of a sub window, following Jouni’s demo code. My window has a table that contains several rows/items. The table has a listener for double-clicks:

        proxy = new AnimatorProxy();
        app.getMainWindow().addComponent(proxy);
        ((VerticalLayout) app.getMainWindow().getContent()).setExpandRatio(proxy, 0);
                                        .
                                        .
                                        .
        table.addListener(new ItemClickListener() {
        	public void itemClick(ItemClickEvent event) {
        		if (event.isDoubleClick()) {
        			Window win = new Window("New Window");
        			win.addStyleName(Reindeer.WINDOW_BLACK);
        			win.setClosable(true);
        			win.setResizable(true);
        			win.setDraggable(true);
        			win.setWidth("400px");
        			win.setHeight("200px");
        			win.setModal(true);
        			win.getContent().setSizeFull();
        			Label myLabel = new Label("New label");
        			myLabel.setSizeUndefined();
        			myLabel.addStyleName(Reindeer.LABEL_H1);
        			win.addComponent(myLabel);
        			((VerticalLayout) win.getContent()).setComponentAlignment(myLabel,Alignment.MIDDLE_CENTER);        			
        			app.getMainWindow().addWindow(win);
        			win.center();
        			proxy.animate(win, AnimType.FADE_IN).setDuration(500).setDelay(300);
        		}
        	}
        });

When I double-click a table row, a window does, in fact appear, but it is translucent and neither the label nor the window caption ever appear. The fade-in of the contents of the window never happens. Can anyone suggest a reason why this might be happening? Thanks in advance.
11727.png

Hmm, can’t figure out anything else than some JS error happening during the rendering. Can you tell specifics like the Vaadin version, browser version and platform so I can try to reproduce the error? And does this happen in every browser, and with older Vaadin versions as well?

Yes - I should have provided more information.

  • Vaadin version: 6.6.0
  • Platform: Windows XP Professional Version 2002 Service Pack 3
  • Browsers: Internet Explorer 6.0.2900.5512.xpsp_sp3_gdr.101209-1647; Firefox 3.6.17
  • Web Servers: Apache Tomcat 5.0 and 6.0

Please let me know if you need any more information. Thanks very much.

Also the components inside the window would help, so if you could provide a reduced code example that would be super.

OK, I have returned. Jouni, what more code do you need than what I already provided. I believe what I’ve already provided contains the sub-window creation and it’s only component - the label. Please advise.

I still can’t get this reproduced, using the exact same IE version and the latest Vaadin (6.6.4). Here’s my test code:


public void init() {
        final Window mainWindow = new Window("Animator Add-on for Vaadin");
        setMainWindow(mainWindow);

        final AnimatorProxy proxy = new AnimatorProxy();
        getMainWindow().addComponent(proxy);

        Table t = new Table();
        t.addContainerProperty("Foo", String.class, null);
        t.addItem("1").getItemProperty("Foo").setValue("Bar");

        t.addListener(new ItemClickListener() {
            public void itemClick(ItemClickEvent event) {
                if (event.isDoubleClick()) {
                    Window win = new Window("New Window");
                    win.addStyleName(Reindeer.WINDOW_BLACK);
                    win.setClosable(true);
                    win.setResizable(true);
                    win.setDraggable(true);
                    win.setWidth("400px");
                    win.setHeight("200px");
                    win.setModal(true);
                    win.getContent().setSizeFull();
                    Label myLabel = new Label("New label");
                    myLabel.setSizeUndefined();
                    myLabel.addStyleName(Reindeer.LABEL_H1);
                    win.addComponent(myLabel);
                    ((VerticalLayout) win.getContent()).setComponentAlignment(
                            myLabel, Alignment.MIDDLE_CENTER);
                    getMainWindow().addWindow(win);
                    win.center();
                    proxy.animate(win, AnimType.FADE_IN).setDuration(500)
                            .setDelay(300);
                }
            }
        });
        mainWindow.addComponent(t);
}