GWT popupPanel via EntryPoint
Bonjour,
je suis en train de tester GWT.
Je fais une veille des techno RIA web, donc je teste GWT, Flex & cie.
J'ai fais une classe EntryPoint avec une menubar et j'aimerai que le choix d'un menuItem lance l'apparition d'un PopupPanel que j'ai créé dans une autre classe appelée Preference.java .
je fais new Preference().show sur le onClick du menuItem mais ça marche pas.
ça m'affiche une barre blanche en plein milieu de la page comme si le popuppanel était vide.
Voici le code de ma PopupPanel :
Code:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33
|
public class Preference extends PopupPanel {
public Preference() {
super(true);
// PopupPanel is a SimplePanel, so you have to set it's widget property to
// whatever you want its contents to be.
setWidget(new Label("Preferences"));
final AbsolutePanel absolutePanel = new AbsolutePanel();
setWidget(absolutePanel);
absolutePanel.setSize("100%", "100%");
final Label codecLabel = new Label("Codec");
absolutePanel.add(codecLabel, 52, 79);
final TextBox textBox = new TextBox();
absolutePanel.add(textBox, 154, 79);
final Button button = new Button();
absolutePanel.add(button, 138, 259);
button.addClickListener(new ClickListener() {
public void onClick(final Widget sender) {
Window.alert("fermerpopupPanel");
}
});
button.setText("Valider");
}
} |