Problem with setDebugId and Navigator7

Hello,

I’ve a problem with Navigator7 and a debugId.

So the class NavigableAppLevelWindow, in the method attach call my method createComponent of my NavigableAppLevelWindow.

I set a debugId on my ComponentContainer, here’s the code


@Override
	protected ComponentContainer createComponents() {

		final ComponentContainer sirefBody = new AbsoluteLayout();
		sirefBody.setDebugId("contentBody"); // Pour le XPath des tests WIT
		sirefBody.setStyleName("sirefContentView");
		sirefBody.setSizeFull(); 
                ........
}

And sometimes, when I go back in my application using Navigator7 and load the same page, I’ve the following error :


GRAVE: Terminal error:
java.lang.IllegalStateException: Two paintables (AbsoluteLayout,AbsoluteLayout) have been assigned the same id: bodyLayout
	at com.vaadin.terminal.gwt.server.AbstractCommunicationManager.getPaintableId(AbstractCommunicationManager.java:2019)
	at com.vaadin.terminal.gwt.server.JsonPaintTarget.startTag(JsonPaintTarget.java:693)
	at com.vaadin.ui.AbstractComponent.paint(AbstractComponent.java:735)
	at com.vaadin.ui.AbsoluteLayout.paintContent(AbsoluteLayout.java:587)
	at com.vaadin.ui.AbstractComponent.paint(AbstractComponent.java:781)
	at com.vaadin.ui.Panel.paintContent(Panel.java:269)
	at com.vaadin.ui.Window.paintContent(Window.java:641)
	at com.vaadin.ui.AbstractComponent.paint(AbstractComponent.java:781)

So the problem is that I’ve two components with the debugId “contentBody”, but the only place where I set the debugId is the code on top.

It’s like if my layout named sirefBody is added and never removed.

Is it possible to set a debugId here ? Do you already have this problem ?

Thank you in advance !

Cédric

I found my problem !

l have two applications in the same tomcat, and when the second application redirect to a page of the first application (the page is already loaded, displayed in the first application), I’ve this problem with the same debugId.

This problem is only when I’m using navigator7.

I did a simple application, who just show a label with a debugId. When I open two differents tabs without Navigator7, all is fine, but when I use navigator7 and open two tabs I’ve the same problem.

So I solved the problem by addind a property for enable / disable debugId in a properties file, and I check this property in order to know if I’ve to set the debugId.

I use debug Id for GUI testing with Selenium, so I enable debugId only in test environment.

But I don’t understand why the production mode option can’t do that :

In my opinion, It’ll be fine to set the debug ids only when the productionMode is false

Thanks

Cédric