wicket-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From pic...@netcourrier.com
Subject listview and windowmodal
Date Sat, 02 May 2009 09:26:12 GMT
hi, i'm a beginner in Wicket and i'm trying this framework.

first i'm building un CRUD application for users.

I have a UserBasePage listing all users using a listView.
each line is made of the name of the user and an edit link.

All i want to do is to edit the user properties in a modal window. i can use an instance of
WindowModal for each user, but i feel i made a mistake : too much memory consuption.
Is there a way to create only one modal window and use it for all my users ?

right now, i'm trying something like this but the modal window is only populated with le last
user (it's obvious, but i have the feeling i'm missing something but i can't find what ...


final ModalWindow modal1;

public UserPage() {

       ListView lv = new ListView("menu", new ListModel()) {
            protected void populateItem(ListItem item) {
                final User user = (User) item.getModelObject();

                modal1.setPageCreator(new ModalWindow.PageCreator() {
                    public Page createPage() {
                        log.debug("create page");
                        return  new UserEditPage(user);

                item.add(new AjaxLink("updateuser") {
                     public void onClick(AjaxRequestTarget target) {





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

View raw message