show form
run this code. You see cursor at end of first row. now edit the textfield. the
cursor jumps to end.
public static void showEditPopup(final EditPopupEvent event) {
final Dialog dialog = new Dialog();
final TextField textarea = new TextField();
textarea.setUIID("BozzaInputDialogMessage");
textarea.setMaxSize(event.getMaxSize());
textarea.setText(" sf s dfs df sdf sdf sd f sdf sdf s df s fsdf s df sdf sdf sd f sdf sdf s df s df sd f sd f sdf sdf sdf sdf sdfsdf");
textarea.setRows(3);
textarea.setSingleLineTextArea(false);
Button cancelbutton = new Button("Cancel");
cancelbutton.setUIID("PopupBozzaB");
cancelbutton.addActionListener(new ActionListener() {
public void actionPerformed(ActionEvent evt) {
dialog.dispose();
}
});
Button submitbutton = new Button("Confirm");
submitbutton.setUIID("PopupBozzaB");
submitbutton.addActionListener(new ActionListener() {
public void actionPerformed(ActionEvent evt) {
event.getNamedCommand().submit(textarea.getText());
dialog.dispose();
}
});
Container buttonContainer = new Container(new BorderLayout());
buttonContainer.addComponent(BorderLayout.WEST, cancelbutton);
buttonContainer.addComponent(BorderLayout.EAST, submitbutton);
Container container = new Container();
container.setLayout(new BoxLayout(BoxLayout.Y_AXIS));
container.addComponent(textarea);
container.addComponent(new BozzaLine());
container.addComponent(buttonContainer);
container.setUIID("BozzaDialogContent");
Container wrapcontainer = new Container(new BoxLayout(BoxLayout.Y_AXIS));
wrapcontainer.setUIID("BozzaWrapContainer");
wrapcontainer.addComponent(container);
dialog.setTitle(event.getTitle());
dialog.addComponent(wrapcontainer);
dialog.setDisposeWhenPointerOutOfBounds(true);
dialog.showPacked(BorderLayout.CENTER, true);
}
Original issue reported on code.google.com by jkoo...@gmail.com on 4 Jul 2012 at 3:39
Original issue reported on code.google.com by
jkoo...@gmail.com
on 4 Jul 2012 at 3:39