A have a list model

IModel<List<Something>> model;

the list is displayed as a simple grid table PropertyListView, each
line is a set of controls to edit Something.

            @Override
            public void populateItem(final ListItem<Something> listItem)
            {
                 listItem.add(new TextField("name"));
                 listItem.add(new TextField("value"));
                ....
            }

There is an a "addNew" ajax button below the table which adds a new
element in the model's list:

            public void onClick(final AjaxRequestTarget target) {
                final List<Something> list = model.getObject();
                list.add(new Something());
                target.add(listViewContainer);// repaint the list view
                target.focusComponent(??????????); // Focus "name"
textbox.
            }

After the button click I want to set focus to the one of controls in
the new line appeared. How to do it?

Wicket 6.10.0

-- 
WBR, Anatoly.

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
For additional commands, e-mail: users-h...@wicket.apache.org

Reply via email to