ReplaceComponent its making invisible some Components

Hi, I’m bothering you again with more problems I’m dealing with Combo Boxes.

I have a combo box with some options that when the user picks one, other components must be created and showed, then if the user selects another option, those components must be replaced for others newly created.

I’m using the method:
void com.vaadin.ui.AbstractOrderedLayout.replaceComponent(Component oldComponent, Component newComponent)
to do that, and it’s working fine… often.

But, sometimes, I don’t know exactly when, after navigating through the options of the combobox, the screen doesn’t show the components that I created and set replacing the old ones. (The old ones are removed successfully)
I added some logs on my applciation to know if all the time the method
is invoked or if my logic is fuzzy; but I noticed the method is invoked as expected all the time and the components are just there but I noticed using firebug that they have its attribute “with” set to 0, and because the div that contains the components has the css-rule overflow:hidden the component is invisible to the user.

I wasn’t setting any with to my components but I even manually set a with for all my components and the problem is still happening. I tried to use
after every change of option, but It doesn’t fix the problem.

By the way, if you pick another option almost always the problem solves by art of magic, but as it goes it can return at any time.

So my question is. Do you have an idea of what I’m doing wrong or what is possibly provoking this error?

This happens with IE 6,7,8, Firefox 3.6, Chrome 5, Safari 5 and Opera 10, on Windows Vista and Windows 7 (I haven’t tested yet on Mac or Linux systems, but I suppose it’s a logic problem.

Not right of the bat, no… Sounds strange.
Can you reproduce the problem with a small example? It sounds strange enough so that it could be a bug, but it’s hard to comment without ant code to look at :wink:

Best Regards,

I don’t know what was happening, but on Vaadin’s version 6.4.9 the problem is not happening. So ignore my comment above if you’re using the latest version.