mirror of
https://github.com/vaadin/framework.git
synced 2024-09-13 15:46:01 +02:00
parent
97b802e6f4
commit
aabb83ade2
40
src/com/itmill/toolkit/tests/tickets/Ticket2287.java
Normal file
40
src/com/itmill/toolkit/tests/tickets/Ticket2287.java
Normal file
@ -0,0 +1,40 @@
|
||||
package com.itmill.toolkit.tests.tickets;
|
||||
|
||||
import java.io.ByteArrayInputStream;
|
||||
import java.io.IOException;
|
||||
import java.net.URL;
|
||||
|
||||
import com.itmill.toolkit.ui.CustomLayout;
|
||||
import com.itmill.toolkit.ui.Label;
|
||||
import com.itmill.toolkit.ui.Window;
|
||||
|
||||
public class Ticket2287 extends Ticket2292 {
|
||||
|
||||
public void init() {
|
||||
final Window main = new Window(getClass().getName().substring(
|
||||
getClass().getName().lastIndexOf(".") + 1));
|
||||
setMainWindow(main);
|
||||
URL url = getURL();
|
||||
main
|
||||
.addComponent(new Label(
|
||||
"Icon is built by servlet with a slow method, so it will show the bug (components not firing requestLayout)."));
|
||||
|
||||
Label l = new Label();
|
||||
l.setContentMode(Label.CONTENT_XHTML);
|
||||
l.setValue("This is a label with as slow image. <img src=\"" + url
|
||||
+ "/icon.png\" />");
|
||||
main.addComponent(l);
|
||||
|
||||
try {
|
||||
CustomLayout cl = new CustomLayout(
|
||||
new ByteArrayInputStream(
|
||||
("This is an empty CustomLayout with as slow image. <img src=\""
|
||||
+ url.toString() + "/icon.png\" />")
|
||||
.getBytes()));
|
||||
main.addComponent(cl);
|
||||
} catch (IOException e) {
|
||||
// TODO Auto-generated catch block
|
||||
e.printStackTrace();
|
||||
}
|
||||
}
|
||||
}
|
Loading…
Reference in New Issue
Block a user