Important Notice - Forums is archived
To simplify things and help our users to be more productive, we have archived the current forum and focus our efforts on helping developers on Stack Overflow. You can post new questions on Stack Overflow or join our Discord channel.

TUTORIALVaadin lets you build secure, UX-first PWAs entirely in Java.
Vaadin lets you build secure, UX-first PWAs entirely in Java.
Free ebook & tutorial.
Calling javascript synchronously by Enver Haase, 1 month ago
Buggy behaviour with TreeTable setSelectable
Hi,
when I set my TreeTable (or Table) to setSelectable(false) when there is already a selection and hover over the selected item it goes from a normal looking blue row to a clear row with nearly completely transparent text.
This code should drop in and replicate the behaviour on Vaadin 6.7.6, Tomcat 7.0, IE 8.0
Is this a legit bug and how should I raise it?
import com.vaadin.annotations.AutoGenerated;
import com.vaadin.ui.AbsoluteLayout;
import com.vaadin.ui.Alignment;
import com.vaadin.ui.Button;
import com.vaadin.ui.Button.ClickEvent;
import com.vaadin.ui.Button.ClickListener;
import com.vaadin.ui.CustomComponent;
import com.vaadin.ui.Table;
import com.vaadin.ui.VerticalLayout;
import com.vaadin.ui.AbstractSelect.MultiSelectMode;
public class MockupComponent extends CustomComponent
{
@AutoGenerated
private AbsoluteLayout mainLayout;
@AutoGenerated
private VerticalLayout verticalLayout_1;
private Table table;
private Button button;
private Button button2;
private static final long serialVersionUID = 8041710587574969800L;
public MockupComponent(Vaadin app)
{
buildMainLayout();
setCompositionRoot(mainLayout);
}
@AutoGenerated
private AbsoluteLayout buildMainLayout()
{
// common part: create layout
mainLayout = new AbsoluteLayout();
mainLayout.setImmediate(false);
mainLayout.setWidth("985px");
mainLayout.setHeight("675px");
mainLayout.setMargin(false);
// top-level component properties
setWidth("985px");
setHeight("675px");
// verticalLayout_1
verticalLayout_1 = buildVerticalLayout_1();
mainLayout.addComponent(verticalLayout_1,
"top:0.0px;right:-4.0px;bottom:-5.0px;left:0.0px;");
return mainLayout;
}
@AutoGenerated
private VerticalLayout buildVerticalLayout_1()
{
// common part: create layout
verticalLayout_1 = new VerticalLayout();
verticalLayout_1.setImmediate(false);
verticalLayout_1.setWidth("100.0%");
verticalLayout_1.setHeight("100.0%");
verticalLayout_1.setMargin(false);
table = new Table();
table.setImmediate(true);
table.setWidth("650px");
table.setHeight("250px");
verticalLayout_1.addComponent(table);
table.setSelectable(true);
table.setMultiSelect(true);
table.setMultiSelectMode(MultiSelectMode.SIMPLE);
table.addContainerProperty("Name", String.class, "BLANK");
table.addContainerProperty("Code", String.class, "");
for(Integer i = 0; i < 10; i++)
{
table.addItem(new Object[] {"Number " + i, "Something " + i});
}
button = new Button();
button.setCaption("Button");
button.setImmediate(true);
button.setWidth("170px");
button.setHeight("-1px");
button.addListener(new ClickListener()
{
@Override
public void buttonClick(ClickEvent event)
{
table.setValue(table.getItemIds());
}
});
verticalLayout_1.addComponent(button);
verticalLayout_1.setComponentAlignment(button, new Alignment(48));
button2 = new Button();
button2.setCaption("Button 2");
button2.setImmediate(true);
button2.setWidth("170px");
button2.setHeight("-1px");
button2.addListener(new ClickListener()
{
@Override
public void buttonClick(ClickEvent event)
{
table.setSelectable(false);
}
});
verticalLayout_1.addComponent(button2);
verticalLayout_1.setComponentAlignment(button2, new Alignment(48));
return verticalLayout_1;
}
}
Last updated on Jun, 21st 2012
You cannot reply to this thread.