I've investigued the ListView, and i have succeded for doing my dynamic
adding item.
The problem now is that when i add a Item, all the fields are reseted, It
don't keep the information in the field.

The is my code : 

        this.test = new ArrayList();
        
        CheckBox toto = new CheckBox("selected");
        FileUploadField upload = new FileUploadField("upload");
        TextField description = new TextField("description");
        
        test.add(new CUploadArticle(toto,upload,description));
        
        ajout_site = new ListView("list_site", test) {
                protected void populateItem(ListItem item) {
                        CUploadArticle p = (CUploadArticle) 
item.getModelObject();
                        item.add(p.getRadio());
                        item.add(p.getId());
                        item.add(p.getName());
                }
        };
        this.form_ajoutinfcommunautaire.add(ajout_site);


        Link lien = new Link("ajout_site") {
                        public void onClick() {
                        CheckBox toto = new CheckBox("selected");
                        FileUploadField upload = new FileUploadField("upload");
                        TextField description = new TextField("description");
                        
                        test.add(new CUploadArticle(toto,upload,description));
                        ajout_site.setList(test);
                        }
                };
                lien.add(new Label("name","Upload another file"));
                lien.setVisible(true);
                this.form_ajoutinfcommunautaire.add(lien);


How can i do this???
-- 
View this message in context: 
http://www.nabble.com/Help-to-choice-ajax-component-tp16393445p16396267.html
Sent from the Wicket - User mailing list archive at Nabble.com.


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to